From 30e2a2aca834adb73584a886bb7206d128794af3 Mon Sep 17 00:00:00 2001 From: Xiangfu Liu Date: Mon, 8 Nov 2010 00:52:05 +0800 Subject: [PATCH] [gcc-mips] fix compile error in 64bit system. ERR MSG: real.h:82: error: size of array 'test_real_width' is negative when gcc-mips compiling. it's first apply openwrt/toolchain/gcc.../patches. it not apply package/gcc-mips/patches. so this patch is manuly apply this patch. Signed-off-by: Xiangfu Liu --- gcc-mips/Makefile | 1 + gcc-mips/patches/001-cache-amnesia.patch | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 gcc-mips/patches/001-cache-amnesia.patch diff --git a/gcc-mips/Makefile b/gcc-mips/Makefile index 79a2b5a..a19e235 100644 --- a/gcc-mips/Makefile +++ b/gcc-mips/Makefile @@ -45,6 +45,7 @@ endef define Build/Prepare $(call Build/Prepare/Default) + ($(CP) ./patches $(PKG_BUILD_DIR); cd $(PKG_BUILD_DIR); patch -Np1 < ./patches/001-cache-amnesia.patch;); $(SED) 's,\(version_string.. = "[0-9\.]*\).*\(";\),\1 (OpenWrt-2.0)\2,' $(PKG_BUILD_DIR)/gcc/version.c $(SED) 's,\(bug_report_url.. = "\).*\(";\),\1\2,' $(PKG_BUILD_DIR)/gcc/version.c (cd $(PKG_BUILD_DIR)/libstdc++-v3; autoconf;); diff --git a/gcc-mips/patches/001-cache-amnesia.patch b/gcc-mips/patches/001-cache-amnesia.patch new file mode 100644 index 0000000..6dab5df --- /dev/null +++ b/gcc-mips/patches/001-cache-amnesia.patch @@ -0,0 +1,13 @@ +diff --git a/gcc/configure b/gcc/configure +index f7d4161..7f11021 100755 +--- a/gcc/configure ++++ b/gcc/configure +@@ -12972,7 +12972,7 @@ else + esac + saved_CFLAGS="${CFLAGS}" + CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \ +- ${realsrcdir}/configure \ ++ CONFIG_SITE= ${realsrcdir}/configure --cache-file=./other.cache \ + --enable-languages=${enable_languages-all} \ + --target=$target_alias --host=$build_alias --build=$build_alias + CFLAGS="${saved_CFLAGS}"