[Buildroot] [PATCHv2 01/25] gcc: use BR2_EXTRA_GCC_CONFIG_OPTIONS in gcc-initial and gcc-intermediate

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Sat Jul 13 22:27:24 UTC 2013

When refactoring the internal toolchain backend logic, the code was
changed to pass the custom configure options given through
BR2_EXTRA_GCC_CONFIG_OPTIONS only for the gcc final pass, with the
idea that we're only interested by user customization for the final

However, the beaglebone_defconfig was passing --with-float=hard
--with-fpu=vfpv3-d16 as BR2_EXTRA_GCC_CONFIG_OPTIONS, and since the
refactoring, it was causing build failures of the beaglebone_defconfig
(with messages saying that Busybox is built to use VFP arguments, but
libc/libm are not). This is due to the fact that the gcc intermediate,
which is used to build the C library, wasn't built to generate hard
float, while the final compiler was generating hard float.

So, we get back to the original situation where the options in
BR2_EXTRA_GCC_CONFIG_OPTIONS are passed to all of the compiler
passes. Of course, the specific case of hard float will be fixed by
following patches in this area, but the idea still remains: the three
gcc should have the same options, if those options affected the ABI of
the generated code.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
 package/gcc/Config.in.host                       | 4 +++-
 package/gcc/gcc-initial/gcc-initial.mk           | 3 ++-
 package/gcc/gcc-intermediate/gcc-intermediate.mk | 3 ++-
 3 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/package/gcc/Config.in.host b/package/gcc/Config.in.host
index 0836f9f..a529d14 100644
--- a/package/gcc/Config.in.host
+++ b/package/gcc/Config.in.host
@@ -88,7 +88,9 @@ config BR2_EXTRA_GCC_CONFIG_OPTIONS
 	string "Additional gcc options"
 	default ""
-	  Any additional gcc configure options you may want to include....
+	  Any additional gcc configure options you may want to
+	  include. Those options are applied for all of the gcc
+	  initial, gcc intermediate and gcc final passes.
 	bool "Build/install Objective-C compiler and runtime?"
diff --git a/package/gcc/gcc-initial/gcc-initial.mk b/package/gcc/gcc-initial/gcc-initial.mk
index 05c956a..e468419 100644
--- a/package/gcc/gcc-initial/gcc-initial.mk
+++ b/package/gcc/gcc-initial/gcc-initial.mk
@@ -31,7 +31,8 @@ HOST_GCC_INITIAL_CONF_OPT = \
 	--without-headers \
 	--with-newlib \
 	--disable-largefile \
-	--disable-nls
+	--disable-nls \
+	$(call qstrip,$(BR2_EXTRA_GCC_CONFIG_OPTIONS))
diff --git a/package/gcc/gcc-intermediate/gcc-intermediate.mk b/package/gcc/gcc-intermediate/gcc-intermediate.mk
index 5460000..a666025 100644
--- a/package/gcc/gcc-intermediate/gcc-intermediate.mk
+++ b/package/gcc/gcc-intermediate/gcc-intermediate.mk
@@ -30,7 +30,8 @@ HOST_GCC_INTERMEDIATE_CONF_OPT = \
 	--enable-languages=c \
 	--disable-largefile \
-	--disable-nls
+	--disable-nls \
+	$(call qstrip,$(BR2_EXTRA_GCC_CONFIG_OPTIONS))

More information about the buildroot mailing list