From: Jie Zhang Date: Thu, 6 Sep 2007 00:09:05 +0000 (+0000) Subject: config.gcc (tm_file): Add linux.h for bfin*-uclinux*. X-Git-Tag: releases/gcc-4.3.0~2843 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cfb6473a78fa39128121aa2b178c88911754ab2d;p=thirdparty%2Fgcc.git config.gcc (tm_file): Add linux.h for bfin*-uclinux*. * config.gcc (tm_file): Add linux.h for bfin*-uclinux*. (tm_defines): Define UCLIBC_DEFAULT to 1. (extra_options): Add linux.opt. * config/bfin/linux.h (CPLUSPLUS_CPP_SPEC): Don't define. (CRT_CALL_STATIC_FUNCTION): Likewise. (NO_IMPLICIT_EXTERN_C): Likewise. (TARGET_OS_CPP_BUILTINS): Define as LINUX_TARGET_OS_CPP_BUILTINS. * config/bfin/elf.h (OBJECT_FORMAT_ELF): Don't define. * config/bfin/uclinux.h (CPLUSPLUS_CPP_SPEC): Don't define. (ENDFILE_SPEC): Don't define. (LIB_SPEC): Likewise. (CRT_CALL_STATIC_FUNCTION): Likewise. (NO_IMPLICIT_EXTERN_C): Likewise. (LINUX_TARGET_OS_CPP_BUILTINS): Likewise. (TARGET_OS_CPP_BUILTINS): Define as LINUX_TARGET_OS_CPP_BUILTINS. From-SVN: r128163 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1130e2181313..5d15a621f762 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,21 @@ +2007-09-06 Jie Zhang + + * config.gcc (tm_file): Add linux.h for bfin*-uclinux*. + (tm_defines): Define UCLIBC_DEFAULT to 1. + (extra_options): Add linux.opt. + * config/bfin/linux.h (CPLUSPLUS_CPP_SPEC): Don't define. + (CRT_CALL_STATIC_FUNCTION): Likewise. + (NO_IMPLICIT_EXTERN_C): Likewise. + (TARGET_OS_CPP_BUILTINS): Define as LINUX_TARGET_OS_CPP_BUILTINS. + * config/bfin/elf.h (OBJECT_FORMAT_ELF): Don't define. + * config/bfin/uclinux.h (CPLUSPLUS_CPP_SPEC): Don't define. + (ENDFILE_SPEC): Don't define. + (LIB_SPEC): Likewise. + (CRT_CALL_STATIC_FUNCTION): Likewise. + (NO_IMPLICIT_EXTERN_C): Likewise. + (LINUX_TARGET_OS_CPP_BUILTINS): Likewise. + (TARGET_OS_CPP_BUILTINS): Define as LINUX_TARGET_OS_CPP_BUILTINS. + 2007-09-06 Jan Hubicka * i386.c (ix86_expand_lround, ix86_expand_round): Update call of diff --git a/gcc/config.gcc b/gcc/config.gcc index 0eecd7ef90c5..18160f270ce0 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -817,8 +817,10 @@ bfin*-elf*) use_collect2=no ;; bfin*-uclinux*) - tm_file="${tm_file} dbxelf.h elfos.h bfin/elf.h bfin/uclinux.h" + tm_file="${tm_file} dbxelf.h elfos.h bfin/elf.h linux.h bfin/uclinux.h" tmake_file=bfin/t-bfin-uclinux + tm_defines="${tm_defines} UCLIBC_DEFAULT=1" + extra_options="${extra_options} linux.opt" use_collect2=no ;; bfin*-linux-uclibc*) diff --git a/gcc/config/bfin/elf.h b/gcc/config/bfin/elf.h index a8ef51d060c9..c43ca11cdeeb 100644 --- a/gcc/config/bfin/elf.h +++ b/gcc/config/bfin/elf.h @@ -1,5 +1,3 @@ -#define OBJECT_FORMAT_ELF - #undef STARTFILE_SPEC #define STARTFILE_SPEC "\ %{msim:%{!shared:crt0%O%s}} \ diff --git a/gcc/config/bfin/linux.h b/gcc/config/bfin/linux.h index 8e063bd1c967..b5732011224a 100644 --- a/gcc/config/bfin/linux.h +++ b/gcc/config/bfin/linux.h @@ -2,31 +2,8 @@ #define SUBTARGET_DRIVER_SELF_SPECS \ "%{!mno-fdpic:-mfdpic}", -/* The GNU C++ standard library requires that these macros be defined. */ -#undef CPLUSPLUS_CPP_SPEC -#define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)" - -#ifdef __BFIN_FDPIC__ -#define CRT_CALL_STATIC_FUNCTION(SECTION_OP, FUNC) \ -asm (SECTION_OP); \ -asm ("P3 = [SP + 20];\n\tcall " USER_LABEL_PREFIX #FUNC ";"); \ -asm (TEXT_SECTION_ASM_OP); -#endif - -#define NO_IMPLICIT_EXTERN_C - #undef TARGET_OS_CPP_BUILTINS -#define TARGET_OS_CPP_BUILTINS() \ - do \ - { \ - LINUX_TARGET_OS_CPP_BUILTINS(); \ - if (flag_pic) \ - { \ - builtin_define ("__PIC__"); \ - builtin_define ("__pic__"); \ - } \ - } \ - while (0) +#define TARGET_OS_CPP_BUILTINS() LINUX_TARGET_OS_CPP_BUILTINS() #undef STARTFILE_SPEC #define STARTFILE_SPEC \ diff --git a/gcc/config/bfin/uclinux.h b/gcc/config/bfin/uclinux.h index 954e66a49293..041f2eea8515 100644 --- a/gcc/config/bfin/uclinux.h +++ b/gcc/config/bfin/uclinux.h @@ -1,48 +1,8 @@ -/* The GNU C++ standard library requires that these macros be defined. */ -#undef CPLUSPLUS_CPP_SPEC -#define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)" - #undef STARTFILE_SPEC #define STARTFILE_SPEC \ "%{!shared: crt1%O%s} crti%O%s crtbegin%O%s crtlibid%O%s" -#undef ENDFILE_SPEC -#define ENDFILE_SPEC \ - "crtend%O%s crtn%O%s" - -#undef LIB_SPEC -#define LIB_SPEC "%{pthread:-lpthread} -lc" - -#ifdef __BFIN_FDPIC__ -#define CRT_CALL_STATIC_FUNCTION(SECTION_OP, FUNC) \ -asm (SECTION_OP); \ -asm ("P3 = [SP + 20];\n\tcall " USER_LABEL_PREFIX #FUNC ";"); \ -asm (TEXT_SECTION_ASM_OP); -#endif - -#define NO_IMPLICIT_EXTERN_C - -#define LINUX_TARGET_OS_CPP_BUILTINS() \ - do { \ - builtin_define ("__gnu_linux__"); \ - builtin_define_std ("linux"); \ - builtin_define_std ("unix"); \ - builtin_assert ("system=linux"); \ - builtin_assert ("system=unix"); \ - builtin_assert ("system=posix"); \ - } while (0) - -#define TARGET_OS_CPP_BUILTINS() \ - do \ - { \ - LINUX_TARGET_OS_CPP_BUILTINS(); \ - if (flag_pic) \ - { \ - builtin_define ("__PIC__"); \ - builtin_define ("__pic__"); \ - } \ - } \ - while (0) +#define TARGET_OS_CPP_BUILTINS() LINUX_TARGET_OS_CPP_BUILTINS() #define MD_UNWIND_SUPPORT "config/bfin/linux-unwind.h"