From 69d3d3fca2fb6a2e1d88e85e640e8484376c237f Mon Sep 17 00:00:00 2001 From: "Zheng, Qi" Date: Thu, 16 Sep 2021 11:01:26 +0800 Subject: [PATCH] Fix the error when building glibc with gcc 9 Signed-off-by: Zheng, Qi --- tools/toolchains/glibc/build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/toolchains/glibc/build.sh b/tools/toolchains/glibc/build.sh index 89ea095d..4c45c3f8 100755 --- a/tools/toolchains/glibc/build.sh +++ b/tools/toolchains/glibc/build.sh @@ -3,8 +3,8 @@ SRC_DIR=/tmp/glibc/glibc BUILD_DIR=/tmp/glibc/glibc_build INSTALL_DIR=/opt/occlum/glibc -# GCC 10 introduces many new checkings and will cause the build to fail. -if [ "$(gcc -dumpversion)" = "10" ]; then +# GCC 9/10 introduces many new checkings and will cause the build to fail. +if [ "$(gcc -dumpversion)" = "9" -o "$(gcc -dumpversion)" = "10" ]; then EXTRA_CFLAGS=-fcommon EXTRA_CONFIG_OPTION="--disable-werror" fi