Skip to content

Commit d36700e

Browse files
committed
review comments
1 parent a25281d commit d36700e

1 file changed

Lines changed: 6 additions & 30 deletions

File tree

build.sh

Lines changed: 6 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -45,29 +45,6 @@ function prepare_sysroot() {
4545
fi
4646
}
4747

48-
function build_zlib() {
49-
echo "** Build zlib **"
50-
51-
# Build a legacy zlib and install into the sysroot.
52-
if [[ ! -d $CURRENT_DIR/zlib-${ZLIB_VER} ]]; then
53-
( cd $CURRENT_DIR; \
54-
wget $ZLIB_URL; \
55-
echo "${ZLIB_SHA} zlib-${ZLIB_VER}.tar.gz" | sha256sum -c; \
56-
tar xzf zlib-${ZLIB_VER}.tar.gz )
57-
fi
58-
59-
if [[ ! -e $PREFIX/lib/libz.a ]]; then
60-
( cd $CURRENT_DIR/zlib-${ZLIB_VER}; \
61-
CC=$TUPLE-gcc \
62-
CXX=$TUPLE-g++ \
63-
CFLAGS=--sysroot=$SYSROOT \
64-
LDFLAGS=--sysroot=$SYSROOT \
65-
./configure --prefix $PREFIX;
66-
make -j $PARALLEL_JOBS; \
67-
make install )
68-
fi
69-
}
70-
7148
function build_llvm() {
7249
echo "** Build LLVM **"
7350

@@ -192,7 +169,6 @@ function build_compiler_libs() {
192169
fi
193170
}
194171

195-
196172
function make_symlink_real() {
197173
symlink=$1
198174

@@ -261,14 +237,13 @@ build_gcc
261237
prepare_sysroot
262238

263239
export PATH=$CURRENT_DIR/$TUPLE/bin:$PATH
264-
build_zlib
265240

266241
# glibc >= 2.26 removed xlocale.h (merged into locale.h). Add an empty stub
267242
# so that code expecting it (e.g. augeas/gnulib) still compiles.
268-
if [[ ! -e $PREFIX/include/xlocale.h ]]; then
269-
echo "/* This header is intentionally empty. */" > $PREFIX/include/xlocale.h
270-
echo "/* glibc >= 2.26 merged xlocale.h into locale.h. */" >> $PREFIX/include/xlocale.h
271-
fi
243+
#if [[ ! -e $PREFIX/include/xlocale.h ]]; then
244+
#echo "/* This header is intentionally empty. */" > $PREFIX/include/xlocale.h
245+
#echo "/* glibc >= 2.26 merged xlocale.h into locale.h. */" >> $PREFIX/include/xlocale.h
246+
#fi
272247

273248
if [[ ! -d $TOOLCHAIN_DIR/stage1 ]]; then
274249
mkdir -p $TOOLCHAIN_DIR/stage1
@@ -434,7 +409,8 @@ PREFIX=$SYSROOT/usr
434409
symlinks_to_transform=(
435410
lib/gcc
436411
bin/addr2line
437-
bin/ar bin/as
412+
bin/ar
413+
bin/as
438414
bin/c++filt
439415
bin/cpp
440416
bin/elfedit

0 commit comments

Comments
 (0)