* Use %ifdef in sysdeps/unix/sysv/linux/powerpc/powerpc64/shlib-versions
@ 2014-09-09 17:19 Joseph S. Myers
2014-09-09 21:46 ` Roland McGrath
0 siblings, 1 reply; 4+ messages in thread
From: Joseph S. Myers @ 2014-09-09 17:19 UTC (permalink / raw)
To: libc-alpha; +Cc: Adhemerval Zanella
This patch, relative to a tree with
<https://sourceware.org/ml/libc-alpha/2014-09/msg00114.html> and
<https://sourceware.org/ml/libc-alpha/2014-09/msg00129.html> (pending
review) applied, 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.)
Not tested; this needs testing for both BE and LE that it produces
binaries with the expected symbol versions.
2014-09-09 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].
diff --git a/config.h.in b/config.h.in
index 7da1a9f..ed26221 100644
--- a/config.h.in
+++ b/config.h.in
@@ -257,4 +257,7 @@
/* 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
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure
index aa1302a..eb46415 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure
@@ -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"
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac
index de04689..0822915 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac
@@ -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
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/shlib-versions b/sysdeps/unix/sysv/linux/powerpc/powerpc64/shlib-versions
index f648023..1febda4 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/shlib-versions
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/shlib-versions
@@ -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
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Use %ifdef in sysdeps/unix/sysv/linux/powerpc/powerpc64/shlib-versions
2014-09-09 17:19 Use %ifdef in sysdeps/unix/sysv/linux/powerpc/powerpc64/shlib-versions Joseph S. Myers
@ 2014-09-09 21:46 ` Roland McGrath
2014-09-09 21:56 ` Joseph S. Myers
0 siblings, 1 reply; 4+ messages in thread
From: Roland McGrath @ 2014-09-09 21:46 UTC (permalink / raw)
To: Joseph S. Myers; +Cc: libc-alpha, Adhemerval Zanella
> +/* The PowerPC64 ELFv2 ABI is being used.
> +#undef HAVE_ELFV2_ABI
Unterminated comment.
Otherwise seems OK to me.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Use %ifdef in sysdeps/unix/sysv/linux/powerpc/powerpc64/shlib-versions
2014-09-09 21:46 ` Roland McGrath
@ 2014-09-09 21:56 ` Joseph S. Myers
2014-09-12 3:19 ` Adhemerval Zanella
0 siblings, 1 reply; 4+ messages in thread
From: Joseph S. Myers @ 2014-09-09 21:56 UTC (permalink / raw)
To: Roland McGrath; +Cc: libc-alpha, Adhemerval Zanella
On Tue, 9 Sep 2014, Roland McGrath wrote:
> > +/* The PowerPC64 ELFv2 ABI is being used.
> > +#undef HAVE_ELFV2_ABI
>
> Unterminated comment.
>
> Otherwise seems OK to me.
Thanks, here's a version with that corrected for convenience in testing.
diff --git a/config.h.in b/config.h.in
index 7da1a9f..ed26221 100644
--- a/config.h.in
+++ b/config.h.in
@@ -257,4 +257,7 @@
/* 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
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure
index aa1302a..eb46415 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure
@@ -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"
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac
index de04689..0822915 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac
@@ -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
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/shlib-versions b/sysdeps/unix/sysv/linux/powerpc/powerpc64/shlib-versions
index f648023..1febda4 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/shlib-versions
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/shlib-versions
@@ -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
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Use %ifdef in sysdeps/unix/sysv/linux/powerpc/powerpc64/shlib-versions
2014-09-09 21:56 ` Joseph S. Myers
@ 2014-09-12 3:19 ` Adhemerval Zanella
0 siblings, 0 replies; 4+ messages in thread
From: Adhemerval Zanella @ 2014-09-12 3:19 UTC (permalink / raw)
To: Joseph S. Myers, Roland McGrath; +Cc: libc-alpha
On 09-09-2014 18:55, Joseph S. Myers wrote:
> On Tue, 9 Sep 2014, Roland McGrath wrote:
>
>>> +/* The PowerPC64 ELFv2 ABI is being used.
>>> +#undef HAVE_ELFV2_ABI
>> Unterminated comment.
>>
>> Otherwise seems OK to me.
> Thanks, here's a version with that corrected for convenience in testing.
Checked on powerpc64 and powerpc64le, thanks.
>
> diff --git a/config.h.in b/config.h.in
> index 7da1a9f..ed26221 100644
> --- a/config.h.in
> +++ b/config.h.in
> @@ -257,4 +257,7 @@
> /* 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
> diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure
> index aa1302a..eb46415 100644
> --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure
> +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure
> @@ -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"
> diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac
> index de04689..0822915 100644
> --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac
> +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac
> @@ -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
> diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/shlib-versions b/sysdeps/unix/sysv/linux/powerpc/powerpc64/shlib-versions
> index f648023..1febda4 100644
> --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/shlib-versions
> +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/shlib-versions
> @@ -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
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-09-12 3:19 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-09 17:19 Use %ifdef in sysdeps/unix/sysv/linux/powerpc/powerpc64/shlib-versions Joseph S. Myers
2014-09-09 21:46 ` Roland McGrath
2014-09-09 21:56 ` Joseph S. Myers
2014-09-12 3:19 ` Adhemerval Zanella
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).