mirror of
https://github.com/mhx/dwarfs.git
synced 2025-09-10 13:04:15 -04:00
more wip
This commit is contained in:
parent
baaab873b7
commit
019220e3e3
@ -4,7 +4,7 @@ FROM $ARCH/alpine:latest
|
|||||||
|
|
||||||
ARG ARCH
|
ARG ARCH
|
||||||
ARG TARGET_ARCHS
|
ARG TARGET_ARCHS
|
||||||
ARG TOOLCHAIN_OPTIMIZE=s
|
ARG TOOLCHAIN_OPTIMIZE=2
|
||||||
|
|
||||||
RUN apk update
|
RUN apk update
|
||||||
RUN apk upgrade
|
RUN apk upgrade
|
||||||
|
@ -287,7 +287,7 @@ if [[ "-$BUILD_TYPE-" == *-shared-* ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "-$BUILD_TYPE-" == *-static-* ]]; then
|
if [[ "-$BUILD_TYPE-" == *-static-* ]]; then
|
||||||
_SYSROOT="/opt/cross/Os"
|
_SYSROOT="/opt/cross/O2"
|
||||||
_MARCH="${CROSS_ARCH}"
|
_MARCH="${CROSS_ARCH}"
|
||||||
if [[ "$CROSS_ARCH" == "native" ]]; then
|
if [[ "$CROSS_ARCH" == "native" ]]; then
|
||||||
_MARCH="${ARCH}"
|
_MARCH="${ARCH}"
|
||||||
|
@ -261,7 +261,7 @@ cpu = '$CARCH'
|
|||||||
endian = '$endian'
|
endian = '$endian'
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
export SYSROOT="/opt/cross/Os"
|
export SYSROOT="/opt/cross/O2"
|
||||||
export PATH="$SYSROOT/usr/lib/ccache/bin:$SYSROOT/usr/bin:$PATH"
|
export PATH="$SYSROOT/usr/lib/ccache/bin:$SYSROOT/usr/bin:$PATH"
|
||||||
export WORKROOT="$HOME/pkgs"
|
export WORKROOT="$HOME/pkgs"
|
||||||
|
|
||||||
|
@ -78,6 +78,7 @@ ORIGPATH="$PATH"
|
|||||||
|
|
||||||
export CC="/usr/bin/ccache /usr/bin/gcc"
|
export CC="/usr/bin/ccache /usr/bin/gcc"
|
||||||
export CXX="/usr/bin/ccache /usr/bin/g++"
|
export CXX="/usr/bin/ccache /usr/bin/g++"
|
||||||
|
export LD="/usr/bin/ld"
|
||||||
|
|
||||||
for target_arch in ${TARGET_ARCH_STR//,/ }; do
|
for target_arch in ${TARGET_ARCH_STR//,/ }; do
|
||||||
for OPT in ${OPTIMIZE_STR//,/ }; do
|
for OPT in ${OPTIMIZE_STR//,/ }; do
|
||||||
@ -113,8 +114,9 @@ for target_arch in ${TARGET_ARCH_STR//,/ }; do
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
export CFLAGS="-O${OPT} -ffunction-sections -fdata-sections -fmerge-all-constants -fPIC"
|
export BOOT_CFLAGS='-O2 -g0 -pipe'
|
||||||
export CXXFLAGS="$CFLAGS"
|
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"
|
export LDFLAGS="-Wl,--gc-sections"
|
||||||
|
|
||||||
SYSROOT="/opt/cross/O${OPT}"
|
SYSROOT="/opt/cross/O${OPT}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user