From: Zongchun Yu Zongchun.Yu@freescale.com
Signed-off-by: Zongchun Yu Zongchun.Yu@freescale.com --- .../recipes-devtools/gcc/gcc-linaro-4.9.inc | 1 + ...nteger-type-issue-for-aarch64-small-model.patch | 27 ++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/Fix-large-integer-type-issue-for-aarch64-small-model.patch
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9.inc b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9.inc index 4509ea7..2049080 100644 --- a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9.inc +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9.inc @@ -63,6 +63,7 @@ SRC_URI = "https://releases.linaro.org/%24%7BMMYY%7D/components/toolchain/gcc-linaro/%2... file://0061-target-gcc-includedir.patch \ file://AArch64-Define-BE-loader-name-default-be.patch \ file://use-lib-for-aarch64.patch \ + file://Fix-large-integer-type-issue-for-aarch64-small-model.patch \ "
SRC_URI[md5sum] = "f9d256d120adfbb45dd3e2d22b70cba9" diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/Fix-large-integer-type-issue-for-aarch64-small-model.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/Fix-large-integer-type-issue-for-aarch64-small-model.patch new file mode 100644 index 0000000..0aad2d2 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.9/Fix-large-integer-type-issue-for-aarch64-small-model.patch @@ -0,0 +1,27 @@ +Fix large integer type issue for aarch64 small model. + +32bit vs 64bit host compilers are different. this fix the following +glibc build error in 32bit host: +| ./../include/libc-symbols.h:64:5: warning: "__OPTION_EGLIBC_LOCALE_CODE" is not defined [-Wundef] +| #if __OPTION_EGLIBC_LOCALE_CODE +| ^ +| argp-help.c: In function '_help': +| argp-help.c:1685:1: internal compiler error: Segmentation fault +| } + +Signed-off-by: Zongchun Yu Zongchun.Yu@freescale.com + +diff -uNr a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c +--- a/gcc/config/aarch64/aarch64.c 2015-03-12 05:08:09.000000000 +0800 ++++ b/gcc/config/aarch64/aarch64.c 2015-08-17 16:13:36.000000000 +0800 +@@ -6664,8 +6664,8 @@ + /* Same reasoning as the tiny code model, but the offset cap here is + 4G. */ + if (SYMBOL_REF_WEAK (x) +- || INTVAL (offset) < (HOST_WIDE_INT) -4294967263 +- || INTVAL (offset) > (HOST_WIDE_INT) 4294967264) ++ || !IN_RANGE (INTVAL (offset), HOST_WIDE_INT_C (-4294967263), ++ HOST_WIDE_INT_C (4294967264))) + return SYMBOL_FORCE_TO_MEM; + return SYMBOL_SMALL_ABSOLUTE; +