toolchain: remove toolchain/Makefile.in and toolchain/gcc/Makefile.in
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tue, 17 Apr 2012 04:45:31 +0000 (04:45 +0000)
committerPeter Korsgaard <jacmet@sunsite.dk>
Wed, 25 Apr 2012 07:00:51 +0000 (09:00 +0200)
Re-integrate in gcc-uclibc-4.x.mk things from
toolchain/gcc/Makefile.in that were completely gcc-specific. There was
no reason to pull that when building with other backends than the
internal one.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Makefile
package/Makefile.in
toolchain/Makefile.in [deleted file]
toolchain/gcc/Makefile.in [deleted file]
toolchain/gcc/gcc-uclibc-4.x.mk

index 44c70ccd25ea1d70b45a0a8f4ab48e96d411e2f0..cc8124abb78f34251372e74e8c59bccf7a1c0ae1 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -263,7 +263,6 @@ endif
 
 all: world
 
-include toolchain/Makefile.in
 include package/Makefile.in
 include support/dependencies/dependencies.mk
 
index 14a554a3b78bd6bdee29bda22e782b15640c1814..df7042c6a4daf3a6a331fca1f66f507237b1c3a6 100644 (file)
@@ -50,6 +50,8 @@ REAL_GNU_TARGET_NAME=$(ARCH)-unknown-linux-$(LIBC)$(ABI)
 
 STAGING_DIR=$(HOST_DIR)/usr/$(REAL_GNU_TARGET_NAME)/sysroot
 
+TARGET_OPTIMIZATION:=$(call qstrip,$(BR2_TARGET_OPTIMIZATION))
+
 ifeq ($(BR2_OPTIMIZE_0),y)
 TARGET_OPTIMIZATION+=-O0
 endif
diff --git a/toolchain/Makefile.in b/toolchain/Makefile.in
deleted file mode 100644 (file)
index 5f32f82..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-# gcc has a bunch of needed stuff....
-include toolchain/gcc/Makefile.in
diff --git a/toolchain/gcc/Makefile.in b/toolchain/gcc/Makefile.in
deleted file mode 100644 (file)
index 3e82a32..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-# gcc has a bunch of options that need to be shared with
-# both gcc-uclibc-4.x.mk, and are use by other packages...
-# So include them in this file and arrange to include it
-# soon after invoking make from the top level.
-
-TARGET_OPTIMIZATION:=$(call qstrip,$(BR2_TARGET_OPTIMIZATION))
-EXTRA_GCC_CONFIG_OPTIONS:=$(call qstrip,$(BR2_EXTRA_GCC_CONFIG_OPTIONS))
-
-
-ifeq ($(BR2_SOFT_FLOAT),y)
-SOFT_FLOAT_CONFIG_OPTION:=--with-float=soft
-ifeq ($(BR2_arm)$(BR2_armeb),y) # only set float-abi for arm
-TARGET_SOFT_FLOAT:=-mfloat-abi=soft
-else
-TARGET_SOFT_FLOAT:=-msoft-float
-endif
-else # no softfloat support
-SOFT_FLOAT_CONFIG_OPTION:=
-TARGET_SOFT_FLOAT:=
-endif
-
-# some additional defaults
-ifneq ($(call qstrip,$(BR2_GCC_TARGET_ARCH)),)
-GCC_WITH_ARCH:=--with-arch=$(BR2_GCC_TARGET_ARCH)
-endif
-ifneq ($(call qstrip,$(BR2_GCC_TARGET_TUNE)),)
-GCC_WITH_TUNE:=--with-tune=$(BR2_GCC_TARGET_TUNE)
-endif
-ifneq ($(call qstrip,$(BR2_GCC_TARGET_ABI)),)
-GCC_WITH_ABI:=--with-abi=$(BR2_GCC_TARGET_ABI)
-endif
-ifneq ($(call qstrip,$(BR2_GCC_TARGET_CPU)),)
-GCC_WITH_CPU:=--with-cpu=$(BR2_GCC_TARGET_CPU)
-endif
-
-# AVR32 GCC configuration
-ifeq ($(BR2_avr32),y)
-EXTRA_GCC_CONFIG_OPTIONS+=--disable-libmudflap
-SOFT_FLOAT_CONFIG_OPTION:=
-endif
-
-# Disable mudflap and enable proper double/long double for SPE ABI
-ifeq ($(BR2_powerpc_SPE),y)
-EXTRA_GCC_CONFIG_OPTIONS+=--disable-libmudflap --enable-e500_double --with-long-double-128
-endif
-
-ifeq ($(BR2_PACKAGE_GCC_TARGET),y)
-EXTRA_TARGET_GCC_CONFIG_OPTIONS:=
-
-# AVR32 target GCC configuration
-ifeq ($(BR2_avr32),y)
-EXTRA_TARGET_GCC_CONFIG_OPTIONS+=--disable-libmudflap
-EXTRA_TARGET_GCC_CONFIG_OPTIONS+=--with-build-time-tools=$(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/bin \
-EXTRA_TARGET_GCC_CONFIG_OPTIONS+=--with-as=$(TARGET_CROSS)as
-endif
-
-
-# and finally pull in config opts from the user
-EXTRA_TARGET_GCC_CONFIG_OPTIONS+=$(call qstrip,$(BR2_EXTRA_TARGET_GCC_CONFIG_OPTIONS))
-
-TARGETS+=gcc_target
-endif
index 3d0228d11efba7e59769f7dcbfef86e5d78be6f1..3f97a47ab655b73388768f6ba327cfec77cf86f1 100644 (file)
@@ -66,6 +66,64 @@ ifneq ($(BR2_TOOLCHAIN_BUILDROOT_WCHAR),y)
 GCC_QUADMATH=--disable-libquadmath
 endif
 
+# Determine soft-float options
+ifeq ($(BR2_SOFT_FLOAT),y)
+SOFT_FLOAT_CONFIG_OPTION:=--with-float=soft
+ifeq ($(BR2_arm)$(BR2_armeb),y) # only set float-abi for arm
+TARGET_SOFT_FLOAT:=-mfloat-abi=soft
+else
+TARGET_SOFT_FLOAT:=-msoft-float
+endif
+else # no softfloat support
+SOFT_FLOAT_CONFIG_OPTION:=
+TARGET_SOFT_FLOAT:=
+endif
+
+# Determine arch/tune/abi/cpu options
+ifneq ($(call qstrip,$(BR2_GCC_TARGET_ARCH)),)
+GCC_WITH_ARCH:=--with-arch=$(BR2_GCC_TARGET_ARCH)
+endif
+ifneq ($(call qstrip,$(BR2_GCC_TARGET_TUNE)),)
+GCC_WITH_TUNE:=--with-tune=$(BR2_GCC_TARGET_TUNE)
+endif
+ifneq ($(call qstrip,$(BR2_GCC_TARGET_ABI)),)
+GCC_WITH_ABI:=--with-abi=$(BR2_GCC_TARGET_ABI)
+endif
+ifneq ($(call qstrip,$(BR2_GCC_TARGET_CPU)),)
+GCC_WITH_CPU:=--with-cpu=$(BR2_GCC_TARGET_CPU)
+endif
+
+# AVR32 GCC special configuration
+ifeq ($(BR2_avr32),y)
+# For the cross-compiler
+EXTRA_GCC_CONFIG_OPTIONS += \
+       --disable-libmudflap
+SOFT_FLOAT_CONFIG_OPTION:=
+
+# For the target compiler
+EXTRA_TARGET_GCC_CONFIG_OPTIONS += \
+       --disable-libmudflap
+EXTRA_TARGET_GCC_CONFIG_OPTIONS += \
+       --with-build-time-tools=$(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/bin
+EXTRA_TARGET_GCC_CONFIG_OPTIONS += \
+       --with-as=$(TARGET_CROSS)as
+endif
+
+# Disable mudflap and enable proper double/long double for SPE ABI
+ifeq ($(BR2_powerpc_SPE),y)
+EXTRA_GCC_CONFIG_OPTIONS +=  \
+       --disable-libmudflap \
+       --enable-e500_double \
+       --with-long-double-128
+endif
+
+# End with user-provided options, so that they can override previously
+# defined options.
+EXTRA_GCC_CONFIG_OPTIONS += \
+       $(call qstrip,$(BR2_EXTRA_GCC_CONFIG_OPTIONS))
+EXTRA_TARGET_GCC_CONFIG_OPTIONS += \
+       $(call qstrip,$(BR2_EXTRA_TARGET_GCC_CONFIG_OPTIONS))
+
 #############################################################
 #
 # Setup some initial stuff
@@ -586,3 +644,7 @@ gcc_target-clean:
 
 gcc_target-dirclean:
        rm -rf $(GCC_BUILD_DIR4)
+
+ifeq ($(BR2_PACKAGE_GCC_TARGET),y)
+TARGETS+=gcc_target
+endif