@@ -41,12 +41,22 @@ echo "Using $GCC and $CLANG"
4141if [[ " $PKGS " == " :ubuntu" ]]; then
4242 PKGS=" file,bzip2,libarchive,flac,libunwind,benchmark,openssl,cpptrace"
4343 COMPILERS=" clang gcc"
44- elif [[ " $PKGS " == " :alpine" ]]; then
45- PKGS=" benchmark,boost,brotli,cpptrace,double-conversion,flac,fmt,fuse,glog,jemalloc,libarchive,libunwind,libressl,lz4,mimalloc,openssl,xxhash,xz,zstd"
44+ elif [[ " $PKGS " == " :alpine" * ]]; then
45+ if [[ " $PKGS " == " :alpine" ]]; then
46+ PKGS=" benchmark,boost,brotli,cpptrace,double-conversion,flac,fmt,fuse,glog,jemalloc,libarchive,libunwind,libressl,lz4,mimalloc,openssl,xxhash,xz,zstd"
47+ else
48+ PKGS=" ${PKGS#: alpine: } "
49+ fi
4650 export COMMON_CFLAGS=" -ffunction-sections -fdata-sections -fmerge-all-constants"
4751 export COMMON_CXXFLAGS=" $COMMON_CFLAGS "
52+ export COMMON_LDFLAGS=" -fuse-ld=mold"
4853 # COMPILERS="clang clang-lto clang-minsize-lto gcc"
49- COMPILERS=" clang clang-minsize-lto gcc"
54+ if [[ " $ARCH " != " x86_64" && " $ARCH " != " aarch64" ]]; then
55+ # Let's keep it simple for more exotic architectures
56+ COMPILERS=" clang-minsize-lto"
57+ else
58+ COMPILERS=" clang clang-minsize-lto gcc"
59+ fi
5060elif [[ " $PKGS " == " :none" ]]; then
5161 echo " No libraries to build"
5262 exit 0
@@ -451,7 +461,9 @@ for COMPILER in $COMPILERS; do
451461 ./configure --prefix=" $prefix " \
452462 --without-iconv --without-xml2 --without-expat \
453463 --without-bz2lib --without-zlib \
454- --disable-shared --disable-acl --disable-xattr
464+ --disable-shared --disable-acl --disable-xattr \
465+ --disable-bsdtar --disable-bsdcat --disable-bsdcpio \
466+ --disable-bsdunzip
455467 make -j$( nproc)
456468 make install
457469 done
@@ -472,7 +484,8 @@ for COMPILER in $COMPILERS; do
472484 cd " $HOME /pkgs/$COMPILER "
473485 tar xf ../${FLAC_TARBALL}
474486 cd flac-${FLAC_VERSION}
475- ./configure --prefix=" $INSTALL_DIR " --enable-static=yes --enable-shared=no --disable-doxygen-docs --disable-ogg --disable-programs --disable-examples
487+ ./configure --prefix=" $INSTALL_DIR " --enable-static=yes --enable-shared=no \
488+ --disable-doxygen-docs --disable-ogg --disable-programs --disable-examples
476489 make -j$( nproc)
477490 make install
478491 fi
0 commit comments