public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] x86/configure.ac: Define PI_STATIC_AND_HIDDEN/SUPPORT_STATIC_PIE
@ 2022-02-07 22:11 H.J. Lu
  2022-02-14 14:44 ` H.J. Lu
  0 siblings, 1 reply; 2+ messages in thread
From: H.J. Lu @ 2022-02-07 22:11 UTC (permalink / raw)
  To: 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])
-- 
2.34.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] x86/configure.ac: Define PI_STATIC_AND_HIDDEN/SUPPORT_STATIC_PIE
  2022-02-07 22:11 [PATCH] x86/configure.ac: Define PI_STATIC_AND_HIDDEN/SUPPORT_STATIC_PIE H.J. Lu
@ 2022-02-14 14:44 ` H.J. Lu
  0 siblings, 0 replies; 2+ messages in thread
From: H.J. Lu @ 2022-02-14 14:44 UTC (permalink / raw)
  To: GNU C Library

On Mon, Feb 7, 2022 at 2:11 PM H.J. Lu <hjl.tools@gmail.com> 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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-02-14 14:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-07 22:11 [PATCH] x86/configure.ac: Define PI_STATIC_AND_HIDDEN/SUPPORT_STATIC_PIE H.J. Lu
2022-02-14 14:44 ` H.J. Lu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).