2005-02-10 04:06:39 +01:00
|
|
|
# gcc has a bunch of options that need to be shared with
|
|
|
|
# both gcc-uclibc-2.95.mk and gcc-uclibc-3.x.mk, and are
|
2007-08-22 14:35:41 +02:00
|
|
|
# use by other packages... So include them in this file
|
2005-02-10 04:06:39 +01:00
|
|
|
# and arrange to include it soon after invoking make from
|
|
|
|
# the top level.
|
|
|
|
|
2009-07-30 17:35:26 +02:00
|
|
|
GCC_VERSION:=$(call qstrip,$(BR2_GCC_VERSION))
|
|
|
|
TARGET_OPTIMIZATION:=$(call qstrip,$(BR2_TARGET_OPTIMIZATION))
|
|
|
|
EXTRA_GCC_CONFIG_OPTIONS:=$(call qstrip,$(BR2_EXTRA_GCC_CONFIG_OPTIONS))
|
2007-07-29 19:51:32 +02:00
|
|
|
|
2009-07-30 17:35:26 +02:00
|
|
|
ifeq ($(call qstrip,$(BR2_GCC_IS_SNAP)),y)
|
|
|
|
GCC_SNAP_DATE:=$(call qstrip,$(BR2_GCC_SNAP_DATE))
|
2006-04-13 07:50:01 +02:00
|
|
|
else
|
|
|
|
GCC_SNAP_DATE:=
|
|
|
|
endif
|
2004-10-09 03:06:03 +02:00
|
|
|
|
2008-12-08 09:15:42 +01:00
|
|
|
ifeq ($(BR2_GCC_USE_SJLJ_EXCEPTIONS),y)
|
2005-07-19 01:34:20 +02:00
|
|
|
GCC_USE_SJLJ_EXCEPTIONS:=--enable-sjlj-exceptions
|
|
|
|
endif
|
2007-01-21 12:50:10 +01:00
|
|
|
|
2004-10-09 23:28:56 +02:00
|
|
|
ifeq ($(BR2_SOFT_FLOAT),y)
|
2004-10-09 03:06:03 +02:00
|
|
|
# gcc 3.4.x soft float configuration is different than previous versions.
|
2007-04-02 18:18:48 +02:00
|
|
|
ifeq ($(findstring x3.4.,x$(GCC_VERSION)),x3.4.)
|
2007-11-09 10:57:25 +01:00
|
|
|
ifneq ($(BR2_nios2),y)
|
2004-10-09 03:06:03 +02:00
|
|
|
SOFT_FLOAT_CONFIG_OPTION:=--with-float=soft
|
2007-11-09 10:57:25 +01:00
|
|
|
endif
|
2004-10-09 03:06:03 +02:00
|
|
|
else
|
|
|
|
SOFT_FLOAT_CONFIG_OPTION:=--without-float
|
|
|
|
endif
|
2007-01-26 15:51:38 +01:00
|
|
|
|
2005-05-01 00:59:05 +02:00
|
|
|
# again... there must be a better way
|
2007-04-02 18:18:48 +02:00
|
|
|
ifeq ($(findstring x4.,x$(GCC_VERSION)),x4.)
|
2005-05-01 00:59:05 +02:00
|
|
|
SOFT_FLOAT_CONFIG_OPTION:=--with-float=soft
|
2007-01-26 15:51:38 +01:00
|
|
|
ifeq ($(BR2_SOFT_FLOAT_FP),y)
|
|
|
|
TARGET_SOFT_FLOAT:=-mfloat-abi=softfp
|
|
|
|
else # no fp at all
|
2008-08-22 15:59:06 +02:00
|
|
|
ifeq ($(BR2_arm),y) # only set float-abi for arm
|
2007-01-26 15:51:38 +01:00
|
|
|
TARGET_SOFT_FLOAT:=-mfloat-abi=soft
|
2008-08-22 15:59:06 +02:00
|
|
|
else
|
|
|
|
TARGET_SOFT_FLOAT:=-msoft-float
|
|
|
|
endif
|
2005-05-01 00:59:05 +02:00
|
|
|
endif
|
2007-01-26 15:51:38 +01:00
|
|
|
else # not gcc-4.x
|
2004-10-09 03:06:03 +02:00
|
|
|
TARGET_SOFT_FLOAT:=-msoft-float
|
2007-01-26 15:51:38 +01:00
|
|
|
endif
|
2004-10-09 03:06:03 +02:00
|
|
|
ARCH_FPU_SUFFIX:=_nofpu
|
2007-01-26 15:51:38 +01:00
|
|
|
else # no softfloat support
|
2004-10-09 03:06:03 +02:00
|
|
|
SOFT_FLOAT_CONFIG_OPTION:=
|
|
|
|
TARGET_SOFT_FLOAT:=
|
|
|
|
ARCH_FPU_SUFFIX:=
|
2008-06-06 14:49:53 +02:00
|
|
|
endif
|
|
|
|
|
2007-07-08 18:27:25 +02:00
|
|
|
# some additional defaults
|
2009-07-30 17:35:26 +02:00
|
|
|
ifneq ($(call qstrip,$(BR2_GCC_TARGET_ARCH)),)
|
2007-07-08 18:27:25 +02:00
|
|
|
GCC_WITH_ARCH:=--with-arch=$(BR2_GCC_TARGET_ARCH)
|
|
|
|
endif
|
2009-07-30 17:35:26 +02:00
|
|
|
ifneq ($(call qstrip,$(BR2_GCC_TARGET_TUNE)),)
|
2007-07-08 18:27:25 +02:00
|
|
|
GCC_WITH_TUNE:=--with-tune=$(BR2_GCC_TARGET_TUNE)
|
|
|
|
endif
|
2009-07-30 17:35:26 +02:00
|
|
|
ifneq ($(call qstrip,$(BR2_GCC_TARGET_ABI)),)
|
2007-09-15 14:12:56 +02:00
|
|
|
GCC_WITH_ABI:=--with-abi=$(BR2_GCC_TARGET_ABI)
|
2007-07-08 18:27:25 +02:00
|
|
|
endif
|
2004-10-09 03:06:03 +02:00
|
|
|
|
2007-10-23 11:49:56 +02:00
|
|
|
# AVR32 GCC configuration
|
2008-12-08 09:15:42 +01:00
|
|
|
ifeq ($(BR2_avr32),y)
|
2007-10-23 11:49:56 +02:00
|
|
|
EXTRA_GCC_CONFIG_OPTIONS+=--disable-libmudflap
|
|
|
|
SOFT_FLOAT_CONFIG_OPTION:=
|
|
|
|
EXTRA_GCC_CONFIG_OPTIONS+=--with-build-time-tools=$(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/bin \
|
|
|
|
#EXTRA_GCC_CONFIG_OPTIONS+=--with-as=$(TARGET_CROSS)as
|
|
|
|
endif
|
|
|
|
|
2007-01-26 15:51:38 +01:00
|
|
|
TARGET_GCC_FLAGS= CFLAGS_FOR_TARGET="$(TARGET_CFLAGS) $(TARGET_SOFT_FLOAT)" \
|
|
|
|
CXXFLAGS_FOR_TARGET="$(TARGET_CFLAGS) $(TARGET_SOFT_FLOAT)" \
|
|
|
|
CFLAGS="$(TARGET_CFLAGS) $(TARGET_SOFT_FLOAT)" \
|
|
|
|
BOOT_CFLAGS="$(TARGET_CFLAGS) $(TARGET_SOFT_FLOAT)"
|
|
|
|
|
2008-12-08 09:15:42 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_GCC_TARGET),y)
|
2007-08-26 23:00:56 +02:00
|
|
|
EXTRA_TARGET_GCC_CONFIG_OPTIONS:=
|
|
|
|
|
|
|
|
# AVR32 target GCC configuration
|
2008-12-08 09:15:42 +01:00
|
|
|
ifeq ($(BR2_avr32),y)
|
2007-08-26 23:00:56 +02:00
|
|
|
EXTRA_TARGET_GCC_CONFIG_OPTIONS+=--disable-libmudflap
|
2007-09-29 22:44:30 +02:00
|
|
|
EXTRA_TARGET_GCC_CONFIG_OPTIONS+=--with-build-time-tools=$(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/bin \
|
2007-10-01 23:12:54 +02:00
|
|
|
EXTRA_TARGET_GCC_CONFIG_OPTIONS+=--with-as=$(TARGET_CROSS)as
|
2007-08-26 23:00:56 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
# and finally pull in config opts from the user
|
2009-07-30 17:35:26 +02:00
|
|
|
EXTRA_TARGET_GCC_CONFIG_OPTIONS+=$(call qstrip,$(BR2_EXTRA_TARGET_GCC_CONFIG_OPTIONS))
|
2007-01-28 13:03:58 +01:00
|
|
|
|
|
|
|
ifeq ($(BR2_PREFER_IMA),y)
|
2007-02-09 14:43:36 +01:00
|
|
|
# >= 4.x
|
2007-04-02 18:18:48 +02:00
|
|
|
ifneq ($(findstring x3.,x$(GCC_VERSION)),x3.)
|
2007-01-28 13:03:58 +01:00
|
|
|
EXTRA_TARGET_GCC_CONFIG_OPTIONS+=--enable-intermodule
|
|
|
|
endif
|
|
|
|
endif # BR2_PREFER_IMA=y
|
|
|
|
|
2004-10-09 08:13:40 +02:00
|
|
|
TARGETS+=gcc_target
|
|
|
|
endif
|