mirror of
https://github.com/mhx/dwarfs.git
synced 2025-09-08 03:49:44 -04:00
more wip
This commit is contained in:
parent
baaab873b7
commit
019220e3e3
@ -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
|
||||
|
@ -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}"
|
||||
|
@ -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"
|
||||
|
||||
|
@ -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}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user