]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Use %ifdef in sysdeps/unix/sysv/linux/powerpc/powerpc64/shlib-versions.
authorJoseph Myers <joseph@codesourcery.com>
Fri, 12 Sep 2014 12:25:36 +0000 (12:25 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Fri, 12 Sep 2014 12:25:36 +0000 (12:25 +0000)
This patch makes
sysdeps/unix/sysv/linux/powerpc/powerpc64/shlib-versions use %ifdef
conditionals around the different symbol version definitions for big
and little endian.  (It doesn't actually change the host patterns used
for those definitions; the point is to make it possible to remove the
first column from shlib-versions by eliminating the last case where it
would be harmful for it to be treated as .*-.*-.*.)  The conditional
is based on the ELFv1/ELFv2 distinction rather than BE/LE, since
that's what's already tested in configure and used for the ld.so
soname in the Makefiles.  (Of course if BE ELFv2 were supported in
future, it would get new symbol versions and so need new
conditionals.)

* sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac
(HAVE_ELFV2_ABI): AC_DEFINE in ELFv2 case.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/configure:
Regenerated.
* config.h.in (HAVE_ELFV2_ABI): New macro undefine.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/shlib-versions:
Condition symbol version definitions on [HAVE_ELFV2_ABI].

ChangeLog
config.h.in
sysdeps/unix/sysv/linux/powerpc/powerpc64/configure
sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac
sysdeps/unix/sysv/linux/powerpc/powerpc64/shlib-versions

index fdbe22feec81ff5a575fde4f08ea35ff528c2657..fbd013b39c5b6637be1f77722a97d32725cb95d8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2014-09-12  Joseph Myers  <joseph@codesourcery.com>
 
+       * sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac
+       (HAVE_ELFV2_ABI): AC_DEFINE in ELFv2 case.
+       * sysdeps/unix/sysv/linux/powerpc/powerpc64/configure:
+       Regenerated.
+       * config.h.in (HAVE_ELFV2_ABI): New macro undefine.
+       * sysdeps/unix/sysv/linux/powerpc/powerpc64/shlib-versions:
+       Condition symbol version definitions on [HAVE_ELFV2_ABI].
+
        * shlib-versions: Remove OS-specific entries.  Moved to files in
        sysdeps.
        * sysdeps/mach/hurd/shlib-versions: New file.
index 7da1a9f6f892e377242e672d7c10726f9629a417..fcbe8ad808636c8038a56ef77473e5c7391b175f 100644 (file)
 /* Define if using the IEEE 754-2008 NaN encoding on the MIPS target.  */
 #undef HAVE_MIPS_NAN2008
 
+/* The PowerPC64 ELFv2 ABI is being used.  */
+#undef HAVE_ELFV2_ABI
+
 #endif
index aa1302ab118bd217b301942117c2b9c8ffa7fe47..eb46415e2d494e0ab8ec00f15903bdef42e1529f 100644 (file)
@@ -173,6 +173,9 @@ $as_echo "$libc_cv_ppc64_elfv2_abi" >&6; }
 if test $libc_cv_ppc64_elfv2_abi = yes; then
   config_vars="$config_vars
 default-abi = 64-v2"
+  # For shlib-versions.
+  $as_echo "#define HAVE_ELFV2_ABI 1" >>confdefs.h
+
 else
   config_vars="$config_vars
 default-abi = 64-v1"
index de04689536a7bad7d326307334acee17bdb0dbaf..0822915c4306729f5ac578c4b904938289da60b8 100644 (file)
@@ -12,6 +12,8 @@ AC_CACHE_CHECK([whether the compiler is using the PowerPC64 ELFv2 ABI],
   ], libc_cv_ppc64_elfv2_abi=yes, libc_cv_ppc64_elfv2_abi=no)])
 if test $libc_cv_ppc64_elfv2_abi = yes; then
   LIBC_CONFIG_VAR([default-abi], [64-v2])
+  # For shlib-versions.
+  AC_DEFINE(HAVE_ELFV2_ABI)
 else
   LIBC_CONFIG_VAR([default-abi], [64-v1])
   # Compiler that do not support ELFv2 ABI does not define _CALL_ELF
index f6480238c54d60f7ad056a9840525a6663722cc4..1febda46d015b6336c5ba3815e54f77c020f67f3 100644 (file)
@@ -1,4 +1,7 @@
-powerpc64-.*-linux.*   DEFAULT                 GLIBC_2.3
+%ifdef HAVE_ELFV2_ABI
 powerpc.*le-.*-linux.* DEFAULT                 GLIBC_2.17
-powerpc64-.*-linux.*   libpthread=0            GLIBC_2.3
 powerpc.*le-.*-linux.* libpthread=0            GLIBC_2.17
+%else
+powerpc64-.*-linux.*   DEFAULT                 GLIBC_2.3
+powerpc64-.*-linux.*   libpthread=0            GLIBC_2.3
+%endif