This commit is contained in:
Marcus Holland-Moritz 2025-07-26 00:16:20 +02:00
parent baaab873b7
commit 019220e3e3
4 changed files with 7 additions and 5 deletions

View File

@ -4,7 +4,7 @@ FROM $ARCH/alpine:latest
ARG ARCH
ARG TARGET_ARCHS
ARG TOOLCHAIN_OPTIMIZE=s
ARG TOOLCHAIN_OPTIMIZE=2
RUN apk update
RUN apk upgrade

View File

@ -287,7 +287,7 @@ if [[ "-$BUILD_TYPE-" == *-shared-* ]]; then
fi
if [[ "-$BUILD_TYPE-" == *-static-* ]]; then
_SYSROOT="/opt/cross/Os"
_SYSROOT="/opt/cross/O2"
_MARCH="${CROSS_ARCH}"
if [[ "$CROSS_ARCH" == "native" ]]; then
_MARCH="${ARCH}"

View File

@ -261,7 +261,7 @@ cpu = '$CARCH'
endian = '$endian'
EOF
export SYSROOT="/opt/cross/Os"
export SYSROOT="/opt/cross/O2"
export PATH="$SYSROOT/usr/lib/ccache/bin:$SYSROOT/usr/bin:$PATH"
export WORKROOT="$HOME/pkgs"

View File

@ -78,6 +78,7 @@ ORIGPATH="$PATH"
export CC="/usr/bin/ccache /usr/bin/gcc"
export CXX="/usr/bin/ccache /usr/bin/g++"
export LD="/usr/bin/ld"
for target_arch in ${TARGET_ARCH_STR//,/ }; do
for OPT in ${OPTIMIZE_STR//,/ }; do
@ -113,8 +114,9 @@ for target_arch in ${TARGET_ARCH_STR//,/ }; do
;;
esac
export CFLAGS="-O${OPT} -ffunction-sections -fdata-sections -fmerge-all-constants -fPIC"
export CXXFLAGS="$CFLAGS"
export BOOT_CFLAGS='-O2 -g0 -pipe'
export CFLAGS="-O${OPT} -ffunction-sections -fdata-sections -fmerge-all-constants -fomit-frame-pointer -fPIC"
export CXXFLAGS="$CFLAGS -fno-semantic-interposition"
export LDFLAGS="-Wl,--gc-sections"
SYSROOT="/opt/cross/O${OPT}"