From patchwork Mon Jun 10 20:02:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 1945998 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=iMjuDrEp; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VyjQL04Pcz20V0 for ; Tue, 11 Jun 2024 06:02:34 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 28B77385DC1E for ; Mon, 10 Jun 2024 20:02:32 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-ot1-x32a.google.com (mail-ot1-x32a.google.com [IPv6:2607:f8b0:4864:20::32a]) by sourceware.org (Postfix) with ESMTPS id 263083858CDB for ; Mon, 10 Jun 2024 20:02:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 263083858CDB Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 263083858CDB Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::32a ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718049737; cv=none; b=NqCz7aL5gwEVXYFO/JrV+JI5AbKVtT6tSRf21R3EQFuGil3EZoJAK9kBzKeXhoBMU8yr3US/rpyjVkd4+HwYRZddC54TohNn/+KIizDMTe/5kvbkY6riuxTziUKXgJ08iMbJ6dD7bxaIJyo93GW+47MEwkY5tfIUwYUtLd9kDi4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718049737; c=relaxed/simple; bh=ZXcnaNEDK9GR2uEwD0qbWfVIDPeyB5eloRQebh880JY=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=mNmxIIuzuN9DijUyR2XEJnutXTkMdDUwTCx9CyuQQ2DEvLBYjmdOSTgBJtlxRBD61eS9TNHBjy2yTlqxYVvpBfqmju6BRvS1lb2vBzcXmKgBG4GD18tT2KvO4CsTd1HVD81igud7eDUUBlzAHBTAesDY5HNcj98Cdi0Bh5VLJY0= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-ot1-x32a.google.com with SMTP id 46e09a7af769-6f95be3d4c4so206959a34.3 for ; Mon, 10 Jun 2024 13:02:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718049734; x=1718654534; darn=sourceware.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=AJ8UM1s6ZTJn13AbHsqwawuk5c2y2O1BPJs84WdGbks=; b=iMjuDrEpdhmAiMJlNMnj4AGeXJ0gq3KCC9oHAZk4IgquGMK52rOEdcASIkLwkcyG+p siW6KFoq1OW+AJoF07me6J3I+Wkjq9idpAyFOybUqSBo52bI7aR2HzVUPpNodS23THXX A9hl665nc+YehyKMeNO8nX6yCHLSHhQy3hvMqvG9PtMq2S/ENzFsiofZDsuzh4h1wuLE 73SR9qooI4biKayy2Ec+XSYZAx/FsPqXJnrctFFrHhCAjrjHgUisS/CoAmbjp1dmSkS5 2HHClB8ov20L4JOYqnbyjuY6PzCM7wvXjHCIRtvI/lTgz0K8X4+4KcClkEP6NfvDC7O3 6H2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718049734; x=1718654534; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=AJ8UM1s6ZTJn13AbHsqwawuk5c2y2O1BPJs84WdGbks=; b=fHRm7z0f0iJ4Gqnh8SWOdlrw/7+srRjy5INGJyQs1/L2eXzuFFkWKi0bP9DpB/GSNJ LBizJdPYK/djawUdeMNfn7OlIpk7ZFvWvUAl9eOPF7OP2Avdr1vYMuVbLySHkl8oFuaj OwU/SCIBxa+eIWdIGkNECECcg+93hrgqMRuJPD8ECrUe5XLkp+elzk/gs5Y7o6VqjIuv X6m2f/LA7E+5Avly9Qx0V2A/tmTtmAedIyR41o+HyQfid94aDiq5GgpNy3UJKP+jW807 zQbXUw9AF7w2T7Y1JegDG7KhMSyvdSJSq8MNNvT90BDeqS4NRwgSugIqgmGZJK9HEUAz GojQ== X-Gm-Message-State: AOJu0YxuLPHN6YrA28+oVsKGKgOEhfGgyhitK49Smfl2Eh1y0WwiQ24j oI5fddQMF67+8WHI6s5zQ+z2sFIeSNK+tbCngniXG3W7LkJ7gExt X-Google-Smtp-Source: AGHT+IE/OTxW3n40ORejK/fe8rh8gbu3ClcmrtU9UP7PaUS7fKM0sBnPAojCTnQ+A+q1CDz80qQnog== X-Received: by 2002:a05:6830:20d1:b0:6f9:9098:7c9c with SMTP id 46e09a7af769-6f990987d70mr5957252a34.26.1718049734297; Mon, 10 Jun 2024 13:02:14 -0700 (PDT) Received: from gnu-tgl-3.localdomain ([172.58.109.230]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-6f9c758602dsm372753a34.80.2024.06.10.13.02.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jun 2024 13:02:13 -0700 (PDT) Received: from gnu-tgl-3.. (localhost [IPv6:::1]) by gnu-tgl-3.localdomain (Postfix) with ESMTP id 612D1C01F3; Mon, 10 Jun 2024 13:02:08 -0700 (PDT) From: "H.J. Lu" To: libc-alpha@sourceware.org Cc: Ian Jordan , Sam James Subject: [PATCH] x86: Properly set MINIMUM_X86_ISA_LEVEL for i386 [BZ #31867] Date: Mon, 10 Jun 2024 13:02:06 -0700 Message-ID: <20240610200206.3412244-1-hjl.tools@gmail.com> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 X-Spam-Status: No, score=-3021.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org On i386, set the default minimum ISA level to 0, not 1 (baseline which includes SSE2). There are no changes in config.h nor in config.make on x86-64. This fixes BZ #31867. Signed-off-by: H.J. Lu Tested-by: Ian Jordan Reviewed-by: Sam James Reviewed-by: Florian Weimer --- sysdeps/x86/configure | 8 ++++++-- sysdeps/x86/configure.ac | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/sysdeps/x86/configure b/sysdeps/x86/configure index d28d9bcb29..1e2325d0d7 100644 --- a/sysdeps/x86/configure +++ b/sysdeps/x86/configure @@ -139,8 +139,10 @@ libc_cv_have_x86_isa_level=4 libc_cv_have_x86_isa_level=3 #elif MINIMUM_X86_ISA_LEVEL == 2 libc_cv_have_x86_isa_level=2 -#else +#elif defined __x86_64__ libc_cv_have_x86_isa_level=baseline +#else +libc_cv_have_x86_isa_level=MINIMUM_X86_ISA_LEVEL #endif EOF eval `${CC-cc} $CFLAGS $CPPFLAGS $ISAFLAG -I$srcdir -E conftest.c | grep libc_cv_have_x86_isa_level` @@ -148,8 +150,10 @@ EOF fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_have_x86_isa_level" >&5 printf "%s\n" "$libc_cv_have_x86_isa_level" >&6; } -else +elif test $base_machine = x86_64; then libc_cv_have_x86_isa_level=baseline +else + libc_cv_have_x86_isa_level=0 fi if test $libc_cv_have_x86_isa_level = baseline; then printf "%s\n" "#define MINIMUM_X86_ISA_LEVEL 1" >>confdefs.h diff --git a/sysdeps/x86/configure.ac b/sysdeps/x86/configure.ac index 5b0acd03d2..0b32fdfd4f 100644 --- a/sysdeps/x86/configure.ac +++ b/sysdeps/x86/configure.ac @@ -96,14 +96,18 @@ libc_cv_have_x86_isa_level=4 libc_cv_have_x86_isa_level=3 #elif MINIMUM_X86_ISA_LEVEL == 2 libc_cv_have_x86_isa_level=2 -#else +#elif defined __x86_64__ libc_cv_have_x86_isa_level=baseline +#else +libc_cv_have_x86_isa_level=MINIMUM_X86_ISA_LEVEL #endif EOF eval `${CC-cc} $CFLAGS $CPPFLAGS $ISAFLAG -I$srcdir -E conftest.c | grep libc_cv_have_x86_isa_level` rm -rf conftest*]) -else +elif test $base_machine = x86_64; then libc_cv_have_x86_isa_level=baseline +else + libc_cv_have_x86_isa_level=0 fi if test $libc_cv_have_x86_isa_level = baseline; then AC_DEFINE_UNQUOTED(MINIMUM_X86_ISA_LEVEL, 1)