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
This commit is contained in:
Jie Zhang 2007-09-06 00:09:05 +00:00 committed by Jie Zhang
parent 37dc4ed1f0
commit cfb6473a78
5 changed files with 23 additions and 68 deletions

View 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

View 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*)

View File

@ -1,5 +1,3 @@
#define OBJECT_FORMAT_ELF
#undef STARTFILE_SPEC
#define STARTFILE_SPEC "\
%{msim:%{!shared:crt0%O%s}} \

View 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 \

View 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"