diff options
author | Bernd Schmidt <bernd.schmidt@analog.com> | 2007-03-05 14:55:37 +0000 |
---|---|---|
committer | Bernd Schmidt <bernds@gcc.gnu.org> | 2007-03-05 14:55:37 +0000 |
commit | 344189f9ec005682d1e5d6a700b91184e58538b8 (patch) | |
tree | 347dcf69ad8915a6018d8b9b3a024cda2d6a23b9 /gcc/config/bfin | |
parent | 9dc167ec4ad8d62e05511c9401f8b72bafb42e77 (diff) | |
download | gcc-344189f9ec005682d1e5d6a700b91184e58538b8.tar.gz |
config.host (bfin*-linux-uclibc*): Set extra_parts.
libgcc/:
* config.host (bfin*-linux-uclibc*): Set extra_parts.
gcc/:
* config.gcc (bfin*-uclinux*): Use t-bfin-uclinux.
(bfin*-linux-uclibc*): New configuration.
* config/linux.h (LINK_GCC_C_SEQUENCE_SPEC): Undefined before
defining.
* config/bfin/linux.h: New file.
* config/bfin/libgcc-bfin.ver: New file.
* config/bfin/t-bfin-uclinux: New file.
* config/bfin/t-bfin-linux: New file.
* config/bfin/uclinux.h (LINUX_TARGET_OS_CPP_BUILTINS): New macro.
(TARGET_OS_CPP_BUILTINS): New macro.
From-SVN: r122552
Diffstat (limited to 'gcc/config/bfin')
-rw-r--r-- | gcc/config/bfin/libgcc-bfin.ver | 285 | ||||
-rw-r--r-- | gcc/config/bfin/linux.h | 49 | ||||
-rw-r--r-- | gcc/config/bfin/t-bfin-linux | 34 | ||||
-rw-r--r-- | gcc/config/bfin/t-bfin-uclinux | 43 | ||||
-rw-r--r-- | gcc/config/bfin/uclinux.h | 22 |
5 files changed, 433 insertions, 0 deletions
diff --git a/gcc/config/bfin/libgcc-bfin.ver b/gcc/config/bfin/libgcc-bfin.ver new file mode 100644 index 00000000000..1afb78e9c82 --- /dev/null +++ b/gcc/config/bfin/libgcc-bfin.ver @@ -0,0 +1,285 @@ +GCC_3.0 { + # libgcc1 integer symbols + ___absvsi2 + ___addvsi3 + ___ashlsi3 + ___ashrsi3 + ___divsi3 + ___lshrsi3 + ___modsi3 + ___mulsi3 + ___mulvsi3 + ___negvsi2 + ___subvsi3 + ___udivsi3 + ___umodsi3 + + # libgcc1 floating point symbols + ___addsf3 + ___adddf3 + ___addxf3 + ___addtf3 + ___divsf3 + ___divdf3 + ___divxf3 + ___divtf3 + ___eqsf2 + ___eqdf2 + ___eqxf2 + ___eqtf2 + ___extenddfxf2 + ___extenddftf2 + ___extendsfdf2 + ___extendsfxf2 + ___extendsftf2 + ___fixsfsi + ___fixdfsi + ___fixxfsi + ___fixtfsi + ___floatsisf + ___floatsidf + ___floatsixf + ___floatsitf + ___gesf2 + ___gedf2 + ___gexf2 + ___getf2 + ___gtsf2 + ___gtdf2 + ___gtxf2 + ___gttf2 + ___lesf2 + ___ledf2 + ___lexf2 + ___letf2 + ___ltsf2 + ___ltdf2 + ___ltxf2 + ___lttf2 + ___mulsf3 + ___muldf3 + ___mulxf3 + ___multf3 + ___negsf2 + ___negdf2 + ___negxf2 + ___negtf2 + ___nesf2 + ___nedf2 + ___nexf2 + ___netf2 + ___subsf3 + ___subdf3 + ___subxf3 + ___subtf3 + ___truncdfsf2 + ___truncxfsf2 + ___trunctfsf2 + ___truncxfdf2 + ___trunctfdf2 + + # libgcc2 DImode arithmetic (for 32-bit targets). + ___absvdi2 + ___addvdi3 + ___ashldi3 + ___ashrdi3 + ___cmpdi2 + ___divdi3 + ___ffsdi2 + ___fixdfdi + ___fixsfdi + ___fixtfdi + ___fixxfdi + ___fixunsdfdi + ___fixunsdfsi + ___fixunssfsi + ___fixunssfdi + ___fixunstfdi + ___fixunstfsi + ___fixunsxfdi + ___fixunsxfsi + ___floatdidf + ___floatdisf + ___floatdixf + ___floatditf + ___lshrdi3 + ___moddi3 + ___muldi3 + ___mulvdi3 + ___negdi2 + ___negvdi2 + ___subvdi3 + ___ucmpdi2 + ___udivdi3 + ___udivmoddi4 + ___umoddi3 + + # libgcc2 TImode arithmetic (for 64-bit targets). + ___ashlti3 + ___ashrti3 + ___cmpti2 + ___divti3 + ___ffsti2 + ___fixdfti + ___fixsfti + ___fixtfti + ___fixxfti + ___lshrti3 + ___modti3 + ___multi3 + ___negti2 + ___ucmpti2 + ___udivmodti4 + ___udivti3 + ___umodti3 + ___fixunsdfti + ___fixunssfti + ___fixunstfti + ___fixunsxfti + ___floattidf + ___floattisf + ___floattixf + ___floattitf + + # Used to deal with trampoline initialization on some platforms + ___clear_cache + + # EH symbols + __Unwind_DeleteException + __Unwind_Find_FDE + __Unwind_ForcedUnwind + __Unwind_GetGR + __Unwind_GetIP + __Unwind_GetLanguageSpecificData + __Unwind_GetRegionStart + __Unwind_GetTextRelBase + __Unwind_GetDataRelBase + __Unwind_RaiseException + __Unwind_Resume + __Unwind_SetGR + __Unwind_SetIP + ___deregister_frame + ___deregister_frame_info + ___deregister_frame_info_bases + ___register_frame + ___register_frame_info + ___register_frame_info_bases + ___register_frame_info_table + ___register_frame_info_table_bases + ___register_frame_table + + # SjLj EH symbols + __Unwind_SjLj_Register + __Unwind_SjLj_Unregister + __Unwind_SjLj_RaiseException + __Unwind_SjLj_ForcedUnwind + __Unwind_SjLj_Resume +} + +%inherit GCC_3.3 GCC_3.0 +GCC_3.3 { + __Unwind_FindEnclosingFunction + __Unwind_GetCFA + __Unwind_Backtrace + __Unwind_Resume_or_Rethrow + __Unwind_SjLj_Resume_or_Rethrow +} + +%inherit GCC_3.3.1 GCC_3.3 +GCC_3.3.1 { + ___gcc_personality_sj0 + ___gcc_personality_v0 +} + +%inherit GCC_3.3.2 GCC_3.3.1 +GCC_3.3.2 { +} +%inherit GCC_3.3.4 GCC_3.3.2 +GCC_3.3.4 { + ___unorddf2 + ___unordsf2 +} + +%inherit GCC_3.4 GCC_3.3.4 +GCC_3.4 { + # bit scanning and counting built-ins + ___clzsi2 + ___clzdi2 + ___clzti2 + ___ctzsi2 + ___ctzdi2 + ___ctzti2 + ___popcountsi2 + ___popcountdi2 + ___popcountti2 + ___paritysi2 + ___paritydi2 + ___parityti2 +} + +%inherit GCC_3.4.2 GCC_3.4 +GCC_3.4.2 { + # Used to deal with trampoline initialization on some platforms + ___enable_execute_stack + ___trampoline_setup +} + +%inherit GCC_3.4.4 GCC_3.4.2 +GCC_3.4.4 { + # libgcc2 TImode arithmetic (for 64-bit targets). + ___absvti2 + ___addvti3 + ___mulvti3 + ___negvti2 + ___subvti3 +} + +%inherit GCC_4.0.0 GCC_3.4.4 +GCC_4.0.0 { + # libgcc2 ___builtin_powi helpers. + ___powisf2 + ___powidf2 + ___powixf2 + ___powitf2 + + # c99 compliant complex arithmetic + ___divsc3 + ___divdc3 + ___divxc3 + ___divtc3 + ___mulsc3 + ___muldc3 + ___mulxc3 + ___multc3 +} + +%inherit GCC_4.1.0 GCC_4.0.0 +GCC_4.1.0 { +} + +%inherit GCC_4.2.0 GCC_4.1.0 +GCC_4.2.0 { + # unsigned-to-floating conversions + ___floatunsisf + ___floatunsidf + ___floatunsixf + ___floatunsitf + ___floatundidf + ___floatundisf + ___floatundixf + ___floatunditf + ___floatuntidf + ___floatuntisf + ___floatuntixf + ___floatuntitf + __Unwind_GetIPInfo +} + +%inherit GCC_4.3.0 GCC_4.2.0 +GCC_4.3.0 { + # byte swapping routines + ___bswapsi2 + ___bswapdi2 + ___emutls_get_address + ___emutls_register_common +} diff --git a/gcc/config/bfin/linux.h b/gcc/config/bfin/linux.h new file mode 100644 index 00000000000..d391cd0a1fe --- /dev/null +++ b/gcc/config/bfin/linux.h @@ -0,0 +1,49 @@ +#undef SUBTARGET_DRIVER_SELF_SPECS +#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) + +#undef STARTFILE_SPEC +#define STARTFILE_SPEC \ + "%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} crtreloc.o%s \ + crti.o%s %{shared|pie:crtbeginS.o%s;:crtbegin.o%s}" + +#undef LINK_GCC_C_SEQUENCE_SPEC +#define LINK_GCC_C_SEQUENCE_SPEC \ + "%{mfast-fp:-lbffastfp} %{static:--start-group} %G %L %{static:--end-group}%{!static:%G}" + +#undef LINK_SPEC +#define LINK_SPEC "\ + %{mfdpic: -m elf32bfinfd -z text} %{shared} %{pie} \ + %{static:-dn -Bstatic} \ + %{shared:-G -Bdynamic} \ + %{!shared: %{!static: \ + %{rdynamic:-export-dynamic} \ + %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}} \ + %{static}} -init __init -fini __fini" + diff --git a/gcc/config/bfin/t-bfin-linux b/gcc/config/bfin/t-bfin-linux new file mode 100644 index 00000000000..249e1159ffa --- /dev/null +++ b/gcc/config/bfin/t-bfin-linux @@ -0,0 +1,34 @@ +## Target part of the Makefile + +LIB1ASMSRC = bfin/lib1funcs.asm +LIB1ASMFUNCS = _divsi3 _udivsi3 _umodsi3 _modsi3 _umulsi3_highpart +LIB1ASMFUNCS += _smulsi3_highpart + +EXTRA_PARTS = crtbegin.o crtend.o crtbeginS.o crtendS.o + +FPBIT = fp-bit.c +DPBIT = dp-bit.c + +dp-bit.c: $(srcdir)/config/fp-bit.c + cat $(srcdir)/config/fp-bit.c > dp-bit.c + +fp-bit.c: $(srcdir)/config/fp-bit.c + echo '#define FLOAT' > fp-bit.c + cat $(srcdir)/config/fp-bit.c >> fp-bit.c + +CRTSTUFF_T_CFLAGS = -fpic +TARGET_LIBGCC2_CFLAGS = -fpic + +# Assemble startup files. +$(T)crti.o: $(srcdir)/config/bfin/crti.s $(GCC_PASSES) + $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \ + -c -o $(T)crti.o -x assembler-with-cpp $(srcdir)/config/bfin/crti.s + +$(T)crtn.o: $(srcdir)/config/bfin/crtn.s $(GCC_PASSES) + $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \ + -c -o $(T)crtn.o -x assembler-with-cpp $(srcdir)/config/bfin/crtn.s + +EXTRA_MULTILIB_PARTS = crtbegin.o crtend.o crtbeginS.o crtendS.o + +SHLIB_MAPFILES=$(srcdir)/config/bfin/libgcc-bfin.ver + diff --git a/gcc/config/bfin/t-bfin-uclinux b/gcc/config/bfin/t-bfin-uclinux new file mode 100644 index 00000000000..5d2bfea1f67 --- /dev/null +++ b/gcc/config/bfin/t-bfin-uclinux @@ -0,0 +1,43 @@ +## Target part of the Makefile + +LIB1ASMSRC = bfin/lib1funcs.asm +LIB1ASMFUNCS = _divsi3 _udivsi3 _umodsi3 _modsi3 _umulsi3_highpart +LIB1ASMFUNCS += _smulsi3_highpart + +EXTRA_PARTS = crtbegin.o crtend.o crtbeginS.o crtendS.o crti.o crtn.o crtlibid.o + +FPBIT = fp-bit.c +DPBIT = dp-bit.c + +dp-bit.c: $(srcdir)/config/fp-bit.c + cat $(srcdir)/config/fp-bit.c > dp-bit.c + +fp-bit.c: $(srcdir)/config/fp-bit.c + echo '#define FLOAT' > fp-bit.c + cat $(srcdir)/config/fp-bit.c >> fp-bit.c + +CRTSTUFF_T_CFLAGS = -fpic +TARGET_LIBGCC2_CFLAGS = -fpic + +MULTILIB_OPTIONS=mid-shared-library mleaf-id-shared-library +MULTILIB_OPTIONS+=msep-data +MULTILIB_DEFAULTS= +MULTILIB_DIRNAMES= +MULTILIB_EXCEPTIONS=mleaf-id-shared-library* +MULTILIB_EXCEPTIONS+=*msep-data* + +# Assemble startup files. +$(T)crti.o: $(srcdir)/config/bfin/crti.s $(GCC_PASSES) + $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \ + -c -o $(T)crti.o -x assembler-with-cpp $(srcdir)/config/bfin/crti.s + +$(T)crtn.o: $(srcdir)/config/bfin/crtn.s $(GCC_PASSES) + $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \ + -c -o $(T)crtn.o -x assembler-with-cpp $(srcdir)/config/bfin/crtn.s + +$(T)crtlibid.o: $(srcdir)/config/bfin/crtlibid.s $(GCC_PASSES) + $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \ + -c -o $(T)crtlibid.o -x assembler-with-cpp \ + $(srcdir)/config/bfin/crtlibid.s + +EXTRA_MULTILIB_PARTS = crtbegin.o crtend.o crtbeginS.o crtendS.o crti.o crtn.o crtlibid.o diff --git a/gcc/config/bfin/uclinux.h b/gcc/config/bfin/uclinux.h index 57e062dd68e..0678e91d14b 100644 --- a/gcc/config/bfin/uclinux.h +++ b/gcc/config/bfin/uclinux.h @@ -21,3 +21,25 @@ 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) |