summaryrefslogtreecommitdiffstats
path: root/toolchain/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'toolchain/gcc')
-rw-r--r--toolchain/gcc/Makefile.in14
-rw-r--r--toolchain/gcc/gcc-uclibc-3.x.mk9
2 files changed, 18 insertions, 5 deletions
diff --git a/toolchain/gcc/Makefile.in b/toolchain/gcc/Makefile.in
index 41e23cf59..1b6e24133 100644
--- a/toolchain/gcc/Makefile.in
+++ b/toolchain/gcc/Makefile.in
@@ -30,18 +30,30 @@ SOFT_FLOAT_CONFIG_OPTION:=--with-float=soft
else
SOFT_FLOAT_CONFIG_OPTION:=--without-float
endif
+
# again... there must be a better way
ifeq ($(findstring 4.,$(GCC_VERSION)),4.)
SOFT_FLOAT_CONFIG_OPTION:=--with-float=soft
+ifeq ($(BR2_SOFT_FLOAT_FP),y)
+TARGET_SOFT_FLOAT:=-mfloat-abi=softfp
+else # no fp at all
+TARGET_SOFT_FLOAT:=-mfloat-abi=soft
endif
+else # not gcc-4.x
TARGET_SOFT_FLOAT:=-msoft-float
+endif
ARCH_FPU_SUFFIX:=_nofpu
-else
+else # no softfloat support
SOFT_FLOAT_CONFIG_OPTION:=
TARGET_SOFT_FLOAT:=
ARCH_FPU_SUFFIX:=
endif
+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)"
+
ifeq ($(strip $(BR2_PACKAGE_GCC_TARGET)),y)
TARGETS+=gcc_target
endif
diff --git a/toolchain/gcc/gcc-uclibc-3.x.mk b/toolchain/gcc/gcc-uclibc-3.x.mk
index 9eb6d776c..c67a2699d 100644
--- a/toolchain/gcc/gcc-uclibc-3.x.mk
+++ b/toolchain/gcc/gcc-uclibc-3.x.mk
@@ -333,7 +333,8 @@ $(GCC_BUILD_DIR3)/.configured: $(GCC_BUILD_DIR3)/.prepared
(cd $(GCC_BUILD_DIR3); rm -rf config.cache ; \
PATH=$(TARGET_PATH) \
CC_FOR_BUILD="$(HOSTCC)" \
- BOOT_CFLAGS="$(TARGET_CFLAGS)" \
+ CFLAGS_FOR_BUILD="-g -O2" \
+ $(TARGET_GCC_FLAGS) \
$(GCC_DIR)/configure \
--prefix=/usr \
--build=$(GNU_HOST_NAME) \
@@ -342,7 +343,6 @@ $(GCC_BUILD_DIR3)/.configured: $(GCC_BUILD_DIR3)/.prepared
--enable-languages=$(GCC_TARGET_LANGUAGES) \
--with-gxx-include-dir=/usr/include/c++ \
--disable-__cxa_atexit \
- --enable-target-optspace \
--with-gnu-ld \
$(GCC_SHARED_LIBGCC) \
$(GCC_WITH_TARGET_GMP) \
@@ -354,12 +354,13 @@ $(GCC_BUILD_DIR3)/.configured: $(GCC_BUILD_DIR3)/.prepared
$(GCC_WITH_CPU) $(GCC_WITH_ARCH) $(GCC_WITH_TUNE) \
$(GCC_USE_SJLJ_EXCEPTIONS) \
$(DISABLE_LARGEFILE) \
- $(EXTRA_GCC_CONFIG_OPTIONS));
+ $(EXTRA_GCC_CONFIG_OPTIONS) \
+ $(EXTRA_TARGET_GCC_CONFIG_OPTIONS));
touch $@
$(GCC_BUILD_DIR3)/.compiled: $(GCC_BUILD_DIR3)/.configured
PATH=$(TARGET_PATH) \
- $(MAKE) $(TARGET_GCC_ARGS) -C $(GCC_BUILD_DIR3) all
+ $(MAKE) -C $(GCC_BUILD_DIR3) all
touch $@
#