[toolchains] Support set glibc branch for Occlum glibc build
This commit is contained in:
parent
0c1c0621e6
commit
4027258ec5
@ -2,9 +2,12 @@
|
|||||||
SRC_DIR=/tmp/glibc/glibc
|
SRC_DIR=/tmp/glibc/glibc
|
||||||
BUILD_DIR=/tmp/glibc/glibc_build
|
BUILD_DIR=/tmp/glibc/glibc_build
|
||||||
INSTALL_DIR=/opt/occlum/glibc
|
INSTALL_DIR=/opt/occlum/glibc
|
||||||
|
GLIBC_BRANCH=${1:-"occlum-glibc-2.31"}
|
||||||
|
|
||||||
# GCC 9/10 introduces many new checkings and will cause the build to fail.
|
# GCC 9/10 introduces many new checkings and will cause the build to fail.
|
||||||
if [ "$(gcc -dumpversion)" = "9" -o "$(gcc -dumpversion)" = "10" ]; then
|
if [ "$(gcc -dumpversion)" = "9" ] || \
|
||||||
|
[ "$(gcc -dumpversion)" = "10" ] || \
|
||||||
|
[ "$(gcc -dumpversion)" = "11" ]; then
|
||||||
EXTRA_CFLAGS=-fcommon
|
EXTRA_CFLAGS=-fcommon
|
||||||
EXTRA_CONFIG_OPTION="--disable-werror"
|
EXTRA_CONFIG_OPTION="--disable-werror"
|
||||||
fi
|
fi
|
||||||
@ -20,7 +23,7 @@ rm -rf ${INSTALL_DIR}
|
|||||||
mkdir -p ${SRC_DIR}
|
mkdir -p ${SRC_DIR}
|
||||||
cd ${SRC_DIR}
|
cd ${SRC_DIR}
|
||||||
# Download glibc
|
# Download glibc
|
||||||
git clone -b occlum-glibc-2.31 https://github.com/occlum/glibc .
|
git clone -b ${GLIBC_BRANCH} https://github.com/occlum/glibc .
|
||||||
|
|
||||||
mkdir -p ${BUILD_DIR}
|
mkdir -p ${BUILD_DIR}
|
||||||
cd ${BUILD_DIR}
|
cd ${BUILD_DIR}
|
||||||
|
Loading…
Reference in New Issue
Block a user