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