diff options
author | Peter Korsgaard <jacmet@sunsite.dk> | 2009-01-22 11:18:44 +0000 |
---|---|---|
committer | Peter Korsgaard <jacmet@sunsite.dk> | 2009-01-22 11:18:44 +0000 |
commit | 77662160bbfbcb18cadb72276e44a8e017772181 (patch) | |
tree | 51231bf70f2bf194c6e62f2141f569446535ccd2 | |
parent | 9caca74d262607bdd11d6634e4ad380056673a8f (diff) | |
download | buildroot-novena-77662160bbfbcb18cadb72276e44a8e017772181.tar.gz buildroot-novena-77662160bbfbcb18cadb72276e44a8e017772181.zip |
toolchain/gcc: make version detection more robust
Thanks to Bernhard for noticing (and less so for causing the problem in
the first place :P)
-rw-r--r-- | toolchain/gcc/gcc-uclibc-4.x.mk | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/toolchain/gcc/gcc-uclibc-4.x.mk b/toolchain/gcc/gcc-uclibc-4.x.mk index d3f4d4389..cd49c1857 100644 --- a/toolchain/gcc/gcc-uclibc-4.x.mk +++ b/toolchain/gcc/gcc-uclibc-4.x.mk @@ -347,7 +347,7 @@ endif # Now for the ugly 3.3.x soft float hack... # ifeq ($(BR2_SOFT_FLOAT),y) -ifeq ($(findstring 3.3.,$(GCC_VERSION)),3.3.) +ifeq ($(findstring x3.3.,x$(GCC_VERSION)),x3.3.) # Make sure we have a soft float specs file for this arch if [ ! -f toolchain/gcc/$(GCC_VERSION)/specs-$(ARCH)-soft-float ]; then \ echo soft float configured but no specs file for this arch; \ @@ -464,20 +464,20 @@ $(GCC_BUILD_DIR3)/.compiled: $(GCC_BUILD_DIR3)/.configured # # gcc-lib dir changes names to gcc with 3.4.mumble # -ifeq ($(findstring 3.4.,$(GCC_VERSION)),3.4.) +ifeq ($(findstring x3.4.,x$(GCC_VERSION)),x3.4.) GCC_LIB_SUBDIR=lib/gcc/$(REAL_GNU_TARGET_NAME)/$(GCC_VERSION) else GCC_LIB_SUBDIR=lib/gcc-lib/$(REAL_GNU_TARGET_NAME)/$(GCC_VERSION) endif # sigh... we need to find a better way -ifeq ($(findstring 4.0.,$(GCC_VERSION)),4.0.) +ifeq ($(findstring x4.0.,x$(GCC_VERSION)),x4.0.) GCC_LIB_SUBDIR=lib/gcc/$(REAL_GNU_TARGET_NAME)/$(GCC_VERSION) endif -ifeq ($(findstring 4.1.,$(GCC_VERSION)),4.1.) +ifeq ($(findstring x4.1.,x$(GCC_VERSION)),x4.1.) GCC_LIB_SUBDIR=lib/gcc/$(REAL_GNU_TARGET_NAME)/$(GCC_VERSION) endif -ifeq ($(findstring 4.2,$(GCC_VERSION)),4.2) -ifneq ($(findstring 4.2.,$(GCC_VERSION)),4.2.) +ifeq ($(findstring x4.2,x$(GCC_VERSION)),x4.2) +ifneq ($(findstring x4.2.,x$(GCC_VERSION)),x4.2.) REAL_GCC_VERSION=$(shell cat $(GCC_SRC_DIR)/gcc/BASE-VER) GCC_LIB_SUBDIR=lib/gcc/$(REAL_GNU_TARGET_NAME)/$(REAL_GCC_VERSION) else @@ -485,7 +485,7 @@ GCC_LIB_SUBDIR=lib/gcc/$(REAL_GNU_TARGET_NAME)/$(GCC_VERSION) endif endif GCC_INCLUDE_DIR:=include -ifeq ($(findstring 4.3,$(GCC_VERSION)),4.3) +ifeq ($(findstring x4.3,x$(GCC_VERSION)),x4.3) GCC_LIB_SUBDIR=lib/gcc/$(REAL_GNU_TARGET_NAME)/$(GCC_VERSION) GCC_INCLUDE_DIR:=include-fixed endif @@ -499,7 +499,7 @@ $(TARGET_DIR)/usr/bin/gcc: $(GCC_BUILD_DIR3)/.compiled # Now for the ugly 3.3.x soft float hack... # ifeq ($(BR2_SOFT_FLOAT),y) -ifeq ($(findstring 3.3.,$(GCC_VERSION)),3.3.) +ifeq ($(findstring x3.3.,x$(GCC_VERSION)),x3.3.) # Add a specs file that defaults to soft float mode. cp toolchain/gcc/$(GCC_VERSION)/specs-$(ARCH)-soft-float $(TARGET_DIR)/usr/lib/gcc-lib/$(REAL_GNU_TARGET_NAME)/$(GCC_VERSION)/specs # Make sure gcc does not think we are cross compiling |