check for host locale utils
[buildroot.git] / toolchain / gcc / Makefile.in
blob0ece9898c37b1bde2c3cd4dff9d74f1e595d1ba5
1 # gcc has a bunch of options that need to be shared with
2 # both gcc-uclibc-2.95.mk and gcc-uclibc-3.x.mk, and are
3 # use by other packages... So include them in this file
4 # and arrange to include it soon after invoking make from
5 # the top level.
7 GCC_VERSION:=$(strip $(subst ",, $(BR2_GCC_VERSION)))
8 #"))
9 TARGET_OPTIMIZATION:=$(strip $(subst ",, $(BR2_TARGET_OPTIMIZATION)))
10 #"))
11 EXTRA_GCC_CONFIG_OPTIONS:=$(strip $(subst ",, $(BR2_EXTRA_GCC_CONFIG_OPTIONS)))
12 #"))
13 BR2_GCC_DECNUMBER:=$(strip $(subst ",, $(BR2_GCC_DECNUMBER)))
14 #"))
16 ifeq ($(BR2_GCC_IS_SNAP),y)
17 GCC_SNAP_DATE:=$(strip $(subst ",, $(BR2_GCC_SNAP_DATE)))
18 #"))
19 endif
21 ifeq ($(BR2_GCC_USE_SJLJ_EXCEPTIONS),y)
22 GCC_USE_SJLJ_EXCEPTIONS:=--enable-sjlj-exceptions
23 endif
24 ifeq ($(BR2_ENABLE_SSP),y)
25 GCC_USE_LIBSSP+=--enable-libssp
26 else
27 GCC_USE_LIBSSP+=--disable-libssp
28 endif
29 ifeq ($(BR2_ENABLE_MUDFLAP),y)
30 GCC_USE_LIBMUDFLAP+=--enable-libmudflap
31 else
32 GCC_USE_LIBMUDFLAP+=--disable-libmudflap
33 endif
34 ifeq ($(BR2_ENABLE_LIBGOMP),y)
35 GCC_USE_LIBGOMP+=--enable-libgomp
36 else
37 GCC_USE_LIBGOMP+=--disable-libgomp
38 endif
40 ifeq ($(BR2_SOFT_FLOAT),y)
41 # gcc 3.4.x soft float configuration is different than previous versions.
42 ifeq ($(findstring x3.4.,x$(GCC_VERSION)),x3.4.)
43 SOFT_FLOAT_CONFIG_OPTION:=--with-float=soft
44 else
45 SOFT_FLOAT_CONFIG_OPTION:=--without-float
46 endif
48 # again... there must be a better way
49 ifeq ($(findstring x4.,x$(GCC_VERSION)),x4.)
50 SOFT_FLOAT_CONFIG_OPTION:=--with-float=soft
51 ifeq ($(BR2_SOFT_FLOAT_FP),y)
52 TARGET_SOFT_FLOAT:=-mfloat-abi=softfp
53 else # no fp at all
54 ifneq ($(BR2_powerpc),y) # is rejected for e.g. "405":
55 TARGET_SOFT_FLOAT:=-mfloat-abi=soft
56 endif
57 endif
58 else # not gcc-4.x
59 TARGET_SOFT_FLOAT:=-msoft-float
60 endif
61 else # no softfloat support
62 SOFT_FLOAT_CONFIG_OPTION:=
63 TARGET_SOFT_FLOAT:=
64 endif # softfloat support
66 # Some arches (e.g. cris) do not have supported_defaults
67 # These are not allowed BR2_GCC_TARGET_ARCH but only BR2_GCC_TARGET_FLAGS_ARCH
68 GCC_TARGET_ARCH_:=$(strip $(subst ",,$(BR2_GCC_TARGET_ARCH)))
69 # "))
70 GCC_TARGET_ABI_:=$(strip $(subst ",,$(BR2_GCC_TARGET_ABI)))
71 # "))
72 GCC_TARGET_TUNE_:=$(strip $(subst ",,$(BR2_GCC_TARGET_TUNE)))
73 # "))
74 GCC_TARGET_CPU_:=$(strip $(subst ",,$(BR2_GCC_TARGET_CPU)))
75 # "))
76 GCC_TARGET_SUBCPU_:=$(strip $(subst ",,$(BR2_GCC_TARGET_SUBCPU)))
77 # "))
78 GCC_TARGET_SUBCPU_SEPARATOR:=$(strip $(subst ",,$(BR2_GCC_TARGET_SUBCPU_SEPARATOR)))
79 # "))
80 ifneq ($(strip $(GCC_TARGET_CPU_)),)
81 GCC_WITH_CPU:=--with-cpu=$(GCC_TARGET_CPU_)$(if $(GCC_TARGET_SUBCPU_),$(GCC_TARGET_SUBCPU_SEPARATOR)$(GCC_TARGET_SUBCPU_))
82 endif
83 ifneq ($(strip $(GCC_TARGET_TUNE_)),)
84 GCC_WITH_TUNE:=--with-tune=$(GCC_TARGET_TUNE_)
85 endif
86 ifneq ($(strip $(GCC_TARGET_ARCH_)),)
87 GCC_WITH_ARCH:=--with-arch=$(GCC_TARGET_ARCH_)
88 endif
89 ifneq ($(strip $(GCC_TARGET_ABI_)),)
90 GCC_WITH_ABI:=--with-abi=$(GCC_TARGET_ABI_)
91 endif
94 TARGET_GCC_FLAGS= CFLAGS_FOR_TARGET="$(TARGET_CFLAGS) $(TARGET_SOFT_FLOAT)" \
95 CXXFLAGS_FOR_TARGET="$(TARGET_CFLAGS) $(TARGET_SOFT_FLOAT)" \
96 BOOT_CFLAGS="$(TARGET_CFLAGS) $(TARGET_SOFT_FLOAT)"
98 EXTRA_GCC_CONFIG_OPTIONS+=$(BR2_MAYBE_USE_INTERWORKING) \
99 $(GCC_USE_LIBSSP) $(GCC_USE_LIBSSP) $(GCC_USE_LIBMUDFLAP) \
100 $(GCC_USE_LIBGOMP) \
101 --enable-decimal-float=$(BR2_GCC_DECNUMBER)
103 ####################### T A R G E T s e t t i n g s #######################
104 ifeq ($(BR2_PACKAGE_GCC_TARGET),y)
105 EXTRA_TARGET_GCC_CONFIG_OPTIONS:= \
106 $(GCC_USE_LIBSSP) $(GCC_USE_LIBSSP) $(GCC_USE_LIBMUDFLAP) \
107 $(GCC_USE_LIBGOMP)
109 # and finally pull in config opts from the user
110 EXTRA_TARGET_GCC_CONFIG_OPTIONS+=$(strip $(subst ",, $(BR2_EXTRA_TARGET_GCC_CONFIG_OPTIONS)))
111 #"))
113 ifeq ($(BR2_PREFER_IMA),y)
114 # >= 4.x
115 ifneq ($(findstring x3.,x$(GCC_VERSION)),x3.)
116 EXTRA_TARGET_GCC_CONFIG_OPTIONS+=--enable-intermodule
117 endif
118 endif # BR2_PREFER_IMA=y
120 TARGETS+=gcc_target
121 endif