From patchwork Sat Feb 5 17:24:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 50831 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5E453385843B for ; Sat, 5 Feb 2022 17:26:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5E453385843B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1644081993; bh=INJyHCnD6uMT/SPam7iAqthgpd39BTfkuuYhPUAG/Uo=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=ZNsQ7MDSNkm8T+7YftDdafO50/jp3wIr5PjsqJL5+LSj3hJ9v38Pb16WlKHPeXKSG b2yCpyHsPsX0/gC1E4fQqS543q4+Nvf8sp5q9gDsgDE16sITV3fGUTL1v3SKOHnryu tlAgtiaxIWH9VNUcvABmsH1trxW7EQ1bYD5gyc+I= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pf1-x42e.google.com (mail-pf1-x42e.google.com [IPv6:2607:f8b0:4864:20::42e]) by sourceware.org (Postfix) with ESMTPS id 130B73858419 for ; Sat, 5 Feb 2022 17:24:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 130B73858419 Received: by mail-pf1-x42e.google.com with SMTP id n32so7905996pfv.11 for ; Sat, 05 Feb 2022 09:24:49 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=INJyHCnD6uMT/SPam7iAqthgpd39BTfkuuYhPUAG/Uo=; b=sQQ+2wvnxBhxjmMCiy1UPwDK0meWFKiTWHEw67Ok/o44j1NYnCvi/d/hyOaz1qRF8a 5/FMhagF6QpDQV3fYSE/MDaqy9iyT4k2dmUqhVo1q3G0DZMDwKI8x1aWW+3adgW/negP 2XvFqGZj4VU1QNWV02N79PShiLYpJyc++CmRdKG6KmxJmLkv4FRj5/ASIVPMKOJ+k1sK 3zwbJplbAU+m9hB8yDdcDxfoJPPB90znwevo6lHEbH3Y3KCq5/cUOpZk1r+OxzzSbb2o 7+tOvwoe4Zuf2pqd/zBbisbyZeQOhb+5Ytk99DMweZJNUuA/s7TWIb09u2Cz+w8HYT1l WDDw== X-Gm-Message-State: AOAM531cx4mnZLuAL6DLpQHLSDPTiZFBobylBg+McYqsDPAdKYGS4cVc kwnBpiHC9TZ8ZZQNxbBrAuo= X-Google-Smtp-Source: ABdhPJxqEla7rMkUwOmzvk0cPT983oFUK9+n5nz+uzx+/JyUwoEDYKcVJtW8ly/dKZilSkoZFJ842Q== X-Received: by 2002:a65:4c43:: with SMTP id l3mr3580067pgr.494.1644081888140; Sat, 05 Feb 2022 09:24:48 -0800 (PST) Received: from gnu-tgl-2.localdomain ([172.58.38.240]) by smtp.gmail.com with ESMTPSA id o9sm5979633pfw.86.2022.02.05.09.24.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Feb 2022 09:24:47 -0800 (PST) Received: from gnu-tgl-2.. (localhost [IPv6:::1]) by gnu-tgl-2.localdomain (Postfix) with ESMTP id 873413004AA; Sat, 5 Feb 2022 09:24:46 -0800 (PST) To: libc-alpha@sourceware.org Subject: [PATCH v2 4/7] x86/configure.ac: Define PI_STATIC_AND_HIDDEN/SUPPORT_STATIC_PIE Date: Sat, 5 Feb 2022 09:24:43 -0800 Message-Id: <20220205172446.652011-5-hjl.tools@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220205172446.652011-1-hjl.tools@gmail.com> References: <20220205172446.652011-1-hjl.tools@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-3029.8 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.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: "H.J. Lu via Libc-alpha" From: "H.J. Lu" Reply-To: "H.J. Lu" Cc: Joseph Myers Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" Move PI_STATIC_AND_HIDDEN and SUPPORT_STATIC_PIE to sysdeps/x86/configure.ac. --- sysdeps/i386/configure | 6 ------ sysdeps/i386/configure.ac | 7 ------- sysdeps/x86/configure | 6 ++++++ sysdeps/x86/configure.ac | 7 +++++++ sysdeps/x86_64/configure | 6 ------ sysdeps/x86_64/configure.ac | 7 ------- 6 files changed, 13 insertions(+), 26 deletions(-) diff --git a/sysdeps/i386/configure b/sysdeps/i386/configure index ed46d53314..af50c5bfab 100644 --- a/sysdeps/i386/configure +++ b/sysdeps/i386/configure @@ -83,13 +83,7 @@ $as_echo "$libc_cv_ld_static_pie" >&6; } fi fi -$as_echo "#define PI_STATIC_AND_HIDDEN 1" >>confdefs.h - - if test x"$multi_arch" != xno; then $as_echo "#define NO_HIDDEN_EXTERN_FUNC_IN_PIE 1" >>confdefs.h fi - -$as_echo "#define SUPPORT_STATIC_PIE 1" >>confdefs.h - diff --git a/sysdeps/i386/configure.ac b/sysdeps/i386/configure.ac index a6a0672835..234ef2454a 100644 --- a/sysdeps/i386/configure.ac +++ b/sysdeps/i386/configure.ac @@ -53,15 +53,8 @@ rm -f conftest*]) fi fi -dnl It is always possible to access static and hidden symbols in an -dnl position independent way. -AC_DEFINE(PI_STATIC_AND_HIDDEN) - dnl When multi-arch is enabled, all external functions must be called dnl via PIC PLT in PIE, which requires setting up EBX register. if test x"$multi_arch" != xno; then AC_DEFINE(NO_HIDDEN_EXTERN_FUNC_IN_PIE) fi - -dnl Static PIE is supported. -AC_DEFINE(SUPPORT_STATIC_PIE) diff --git a/sysdeps/x86/configure b/sysdeps/x86/configure index 7bdbfdc6dc..46d436fddf 100644 --- a/sysdeps/x86/configure +++ b/sysdeps/x86/configure @@ -189,3 +189,9 @@ $as_echo "$libc_cv_have_x86_movbe" >&6; } fi config_vars="$config_vars enable-x86-isa-level = $libc_cv_include_x86_isa_level" + +$as_echo "#define PI_STATIC_AND_HIDDEN 1" >>confdefs.h + + +$as_echo "#define SUPPORT_STATIC_PIE 1" >>confdefs.h + diff --git a/sysdeps/x86/configure.ac b/sysdeps/x86/configure.ac index 10d5c2e0e5..918b636891 100644 --- a/sysdeps/x86/configure.ac +++ b/sysdeps/x86/configure.ac @@ -127,3 +127,10 @@ if test $libc_cv_include_x86_isa_level = yes; then fi fi LIBC_CONFIG_VAR([enable-x86-isa-level], [$libc_cv_include_x86_isa_level]) + +dnl It is always possible to access static and hidden symbols in an +dnl position independent way. +AC_DEFINE(PI_STATIC_AND_HIDDEN) + +dnl Static PIE is supported. +AC_DEFINE(SUPPORT_STATIC_PIE) diff --git a/sysdeps/x86_64/configure b/sysdeps/x86_64/configure index d4dd0aa7df..44b6055e55 100755 --- a/sysdeps/x86_64/configure +++ b/sysdeps/x86_64/configure @@ -27,11 +27,5 @@ if test x"$build_mathvec" = xnotset; then build_mathvec=yes fi -$as_echo "#define PI_STATIC_AND_HIDDEN 1" >>confdefs.h - - -$as_echo "#define SUPPORT_STATIC_PIE 1" >>confdefs.h - - test -n "$critic_missing" && as_fn_error $? " *** $critic_missing" "$LINENO" 5 diff --git a/sysdeps/x86_64/configure.ac b/sysdeps/x86_64/configure.ac index c4c748c1d0..1215dcb1e4 100644 --- a/sysdeps/x86_64/configure.ac +++ b/sysdeps/x86_64/configure.ac @@ -14,12 +14,5 @@ if test x"$build_mathvec" = xnotset; then build_mathvec=yes fi -dnl It is always possible to access static and hidden symbols in an -dnl position independent way. -AC_DEFINE(PI_STATIC_AND_HIDDEN) - -dnl Static PIE is supported. -AC_DEFINE(SUPPORT_STATIC_PIE) - test -n "$critic_missing" && AC_MSG_ERROR([ *** $critic_missing])