From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x435.google.com (mail-pf1-x435.google.com [IPv6:2607:f8b0:4864:20::435]) by sourceware.org (Postfix) with ESMTPS id 13EAD3858412 for ; Mon, 14 Feb 2022 14:44:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 13EAD3858412 Received: by mail-pf1-x435.google.com with SMTP id d187so29552272pfa.10 for ; Mon, 14 Feb 2022 06:44:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=eRsElYSVDPjlligevCSUEOBHO+MzAG4X2nLyJwmcY+o=; b=oJ9D7hjqAZYitwLZWVaxDsNoqsyAI8u4WVreQrLZr0m8tc5XGQbH9o0W+hx2s+8PV0 Qc0phf+gykJH/agXkVqixe8kGcUOqaDd8X5rVPXqMCKVQH0wDQ5cip7wyjyBicVOyvIQ F0+p1Qz6m00Ilbpc/IoOcCxWl6O6ZTLeysqIjtcA0d8xh/KbEVicJGu8YkJsuym5aex1 RotV7MxcI2SSvoHJukcHuF0dD2On5JLX3elX1nWOrRGXVdRlC8T3N1YCvevzwCrWKa5/ oJRrZCRsJ5Ps9EFMl9Q7Lfs1gu+ntUcAQCIRKI7p/SYA+IuhtoOkTShfjyOpsyj7022z iN5A== X-Gm-Message-State: AOAM533HY9f1omCvMnkZWgEgqTrR8tP0MnF0nzOe/izjBHoxEAKNSt6b 3ad/pnRAPJBUpP3xAP7iBP9hH4LWSfPh7bQQucrArDDT X-Google-Smtp-Source: ABdhPJy79qhNSUJfokKOZUEA0Sz7aeMXyACx7i7QnYaT4A1jGYstcuHMv4NPZU5ehC46gQm+PRvjrjasy9hQhfTpPo4= X-Received: by 2002:a65:414a:: with SMTP id x10mr56760pgp.125.1644849891882; Mon, 14 Feb 2022 06:44:51 -0800 (PST) MIME-Version: 1.0 References: <20220207221142.165641-1-hjl.tools@gmail.com> In-Reply-To: <20220207221142.165641-1-hjl.tools@gmail.com> From: "H.J. Lu" Date: Mon, 14 Feb 2022 06:44:15 -0800 Message-ID: Subject: Re: [PATCH] x86/configure.ac: Define PI_STATIC_AND_HIDDEN/SUPPORT_STATIC_PIE To: GNU C Library Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3026.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.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-List-Received-Date: Mon, 14 Feb 2022 14:44:58 -0000 On Mon, Feb 7, 2022 at 2:11 PM H.J. Lu wrote: > > 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]) > -- > 2.34.1 > I am checking this patch. -- H.J.