Message ID | CACysShhKGY1UCUthvTmDSeVS7D4QV=BpAD2VbzmPv7wLYYFqhA@mail.gmail.com |
---|---|
State | New |
Headers | show |
On Wed, Aug 21, 2013 at 11:21:32PM +0400, Alexander Ivchenko wrote: > I'm sorry for that. The following patch cured my build of those > targets; it is also preserving the initial presence of c99. There were > plenty of targets that were changed by my patch, I hope this time I > didn't miss anything. S/390 bootstrap still fails. The reason is that when we set tm_file/tm_p_file in config.gcc we do not append to the existing content so your adjustments done before are ignored and gcc complains about unknown linux_android_libc_has_function. However, since with s390 Linux and TPF we only target GNU Linux systems with Glibc we can default to gnu_libc_has_functions anyway: Index: gcc/config/s390/linux.h =================================================================== *** gcc/config/s390/linux.h.orig 2013-01-14 07:48:06.000000000 +0000 --- gcc/config/s390/linux.h 2013-08-22 07:57:46.006014197 +0000 *************** along with GCC; see the file COPYING3. *** 87,90 **** --- 87,93 ---- /* Define if long doubles should be mangled as 'g'. */ #define TARGET_ALTERNATE_LONG_DOUBLE_MANGLING + #undef TARGET_LIBC_HAS_FUNCTION + #define TARGET_LIBC_HAS_FUNCTION gnu_libc_has_function + #endif Index: gcc/config/s390/tpf.h =================================================================== *** gcc/config/s390/tpf.h.orig 2013-08-22 07:01:48.000000000 +0000 --- gcc/config/s390/tpf.h 2013-08-22 07:57:27.706013534 +0000 *************** along with GCC; see the file COPYING3. *** 111,118 **** /* IBM copies these libraries over with these names. */ #define MATH_LIBRARY "CLBM" #define LIBSTDCXX "CPP2" - #endif /* ! _TPF_H */ - /* We redefine this hook so the version from elfos.h header won't be used. */ #undef TARGET_LIBC_HAS_FUNCTION ! #define TARGET_LIBC_HAS_FUNCTION default_libc_has_function --- 111,118 ---- /* IBM copies these libraries over with these names. */ #define MATH_LIBRARY "CLBM" #define LIBSTDCXX "CPP2" #undef TARGET_LIBC_HAS_FUNCTION ! #define TARGET_LIBC_HAS_FUNCTION gnu_libc_has_function ! ! #endif /* ! _TPF_H */
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6e27be2..02679f3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,14 @@ +2013-08-21 Alexander Ivchenko <alexander.ivchenko@intel.com> + + * config/linux-android.c (linux_android_libc_has_function): Fix + checks for libc. + * config/bfin/uclinux.h: Define TARGET_LIBC_HAS_FUNCTION as + no_c99_libc_has_function. + * config/c6x/uclinux-elf.h: Ditto. + * config/lm32/uclinux-elf.h: Ditto. + * config/m68k/uclinux.h: Ditto. + * config/moxie/uclinux.h: Ditto. + 2013-08-21 Joern Rennecke <joern.rennecke@embecosm.com> * reload.h (struct reg_equivs): Rename to .. diff --git a/gcc/config/bfin/uclinux.h b/gcc/config/bfin/uclinux.h index ca0f4ee..63cba99 100644 --- a/gcc/config/bfin/uclinux.h +++ b/gcc/config/bfin/uclinux.h @@ -44,3 +44,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #define TARGET_SUPPORTS_SYNC_CALLS 1 #define SUBTARGET_FDPIC_NOT_SUPPORTED + +#undef TARGET_LIBC_HAS_FUNCTION +#define TARGET_LIBC_HAS_FUNCTION no_c99_libc_has_function diff --git a/gcc/config/c6x/uclinux-elf.h b/gcc/config/c6x/uclinux-elf.h index 5d61f4d..fa0937e 100644 --- a/gcc/config/c6x/uclinux-elf.h +++ b/gcc/config/c6x/uclinux-elf.h @@ -62,3 +62,5 @@ : "0" (_beg), "b" (_end), "b" (_scno)); \ } +#undef TARGET_LIBC_HAS_FUNCTION +#define TARGET_LIBC_HAS_FUNCTION no_c99_libc_has_function diff --git a/gcc/config/linux-android.c b/gcc/config/linux-android.c index 4a4b48d..e9d9e9a 100644 --- a/gcc/config/linux-android.c +++ b/gcc/config/linux-android.c @@ -35,9 +35,9 @@ linux_android_has_ifunc_p (void) bool linux_android_libc_has_function (enum function_class fn_class) { - if (OPTION_GLIBC) + if (linux_libc == LIBC_GLIBC) return true; - if (OPTION_BIONIC) + if (linux_libc == LIBC_BIONIC) if (fn_class == function_c94 || fn_class == function_c99_misc || fn_class == function_sincos) diff --git a/gcc/config/lm32/uclinux-elf.h b/gcc/config/lm32/uclinux-elf.h index 3a556d7..a5e8163 100644 --- a/gcc/config/lm32/uclinux-elf.h +++ b/gcc/config/lm32/uclinux-elf.h @@ -77,3 +77,5 @@ #undef CC1_SPEC #define CC1_SPEC "%{G*} %{!fno-PIC:-fPIC}" +#undef TARGET_LIBC_HAS_FUNCTION +#define TARGET_LIBC_HAS_FUNCTION no_c99_libc_has_function diff --git a/gcc/config/m68k/uclinux.h b/gcc/config/m68k/uclinux.h index 8d74312..b1af7d2 100644 --- a/gcc/config/m68k/uclinux.h +++ b/gcc/config/m68k/uclinux.h @@ -67,3 +67,6 @@ along with GCC; see the file COPYING3. If not see sections. */ #undef M68K_OFFSETS_MUST_BE_WITHIN_SECTIONS_P #define M68K_OFFSETS_MUST_BE_WITHIN_SECTIONS_P 1 + +#undef TARGET_LIBC_HAS_FUNCTION +#define TARGET_LIBC_HAS_FUNCTION no_c99_libc_has_function diff --git a/gcc/config/moxie/uclinux.h b/gcc/config/moxie/uclinux.h index 498037e..85c65f2 100644 --- a/gcc/config/moxie/uclinux.h +++ b/gcc/config/moxie/uclinux.h @@ -37,3 +37,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --wrap=mmap --wrap=munmap --wrap=alloca\ %{fmudflapth: --wrap=pthread_create\ }} %{fmudflap|fmudflapth: --wrap=main}" + +#undef TARGET_LIBC_HAS_FUNCTION