Guess build system and remove BR2_GNU_BUILD_SUFFIX
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sat, 10 Apr 2010 21:17:25 +0000 (23:17 +0200)
committerPeter Korsgaard <jacmet@sunsite.dk>
Sun, 11 Apr 2010 19:10:33 +0000 (21:10 +0200)
Instead of having a configuration option BR2_GNU_BUILD_SUFFIX, let's
use config.guess to guess the build system type.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Config.in
Makefile
package/Makefile.in
package/qt/qt.mk

index 78e6666ada4fad91e85f056afe8961d552c6d108..6a66d502ab3494a15a5ddabf63d3737d71667e7b 100644 (file)
--- a/Config.in
+++ b/Config.in
@@ -103,19 +103,6 @@ config BR2_STAGING_DIR
 
 source "target/device/Config.in.mirrors"
 
-config BR2_GNU_BUILD_SUFFIX
-       string "GNU build hostname suffix"
-       default "pc-linux-gnu"
-       help
-         The string used to pass to configure scripts via the
-         --build= option.  Just specify the suffix here, the leading
-         arch will be filled in automatically.
-
-         Here's some copy and paste build host options for you:
-             linux:   pc-linux-gnu
-             cygwin:  pc-cygwin
-             os x:    apple-darwin7 / apple-darwin8
-
 config BR2_GNU_TARGET_SUFFIX
        string "GNU target suffix"
        default "linux-uclibcgnueabi" if BR2_ARM_EABI
index 03ed4c5051e234c6207533e91925e5fb743535d9..7fdf69741a9c0ce5455022cdab241c29aa66eb67 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -153,29 +153,31 @@ cc-option=$(shell if $(TARGET_CC) $(TARGET_CFLAGS) $(1) -S -o /dev/null -xc /dev
 unexport CROSS_COMPILE
 unexport ARCH
 
+GNU_HOST_NAME=$(shell package/gnuconfig/config.guess)
+
 #############################################################
 #
 # Setup the proper filename extensions for the host
 #
 ##############################################################
-ifneq ($(findstring linux,$(BR2_GNU_BUILD_SUFFIX)),)
+ifneq ($(findstring linux,$(GNU_HOST_NAME)),)
 HOST_EXEEXT:=
 HOST_LIBEXT:=.a
 HOST_SHREXT:=.so
 endif
-ifneq ($(findstring apple,$(BR2_GNU_BUILD_SUFFIX)),)
+ifneq ($(findstring apple,$(GNU_HOST_NAME)),)
 HOST_EXEEXT:=
 HOST_LIBEXT:=.a
 HOST_SHREXT:=.dylib
 endif
-ifneq ($(findstring cygwin,$(BR2_GNU_BUILD_SUFFIX)),)
+ifneq ($(findstring cygwin,$(GNU_HOST_NAME)),)
 HOST_EXEEXT:=.exe
 HOST_LIBEXT:=.lib
 HOST_SHREXT:=.dll
 HOST_LOADLIBES="-lcurses -lintl"
 export HOST_LOADLIBES
 endif
-ifneq ($(findstring mingw,$(BR2_GNU_BUILD_SUFFIX)),)
+ifneq ($(findstring mingw,$(GNU_HOST_NAME)),)
 HOST_EXEEXT:=.exe
 HOST_LIBEXT:=.lib
 HOST_SHREXT:=.dll
index efb4dec34b1e736c94b0f078ce917a2103f62aa3..8f1a29db2ded0edb9155c2a52b5b2a11d4a2a8f6 100644 (file)
@@ -187,7 +187,6 @@ HOST_ARCH:=$(shell $(HOSTCC) -dumpmachine | sed -e s'/-.*//' \
        -e 's/i[3-9]86/i386/' \
        -e 's/xtensa.*/xtensa/' \
        )
-GNU_HOST_NAME:=$(HOST_ARCH)-$(call qstrip,$(BR2_GNU_BUILD_SUFFIX))
 
 TARGET_CONFIGURE_OPTS=PATH=$(TARGET_PATH) \
                AR="$(TARGET_AR)" \
index 91673491a82e67583cc26357099f0b565e17c39f..4f42e59e86d4f38223d7ef10559a9f0c06b641f6 100644 (file)
@@ -372,7 +372,7 @@ BR2_PACKAGE_QT_EMB_PLATFORM:=$(call qstrip,$(BR2_PACKAGE_QT_EMB_PLATFORM))
 # x86x86fix
 # Workaround Qt Embedded bug when crosscompiling for x86 under x86 with linux
 # host. It's unclear if this would happen on other hosts.
-ifneq ($(findstring pc-linux,$(BR2_GNU_BUILD_SUFFIX)),)
+ifneq ($(findstring unknown-linux,$(GNU_HOST_NAME)),)
 ifneq ($(findstring x86,$(BR2_PACKAGE_QT_EMB_PLATFORM)),)
 QT_CONFIGURE+= -platform linux-g++
 endif