OSDN Git Service

* config.gcc (tm_file): Add linux.h for bfin*-uclinux*.
authorjiez <jiez@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 6 Sep 2007 00:09:05 +0000 (00:09 +0000)
committerjiez <jiez@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 6 Sep 2007 00:09:05 +0000 (00:09 +0000)
(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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@128163 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config.gcc
gcc/config/bfin/elf.h
gcc/config/bfin/linux.h
gcc/config/bfin/uclinux.h

index 1130e21..5d15a62 100644 (file)
@@ -1,3 +1,21 @@
+2007-09-06  Jie Zhang  <jie.zhang@analog.com>
+
+       * 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  <jh@suse.cz>
 
        * i386.c (ix86_expand_lround, ix86_expand_round): Update call of
index 0eecd7e..18160f2 100644 (file)
@@ -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*)
index a8ef51d..c43ca11 100644 (file)
@@ -1,5 +1,3 @@
-#define OBJECT_FORMAT_ELF
-
 #undef  STARTFILE_SPEC
 #define STARTFILE_SPEC "\
 %{msim:%{!shared:crt0%O%s}} \
index 8e063bd..b573201 100644 (file)
@@ -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 \
index 954e66a..041f2ee 100644 (file)
@@ -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"