mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-04 10:50:07 +00:00
7ffa942302
This patch makes the configure adds -D_CALL_ELF=1 when compiler does not define _CALL_ELF (versions before powerpc64le support). It cleans up compiler warnings on old compiler where _CALL_ELF is not defined on powerpc64(be) builds. It does by add a new config.make variable for configure-deduced CPPFLAGS and accumulate into that (confix-extra-cppflags). It also generalizes libc_extra_cflags so it accumulates in sysdeps configure fragmenets.
26 lines
1.0 KiB
Plaintext
26 lines
1.0 KiB
Plaintext
GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
|
|
# Local configure fragment for sysdeps/unix/sysv/linux/powerpc/powerpc64/.
|
|
|
|
# Define default-abi according to compiler flags.
|
|
AC_CACHE_CHECK([whether the compiler is using the PowerPC64 ELFv2 ABI],
|
|
[libc_cv_ppc64_elfv2_abi],
|
|
[AC_EGREP_CPP(yes,[#if _CALL_ELF == 2
|
|
yes
|
|
#endif
|
|
], 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])
|
|
else
|
|
LIBC_CONFIG_VAR([default-abi], [64-v1])
|
|
# Compiler that do not support ELFv2 ABI does not define _CALL_ELF
|
|
AC_CACHE_CHECK([whether the compiler defines _CALL_ELF],
|
|
[libc_cv_ppc64_def_call_elf],
|
|
[AC_EGREP_CPP(yes,[#ifdef _CALL_ELF
|
|
yes
|
|
#endif
|
|
], libc_cv_ppc64_def_call_elf=yes, libc_cv_ppc64_def_call_elf=no)])
|
|
if test $libc_cv_ppc64_def_call_elf = no; then
|
|
libc_extra_cppflags="$libc_extra_cppflags -D_CALL_ELF=1"
|
|
fi
|
|
fi
|