buildroot: factor knowledge of a 64bits architecture
authorFlorian Fainelli <florian@openwrt.org>
Fri, 5 Apr 2013 12:36:19 +0000 (12:36 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Fri, 5 Apr 2013 12:36:19 +0000 (12:36 +0000)
Signed-off-by: Florian Fainelli <florian@openwrt.org>
SVN-Revision: 36204

rules.mk
target/Config.in
toolchain/gcc/final/Makefile

index 56129917e453f32b7f7e5305435dd6fabbdfcd49..d9d38374fa8f7018ad34d3de99faa77cdf444e00 100644 (file)
--- a/rules.mk
+++ b/rules.mk
@@ -132,7 +132,7 @@ endif
 LIBRPC=-lrpc
 LIBRPC_DEPENDS=+librpc
 
-ifneq ($(findstring $(ARCH) , mips64 x86_64 ),)
+ifeq ($(CONFIG_ARCH_64BIT),y)
   LIB_SUFFIX:=64
 endif
 
index 79a91b1afb352a44c0ec4003a4eb3736047658f1..8ff89ff8a9abfa81f410eb556f106b455c9f6940 100644 (file)
@@ -70,6 +70,9 @@ config HAS_MIPS16
        depends (mips || mipsel || mips64 || mips64el)
        bool
 
+config ARCH_64BIT
+       bool
+
 # Architecture selection
 
 config arm
@@ -104,9 +107,11 @@ config mipsel
 
 config mips64
        select BIG_ENDIAN
+       select ARCH_64BIT
        bool
 
 config mips64el
+       select ARCH_64BIT
        bool
 
 config powerpc
@@ -115,6 +120,7 @@ config powerpc
 
 config powerpc64
        select BIG_ENDIAN
+       select ARCH_64BIT
        bool
 
 config sh3
@@ -136,6 +142,7 @@ config sparc
        bool
 
 config x86_64
+       select ARCH_64BIT
        bool
 
 config ARCH
index a667266a0961ad7846c60918a366d7eae3f8ab39..e8c32f629dc77af1eeaae99df135cd54ca407905 100644 (file)
@@ -35,7 +35,7 @@ define CleanupToolchain
        ln -sf ../include $(TOOLCHAIN_DIR)/$(REAL_GNU_TARGET_NAME)/sys-include
        rm -rf $(TOOLCHAIN_DIR)/$(REAL_GNU_TARGET_NAME)/lib
        ln -sf ../lib $(TOOLCHAIN_DIR)/$(REAL_GNU_TARGET_NAME)/lib
-       $(if $(CONFIG_mips64)$(CONFIG_mips64el)$(CONFIG_x86_64),ln -sf ../lib64 $(TOOLCHAIN_DIR)/$(REAL_GNU_TARGET_NAME)/lib64)
+       $(if $(CONFIG_ARCH_64BIT),ln -sf ../lib64 $(TOOLCHAIN_DIR)/$(REAL_GNU_TARGET_NAME)/lib64)
 endef
 
 define Host/Configure