Subversion Repositories Kolibri OS

Rev

Rev 6527 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

  1.  
  2. export CC = kos32-gcc
  3. export AR = kos32-ar
  4. export LD = kos32-ld
  5. export STRIP = kos32-strip
  6.  
  7. export SDK_DIR:= $(abspath ../../../../sdk)
  8.  
  9. cpu_type = i386
  10. enable_shared = no
  11. double_type_size = 64
  12. long_double_type_size = 96
  13. decimal_float = yes
  14. enable_vtable_verify = no
  15. enable_decimal_float = bid
  16. fixed_point = no
  17.  
  18. # List of extra object files that should be compiled for this target machine.
  19. # The rules for compiling them should be in the t-* file for the machine.
  20. EXTRA_PARTS = crtbegin.o crtend.o crtfastmath.o
  21.  
  22. CFLAGS_OPT+= -fomit-frame-pointer -fno-ident -mno-ms-bitfields
  23. CFLAGS_OPT+= -fbuilding-libgcc -fno-stack-protector
  24.  
  25. CFLAGS = -c -O2 -DIN_GCC -DIN_LIBGCC2 -DHAVE_CC_TLS -DUSE_EMUTLS
  26. CFLAGS+= -U_Win32 -U_WIN32 -U__MINGW32__ -UWIN32 -UWINNT -U_MSC_VER
  27. CFLAGS+= -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes
  28. CFLAGS+= -Wold-style-definition $(CFLAGS_OPT)
  29.  
  30. DECNUMINC = -Iconfig/libbid -DENABLE_DECIMAL_BID_FORMAT
  31.  
  32. INCLUDES = -I. -I../gcc -I../include -I$(SDK_DIR)/sources/newlib/libc/include $(DECNUMINC)
  33.  
  34. gcc_compile = $(CC) $(INCLUDES) $(CFLAGS)
  35.  
  36. # Defined in libgcc2.c, included only in the static library.
  37. LIB2FUNCS_ST = _eprintf __gcc_bcmp
  38.  
  39. # List of functions not to build from libgcc2.c.
  40. LIB2FUNCS_EXCLUDE =
  41.  
  42. # These might cause a divide overflow trap and so are compiled with
  43. # unwinder info.
  44. LIB2_DIVMOD_FUNCS = _divdi3 _moddi3 _udivdi3 _umoddi3 _udiv_w_sdiv _udivmoddi4
  45.  
  46.  
  47.  
  48. objext = .o
  49.  
  50. FPBIT_FUNCS = _pack_sf _unpack_sf _addsub_sf _mul_sf _div_sf \
  51.         _fpcmp_parts_sf _compare_sf _eq_sf _ne_sf _gt_sf _ge_sf \
  52.         _lt_sf _le_sf _unord_sf _si_to_sf _sf_to_si _negate_sf _make_sf \
  53.         _sf_to_df _sf_to_tf _thenan_sf _sf_to_usi _usi_to_sf
  54.  
  55. DPBIT_FUNCS = _pack_df _unpack_df _addsub_df _mul_df _div_df \
  56.         _fpcmp_parts_df _compare_df _eq_df _ne_df _gt_df _ge_df \
  57.         _lt_df _le_df _unord_df _si_to_df _df_to_si _negate_df _make_df \
  58.         _df_to_sf _df_to_tf _thenan_df _df_to_usi _usi_to_df
  59.  
  60. TPBIT_FUNCS = _pack_tf _unpack_tf _addsub_tf _mul_tf _div_tf \
  61.         _fpcmp_parts_tf _compare_tf _eq_tf _ne_tf _gt_tf _ge_tf \
  62.         _lt_tf _le_tf _unord_tf _si_to_tf _tf_to_si _negate_tf _make_tf \
  63.         _tf_to_df _tf_to_sf _thenan_tf _tf_to_usi _usi_to_tf
  64.  
  65. # Additional sources to handle exceptions; overridden by targets as needed.
  66. LIB2ADDEH = unwind-dw2.c unwind-dw2-fde.c unwind-sjlj.c unwind-c.c
  67. LIB2ADDEHSTATIC = $(LIB2ADDEH)
  68.  
  69. LIB2ADD = config/i386/gthr-kos32.c      \
  70.         config/i386/kos32-app.c         \
  71.         config/i386/libc-loader.c
  72.  
  73. EH_MODEL = dw2
  74. CUSTOM_CRTSTUFF = yes
  75.  
  76.  
  77. #crtbegin.o: config/i386/cygming-crtbegin.c
  78.  
  79. #       $(crt_compile) -fno-omit-frame-pointer  -c $<
  80.  
  81.  
  82. #crtbeginS.o: config/i386/cygming-crtbegin.c
  83.  
  84. #       $(crt_compile) -fno-omit-frame-pointer  -c $< -DCRTSTUFFS_O
  85.  
  86.  
  87. # We intentionally use a implementation-reserved init priority of 0,
  88.  
  89. # so allow the warning.
  90.  
  91. #crtend.o: config/i386/cygming-crtend.c
  92.  
  93. #       $(crt_compile) -fno-omit-frame-pointer -Wno-error -c $<
  94.  
  95. # This is an endfile, Use -minline-all-stringops to ensure
  96.  
  97. # that __builtin_memset doesn't refer to the lib function memset().
  98.  
  99. crtfastmath.o: config/i386/crtfastmath.c
  100.  
  101.         $(gcc_compile) -mfxsr -msse -c $<
  102.  
  103. LIB1ASMSRC = i386/start.S
  104. LIB1ASMFUNCS = _chkstk _chkstk_ms _start
  105.  
  106. DFP_ENABLE = true
  107.  
  108. LIB2ADD += config/i386/cpuinfo.c
  109. LIB2ADD += config/i386/sfp-exceptions.c
  110.  
  111.  
  112. softfp_float_modes := tf
  113. softfp_int_modes := si di ti
  114.  
  115. softfp_extensions := sftf dftf xftf
  116.  
  117. softfp_truncations := tfsf tfdf tfxf
  118.  
  119. softfp_exclude_libgcc2 := n
  120.  
  121. # Omit TImode functions
  122.  
  123. softfp_int_modes := si di
  124.  
  125.  
  126. # Provide fallbacks for __builtin_copysignq and __builtin_fabsq.
  127.  
  128. LIB2ADD += config/i386/32/tf-signs.c
  129.  
  130. # While emutls.c has nothing to do with EH, it is in LIB2ADDEH*
  131. # instead of LIB2ADD because that's the way to be sure on some targets
  132. # (e.g. *-*-darwin*) only one copy of it is linked.
  133. LIB2ADDEH += emutls.c
  134. LIB2ADDEHSTATIC += emutls.c
  135.  
  136.  
  137. softfp_float_funcs = add$(m)3 div$(m)3 eq$(m)2 ge$(m)2 le$(m)2 mul$(m)3 \
  138.   neg$(m)2 sub$(m)3 unord$(m)2
  139. softfp_floatint_funcs = fix$(m)$(i) fixuns$(m)$(i) \
  140.   float$(i)$(m) floatun$(i)$(m)
  141.  
  142. softfp_func_list := \
  143.   $(foreach m,$(softfp_float_modes), \
  144.               $(softfp_float_funcs) \
  145.               $(foreach i,$(softfp_int_modes), \
  146.                           $(softfp_floatint_funcs))) \
  147.   $(foreach e,$(softfp_extensions),extend$(e)2) \
  148.   $(foreach t,$(softfp_truncations),trunc$(t)2) \
  149.   $(softfp_extras)
  150.  
  151. ifeq ($(softfp_exclude_libgcc2),y)
  152. # This list is taken from mklibgcc.in and doesn't presently allow for
  153. # 64-bit targets where si should become di and di should become ti.
  154. softfp_func_list := $(filter-out floatdidf floatdisf fixunsdfsi fixunssfsi \
  155.   fixunsdfdi fixdfdi fixunssfdi fixsfdi fixxfdi fixunsxfdi \
  156.   floatdixf fixunsxfsi fixtfdi fixunstfdi floatditf \
  157.   floatundidf floatundisf floatundixf floatunditf,$(softfp_func_list))
  158. endif
  159.  
  160. softfp_file_list := $(addsuffix .c,$(addprefix soft-fp/,$(softfp_func_list)))
  161.  
  162. # Disable missing prototype and type limit warnings.  The prototypes
  163. # for the functions in the soft-fp files have not been brought across
  164. # from glibc.
  165.  
  166. soft-fp-objects-base = $(basename $(notdir $(softfp_file_list)))
  167.  
  168. soft-fp-objects = $(addsuffix $(objext), $(soft-fp-objects-base)) \
  169.   $(addsuffix _s$(objext), $(soft-fp-objects-base))
  170.  
  171. $(soft-fp-objects) : INTERNAL_CFLAGS += -Wno-missing-prototypes -Wno-type-limits
  172.  
  173. LIB2ADD += $(softfp_file_list)
  174.  
  175. ifneq ($(softfp_exclude_libgcc2),y)
  176. # Functions in libgcc2.c are excluded for each soft-float mode (a
  177. # target may have both soft-float and hard-float modes), for the fixed
  178. # list of integer modes (si and di) for which libgcc2.c defines any
  179. # such functions.  Depending on the target, the si and di symbols may
  180. # in fact define di and ti functions.
  181.  
  182. LIB2FUNCS_EXCLUDE += \
  183.   $(addprefix _,$(foreach m,$(softfp_float_modes), \
  184.                             $(foreach i,si di, \
  185.                                         $(softfp_floatint_funcs))))
  186. endif
  187.  
  188. iterator = empty.mk $(patsubst %,static-object.mk,$(iter-items))
  189.  
  190.  
  191. lib2funcs =     _muldi3 _negdi2 _lshrdi3 _ashldi3 _ashrdi3 _cmpdi2 _ucmpdi2     \
  192.                 _clear_cache _trampoline __main _absvsi2 _absvdi2 _addvsi3      \
  193.                 _addvdi3 _subvsi3 _subvdi3 _mulvsi3 _mulvdi3 _negvsi2 _negvdi2  \
  194.                 _ctors _ffssi2 _ffsdi2 _clz _clzsi2 _clzdi2 _ctzsi2 _ctzdi2     \
  195.                 _popcount_tab _popcountsi2 _popcountdi2 _paritysi2 _paritydi2   \
  196.                 _powisf2 _powidf2 _powixf2 _powitf2 _mulsc3 _muldc3 _mulxc3     \
  197.                 _multc3 _divsc3 _divdc3 _divxc3 _divtc3 _bswapsi2 _bswapdi2     \
  198.                 _clrsbsi2 _clrsbdi2
  199.  
  200. swfloatfuncs = $(patsubst %,_fixuns%XX,sf df xf)
  201.  
  202. dwfloatfuncs = $(patsubst %,_fix%XX,sf df xf tf) \
  203.                 $(patsubst %,_fixuns%XX,sf df xf tf) \
  204.                 $(patsubst %,_floatXX%,sf df xf tf) \
  205.                 $(patsubst %,_floatunXX%,sf df xf tf)
  206.  
  207. ifeq ($(LIB2_SIDITI_CONV_FUNCS),)
  208.   lib2funcs += $(subst XX,si,$(swfloatfuncs))
  209.   lib2funcs += $(subst XX,di,$(dwfloatfuncs))
  210. endif
  211.  
  212. # These might cause a divide overflow trap and so are compiled with
  213. # unwinder info.
  214. LIB2_DIVMOD_FUNCS = _divdi3 _moddi3 _udivdi3 _umoddi3 _udiv_w_sdiv _udivmoddi4
  215.  
  216. # Remove any objects from lib2funcs and LIB2_DIVMOD_FUNCS that are
  217. # defined as optimized assembly code in LIB1ASMFUNCS or as C code
  218. # in LIB2FUNCS_EXCLUDE.
  219. lib2funcs := $(filter-out $(LIB2FUNCS_EXCLUDE) $(LIB1ASMFUNCS),$(lib2funcs))
  220. LIB2_DIVMOD_FUNCS := $(filter-out $(LIB2FUNCS_EXCLUDE) $(LIB1ASMFUNCS), \
  221.                        $(LIB2_DIVMOD_FUNCS))
  222.  
  223. # Build "libgcc1" (assembly) components.
  224.  
  225. lib1asmfuncs-o = $(patsubst %,%$(objext),$(LIB1ASMFUNCS))
  226. $(lib1asmfuncs-o): %$(objext): config/$(LIB1ASMSRC)
  227.         $(gcc_compile) -DL$* -xassembler-with-cpp -c $< -o $@
  228. libgcc-objects += $(lib1asmfuncs-o)
  229.  
  230.  
  231.  
  232. # Build lib2funcs.  For the static library also include LIB2FUNCS_ST.
  233. lib2funcs-o = $(patsubst %,%$(objext),$(lib2funcs) $(LIB2FUNCS_ST))
  234. $(lib2funcs-o): %$(objext): libgcc2.c
  235.         $(gcc_compile) -DL$* -c $< -o $@
  236. libgcc-objects += $(lib2funcs-o)
  237.  
  238. ifneq ($(LIB2_SIDITI_CONV_FUNCS),)
  239. # Build libgcc2.c for each conversion function, with a specific
  240. # L<func> definition and LIBGCC2_UNITS_PER_WORD setting.  The DImode
  241. # functions are built with a wordsize of 4; the TImode functions are
  242. # built with the same labels, but a wordsize of 8.
  243.  
  244. sifuncs := $(filter-out $(LIB2FUNCS_EXCLUDE),$(subst XX,si,$(swfloatfuncs)))
  245. difuncs := $(filter-out $(LIB2FUNCS_EXCLUDE),$(subst XX,di,$(dwfloatfuncs)))
  246. tifuncs := $(filter-out $(LIB2FUNCS_EXCLUDE),$(subst XX,ti,$(dwfloatfuncs)))
  247.  
  248. iter-items := $(sifuncs) $(difuncs) $(tifuncs)
  249. iter-labels := $(sifuncs) $(difuncs) $(difuncs)
  250. iter-sizes := $(patsubst %,4,$(sifuncs) $(difuncs)) $(patsubst %,8,$(tifuncs))
  251.  
  252. include empty.mk $(patsubst %,siditi-object.mk,$(iter-items))
  253.  
  254. libgcc-objects += $(patsubst %,%$(objext),$(sifuncs) $(difuncs) $(tifuncs))
  255. endif
  256.  
  257. ifeq ($(LIB2_DIVMOD_EXCEPTION_FLAGS),)
  258. # Provide default flags for compiling divmod functions, if they haven't been
  259. # set already by a target-specific Makefile fragment.
  260. LIB2_DIVMOD_EXCEPTION_FLAGS := -fexceptions -fnon-call-exceptions
  261. endif
  262.  
  263. # Build LIB2_DIVMOD_FUNCS.
  264. lib2-divmod-o = $(patsubst %,%$(objext),$(LIB2_DIVMOD_FUNCS))
  265. $(lib2-divmod-o): %$(objext): libgcc2.c
  266.         $(gcc_compile) -DL$* -c $< $(LIB2_DIVMOD_EXCEPTION_FLAGS) -o $@
  267. libgcc-objects += $(lib2-divmod-o)
  268.  
  269. ifeq ($(TPBIT),)
  270. # _sf_to_tf and _df_to_tf require tp-bit.c being compiled in.
  271. FPBIT_FUNCS := $(filter-out _sf_to_tf,$(FPBIT_FUNCS))
  272. DPBIT_FUNCS := $(filter-out _df_to_tf,$(DPBIT_FUNCS))
  273. endif
  274.  
  275. FPBIT_FUNCS := $(filter-out $(LIB2FUNCS_EXCLUDE),$(FPBIT_FUNCS))
  276. DPBIT_FUNCS := $(filter-out $(LIB2FUNCS_EXCLUDE),$(DPBIT_FUNCS))
  277. TPBIT_FUNCS := $(filter-out $(LIB2FUNCS_EXCLUDE),$(TPBIT_FUNCS))
  278.  
  279. fpbit-src := fp-bit.c
  280.  
  281. # Build FPBIT.
  282. ifneq ($(FPBIT),)
  283. fpbit-o = $(patsubst %,%$(objext),$(FPBIT_FUNCS))
  284. $(fpbit-o): %$(objext): $(fpbit-src)
  285.         $(gcc_compile) -DFINE_GRAINED_LIBRARIES -DL$* -DFLOAT $(FPBIT_CFLAGS) -c $< -o $@
  286. libgcc-objects += $(fpbit-o)
  287. endif
  288.  
  289. # Build DPBIT.
  290. ifneq ($(DPBIT),)
  291. dpbit-o = $(patsubst %,%$(objext),$(DPBIT_FUNCS))
  292. $(dpbit-o): %$(objext): $(fpbit-src)
  293.         $(gcc_compile) -DFINE_GRAINED_LIBRARIES -DL$* $(DPBIT_CFLAGS) -c $< -o $@
  294. libgcc-objects += $(dpbit-o)
  295. endif
  296.  
  297. # Build TPBIT.
  298. ifneq ($(TPBIT),)
  299. tpbit-o = $(patsubst %,%$(objext),$(TPBIT_FUNCS))
  300. $(tpbit-o): %$(objext): $(fpbit-src)
  301.         $(gcc_compile) -DFINE_GRAINED_LIBRARIES -DL$* -DTFLOAT $(TPBIT_CFLAGS) -c $< -o $@
  302. libgcc-objects += $(tpbit-o)
  303. endif
  304.  
  305. # Build decimal floating point support.
  306. ifeq ($(decimal_float),yes)
  307.  
  308. # If $DFP_ENABLE is set, then we want all data type sizes.
  309. ifneq ($(DFP_ENABLE),)
  310. D32PBIT = 1
  311. D64PBIT = 1
  312. D128PBIT = 1
  313. endif
  314.  
  315. dfp-filenames =
  316. ifneq ($(D32PBIT)$(D64PBIT)$(D128PBIT),)
  317. ifeq ($(enable_decimal_float),bid)
  318. dfp-filenames += bid_decimal_globals bid_decimal_data \
  319.                  bid_binarydecimal bid_convert_data \
  320.                  _isinfd32 _isinfd64 _isinfd128 bid64_noncomp \
  321.                  bid128_noncomp bid128_fma bid_round bid_from_int \
  322.                  bid64_add bid128_add bid64_div bid128_div \
  323.                  bid64_mul bid128_mul bid64_compare bid128_compare \
  324.                  bid128 bid32_to_bid64 bid32_to_bid128 bid64_to_bid128 \
  325.                  bid64_to_int32 bid64_to_int64 \
  326.                  bid64_to_uint32 bid64_to_uint64 \
  327.                  bid128_to_int32 bid128_to_int64 \
  328.                  bid128_to_uint32 bid128_to_uint64
  329. else
  330. dfp-filenames += decContext decNumber decExcept decRound decLibrary decDouble decPacked decQuad decSingle
  331. endif
  332. endif
  333.  
  334.  
  335. dfp-objects = $(patsubst %,%$(objext),$(dfp-filenames))
  336. ifeq ($(enable_decimal_float),bid)
  337. $(dfp-objects): %$(objext): config/libbid/%.c
  338. else
  339. $(dfp-objects): %$(objext): ../libdecnumber/%.c
  340. endif
  341.         $(gcc_compile) -c $<
  342. libgcc-objects += $(dfp-objects)
  343.  
  344. decbits-filenames =
  345. ifneq ($(enable_decimal_float),bid)
  346. ifneq ($(D32PBIT),)
  347. decbits-filenames += decimal32
  348. endif
  349.  
  350. ifneq ($(D64PBIT),)
  351. decbits-filenames += decimal64
  352. endif
  353.  
  354. ifneq ($(D128PBIT),)
  355. decbits-filenames += decimal128
  356. endif
  357. endif
  358.  
  359. decbits-objects = $(patsubst %,%$(objext),$(decbits-filenames))
  360. ifeq ($(enable_decimal_float),bid)
  361. $(decbits-objects): %$(objext): config/libbid/%.c
  362. else
  363. $(decbits-objects): %$(objext): ../libdecnumber/$(enable_decimal_float)/%.c
  364. endif
  365.         $(gcc_compile) -c $<
  366. libgcc-objects += $(decbits-objects)
  367.  
  368.  
  369.  
  370. # Next build individual support functions.
  371. D32PBIT_FUNCS = _addsub_sd _div_sd _mul_sd _plus_sd _minus_sd \
  372.         _eq_sd _ne_sd _lt_sd _gt_sd _le_sd _ge_sd \
  373.         _sd_to_si _sd_to_di _sd_to_usi _sd_to_udi \
  374.         _si_to_sd _di_to_sd _usi_to_sd _udi_to_sd \
  375.         _sd_to_sf _sd_to_df _sd_to_xf _sd_to_tf \
  376.         _sf_to_sd _df_to_sd _xf_to_sd _tf_to_sd \
  377.         _sd_to_dd _sd_to_td _unord_sd _conv_sd
  378.  
  379. D64PBIT_FUNCS = _addsub_dd _div_dd _mul_dd _plus_dd _minus_dd \
  380.         _eq_dd _ne_dd _lt_dd _gt_dd _le_dd _ge_dd \
  381.         _dd_to_si _dd_to_di _dd_to_usi _dd_to_udi \
  382.         _si_to_dd _di_to_dd _usi_to_dd _udi_to_dd \
  383.         _dd_to_sf _dd_to_df _dd_to_xf _dd_to_tf \
  384.         _sf_to_dd _df_to_dd _xf_to_dd _tf_to_dd \
  385.         _dd_to_sd _dd_to_td _unord_dd _conv_dd
  386.  
  387. D128PBIT_FUNCS = _addsub_td _div_td _mul_td _plus_td _minus_td \
  388.         _eq_td _ne_td _lt_td _gt_td _le_td _ge_td \
  389.         _td_to_si _td_to_di _td_to_usi _td_to_udi \
  390.         _si_to_td _di_to_td _usi_to_td _udi_to_td \
  391.         _td_to_sf _td_to_df _td_to_xf _td_to_tf \
  392.         _sf_to_td _df_to_td _xf_to_td _tf_to_td \
  393.         _td_to_sd _td_to_dd _unord_td _conv_td
  394.  
  395. ifeq ($(enable_decimal_float),bid)
  396. ifneq ($(D32PBIT),)
  397. D32PBIT_FUNCS:=$(filter-out _plus_sd _minus_sd _conv_sd, $(D32PBIT_FUNCS))
  398. endif
  399.  
  400. ifneq ($(D64PBIT),)
  401. D64PBIT_FUNCS:=$(filter-out _plus_dd _minus_dd _conv_dd, $(D64PBIT_FUNCS))
  402. endif
  403.  
  404. ifneq ($(D128PBIT),)
  405. D128PBIT_FUNCS:=$(filter-out _plus_td _minus_td _conv_td, $(D128PBIT_FUNCS))
  406. endif
  407. endif
  408.  
  409. ifneq ($(D32PBIT),)
  410. d32pbit-o = $(patsubst %,%$(objext),$(D32PBIT_FUNCS))
  411. ifeq ($(enable_decimal_float),bid)
  412. $(d32pbit-o): %$(objext): config/libbid/%.c
  413. else
  414. $(d32pbit-o): %$(objext): $(srcdir)/dfp-bit.c
  415. endif
  416.         $(gcc_compile) -DFINE_GRAINED_LIBRARIES -DL$* -DWIDTH=32 -c $< -o $@
  417. libgcc-objects += $(d32pbit-o)
  418. endif
  419.  
  420. ifneq ($(D64PBIT),)
  421. d64pbit-o = $(patsubst %,%$(objext),$(D64PBIT_FUNCS))
  422. ifeq ($(enable_decimal_float),bid)
  423. $(d64pbit-o): %$(objext): config/libbid/%.c
  424. else
  425. $(d64pbit-o): %$(objext): $(srcdir)/dfp-bit.c
  426. endif
  427.         $(gcc_compile) -DFINE_GRAINED_LIBRARIES -DL$* -DWIDTH=64 -c $<
  428. libgcc-objects += $(d64pbit-o)
  429. endif
  430.  
  431. ifneq ($(D128PBIT),)
  432. d128pbit-o = $(patsubst %,%$(objext),$(D128PBIT_FUNCS))
  433. ifeq ($(enable_decimal_float),bid)
  434. $(d128pbit-o): %$(objext): config/libbid/%.c
  435. else
  436. $(d128pbit-o): %$(objext): $(srcdir)/dfp-bit.c
  437. endif
  438.         $(gcc_compile) -DFINE_GRAINED_LIBRARIES -DL$* -DWIDTH=128 -c $<
  439. libgcc-objects += $(d128pbit-o)
  440. endif
  441.  
  442. endif
  443.  
  444. # Build LIB2ADD and LIB2ADD_ST.
  445. ifneq ($(filter-out %.c %.S %.asm,$(LIB2ADD) $(LIB2ADD_ST)),)
  446. $(error Unsupported files in LIB2ADD or LIB2ADD_ST.)
  447. endif
  448.  
  449. libgcc-objects += $(addsuffix $(objext),$(basename $(notdir $(LIB2ADD))))
  450. libgcc-objects += $(addsuffix $(objext),$(basename $(notdir $(LIB2ADD_ST))))
  451.  
  452. c_flags :=
  453. iter-items := $(LIB2ADD) $(LIB2ADD_ST)
  454. include $(iterator)
  455.  
  456. c_flags := -fexceptions
  457.  
  458. libgcc-objects += $(addsuffix $(objext),$(basename $(notdir $(LIB2ADDEH))))
  459.  
  460. iter-items := $(LIB2ADDEH)
  461. include $(iterator)
  462.  
  463.  
  464. # targets
  465.  
  466. all: libgcc.a
  467.  
  468. libgcc.a : $(libgcc-objects) Makefile
  469.         $(AR) crs libgcc.a $(libgcc-objects)
  470. #       mv -f libbfd.a $(SDK_DIR)/lib
  471.  
  472.  
  473.