This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

New Blackfin configurations


The current bfin-uclinux target tries to support two kinds of binaries: flat, which is a really simple format used on nommu systems, and FD-PIC ELF, which is quite similar to normal Linux ELF binaries but works on nommu as well.
It's not possible to support both of these well with a single toolchain - e.g. you can't really configure libstdc++ or libgcc to build a shared library for only one multilib. Hence we split the toolchain into bfin-uclinux (for flat binaries) and bfin-linux-uclibc (for FD-PIC).


This patch, which I've committed as 122552, implements these changes which we've had in our local tree for a while now. I've had some trouble with the new toplevel libgcc where parts of the configuration seem to be coming from two different toplevel directories (which is mildly insane); I'll need to look at this further but at the moment it's compileable.

Also bootstrapped on i686-linux for the config/linux.h change.


Bernd -- This footer brought to you by insane German lawmakers. Analog Devices GmbH Wilhelm-Wagenfeld-Str. 6 80807 Muenchen Registergericht Muenchen HRB 40368 Geschaeftsfuehrer Thomas Wessel, Vincent Roche, Joseph E. McDonough
Index: libgcc/config.host
===================================================================
--- libgcc/config.host	(revision 122549)
+++ libgcc/config.host	(working copy)
@@ -248,6 +248,11 @@ bfin*-elf*)
         ;;
 bfin*-uclinux*)
         ;;
+bfin*-linux-uclibc*)
+	# No need to build crtbeginT.o on uClibc systems.  Should probably
+	# be moved to the OS specific section above.
+	extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
+	;;
 bfin*-*)
         ;;
 c4x-*-rtems* | tic4x-*-rtems*)
Index: libgcc/ChangeLog
===================================================================
--- libgcc/ChangeLog	(revision 122549)
+++ libgcc/ChangeLog	(working copy)
@@ -1,3 +1,7 @@
+2007-03-05  Bernd Schmidt  <bernd.schmidt@analog.com>
+
+	* config.host (bfin*-linux-uclibc*): Set extra_parts.
+
 2007-03-01  Brooks Moses  <brooks.moses@codesourcery.com>
 
 	* Makefile.in: Add install-html and install-pdf dummy
Index: gcc/ChangeLog
===================================================================
--- gcc/ChangeLog	(revision 122551)
+++ gcc/ChangeLog	(working copy)
@@ -1,3 +1,16 @@
+2007-03-05  Bernd Schmidt  <bernd.schmidt@analog.com>
+
+	* 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.
+
 2007-03-05  Richard Guenther  <rguenther@suse.de>
 
 	* fold-const.c (fold_binary): Remove duplicate folding
Index: gcc/config.gcc
===================================================================
--- gcc/config.gcc	(revision 122476)
+++ gcc/config.gcc	(working copy)
@@ -811,7 +811,12 @@ bfin*-elf*)
         ;;
 bfin*-uclinux*)
 	tm_file="${tm_file} dbxelf.h elfos.h bfin/elf.h bfin/uclinux.h"
-        tmake_file=bfin/t-bfin-elf
+        tmake_file=bfin/t-bfin-uclinux
+        use_collect2=no
+        ;;
+bfin*-linux-uclibc*)
+	tm_file="${tm_file} dbxelf.h elfos.h bfin/elf.h linux.h bfin/linux.h"
+        tmake_file="t-slibgcc-elf-ver bfin/t-bfin-linux"
         use_collect2=no
         ;;
 bfin*-rtems*)
Index: gcc/config/linux.h
===================================================================
--- gcc/config/linux.h	(revision 122476)
+++ gcc/config/linux.h	(working copy)
@@ -91,6 +91,7 @@ Boston, MA 02110-1301, USA.  */
 /* Define this so we can compile MS code for use with WINE.  */
 #define HANDLE_PRAGMA_PACK_PUSH_POP
 
+#undef LINK_GCC_C_SEQUENCE_SPEC
 #define LINK_GCC_C_SEQUENCE_SPEC \
   "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"
 
Index: gcc/config/bfin/linux.h
===================================================================
--- gcc/config/bfin/linux.h	(revision 0)
+++ gcc/config/bfin/linux.h	(revision 0)
@@ -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"
+
Index: gcc/config/bfin/libgcc-bfin.ver
===================================================================
--- gcc/config/bfin/libgcc-bfin.ver	(revision 122476)
+++ gcc/config/bfin/libgcc-bfin.ver	(working copy)
@@ -1,194 +1,194 @@
 GCC_3.0 {
   # libgcc1 integer symbols
-  __absvsi2
-  __addvsi3
-  __ashlsi3
-  __ashrsi3
-  __divsi3
-  __lshrsi3
-  __modsi3
-  __mulsi3
-  __mulvsi3
-  __negvsi2
-  __subvsi3
-  __udivsi3
-  __umodsi3
+  ___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
+  ___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
+  ___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
+  ___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
+  ___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
+  __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
+  __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
+  __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
+  ___gcc_personality_sj0
+  ___gcc_personality_v0
 }
 
 %inherit GCC_3.3.2 GCC_3.3.1
@@ -196,61 +196,61 @@ GCC_3.3.2 {
 }
 %inherit GCC_3.3.4 GCC_3.3.2
 GCC_3.3.4 {
-  __unorddf2
-  __unordsf2
+  ___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
+  ___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
+  ___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
+  ___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
+  # libgcc2 ___builtin_powi helpers.
+  ___powisf2
+  ___powidf2
+  ___powixf2
+  ___powitf2
 
   # c99 compliant complex arithmetic
-  __divsc3
-  __divdc3
-  __divxc3
-  __divtc3
-  __mulsc3
-  __muldc3
-  __mulxc3
-  __multc3
+  ___divsc3
+  ___divdc3
+  ___divxc3
+  ___divtc3
+  ___mulsc3
+  ___muldc3
+  ___mulxc3
+  ___multc3
 }
 
 %inherit GCC_4.1.0 GCC_4.0.0
@@ -260,26 +260,26 @@ 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
+  ___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
+  ___bswapsi2
+  ___bswapdi2
+  ___emutls_get_address
+  ___emutls_register_common
 }
Index: gcc/config/bfin/t-bfin-uclinux
===================================================================
--- gcc/config/bfin/t-bfin-uclinux	(revision 0)
+++ gcc/config/bfin/t-bfin-uclinux	(revision 0)
@@ -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
Index: gcc/config/bfin/t-bfin-linux
===================================================================
--- gcc/config/bfin/t-bfin-linux	(revision 0)
+++ gcc/config/bfin/t-bfin-linux	(revision 0)
@@ -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
+
Index: gcc/config/bfin/uclinux.h
===================================================================
--- gcc/config/bfin/uclinux.h	(revision 122476)
+++ gcc/config/bfin/uclinux.h	(working copy)
@@ -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)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]