mirror of
https://github.com/mhx/dwarfs.git
synced 2025-09-11 13:30:47 -04:00
wipwipwip
This commit is contained in:
parent
c3c70a4bf9
commit
baaab873b7
@ -38,6 +38,8 @@ RUN qemu_pkgs=""; \
|
|||||||
bison \
|
bison \
|
||||||
flex \
|
flex \
|
||||||
ronn \
|
ronn \
|
||||||
|
perf \
|
||||||
|
py3-pip \
|
||||||
fuse \
|
fuse \
|
||||||
fuse3 \
|
fuse3 \
|
||||||
pkgconf \
|
pkgconf \
|
||||||
@ -103,8 +105,6 @@ RUN if ! [ "$ARCH" == "amd64" ] || [ "$ARCH" == "arm64v8" ]; then \
|
|||||||
echo "See https://github.com/upx/upx/discussions/793 for details."; \
|
echo "See https://github.com/upx/upx/discussions/793 for details."; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# TODO: move up
|
|
||||||
RUN apk add --no-cache py3-pip
|
|
||||||
RUN pip3 install --break-system-packages --root-user-action ignore mistletoe
|
RUN pip3 install --break-system-packages --root-user-action ignore mistletoe
|
||||||
|
|
||||||
# Set up git & user
|
# Set up git & user
|
||||||
|
@ -16,8 +16,6 @@ GCC_TARBALL=gcc-${GCC_VERSION}.tar.xz
|
|||||||
MUSL_TARBALL=musl-${MUSL_VERSION}.tar.gz
|
MUSL_TARBALL=musl-${MUSL_VERSION}.tar.gz
|
||||||
LINUX_TARBALL=linux-${LINUX_VERSION}.tar.xz
|
LINUX_TARBALL=linux-${LINUX_VERSION}.tar.xz
|
||||||
|
|
||||||
export PATH="/usr/lib/ccache/bin:$PATH"
|
|
||||||
|
|
||||||
cd "$HOME"
|
cd "$HOME"
|
||||||
mkdir pkgs
|
mkdir pkgs
|
||||||
cd pkgs
|
cd pkgs
|
||||||
@ -78,6 +76,9 @@ fetch.sh https://gcc.gnu.org/pipermail/gcc-patches/attachments/20250220/c6211b02
|
|||||||
|
|
||||||
ORIGPATH="$PATH"
|
ORIGPATH="$PATH"
|
||||||
|
|
||||||
|
export CC="/usr/bin/ccache /usr/bin/gcc"
|
||||||
|
export CXX="/usr/bin/ccache /usr/bin/g++"
|
||||||
|
|
||||||
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
|
||||||
echo "==========================================================="
|
echo "==========================================================="
|
||||||
@ -112,13 +113,13 @@ for target_arch in ${TARGET_ARCH_STR//,/ }; do
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
CFLAGS="-O${OPT} -ffunction-sections -fdata-sections -fmerge-all-constants -fPIC"
|
export CFLAGS="-O${OPT} -ffunction-sections -fdata-sections -fmerge-all-constants -fPIC"
|
||||||
CXXFLAGS="-O${OPT} -ffunction-sections -fdata-sections -fmerge-all-constants -fPIC"
|
export CXXFLAGS="$CFLAGS"
|
||||||
LDFLAGS="-Wl,--gc-sections"
|
export LDFLAGS="-Wl,--gc-sections"
|
||||||
|
|
||||||
SYSROOT="/opt/cross/O${OPT}"
|
SYSROOT="/opt/cross/O${OPT}"
|
||||||
PREFIX="$SYSROOT/usr"
|
PREFIX="$SYSROOT/usr"
|
||||||
PATH="$ORIGPATH:$PREFIX/bin"
|
PATH="$PREFIX/bin:$ORIGPATH"
|
||||||
|
|
||||||
GCC_NODOCS="MAKEINFO=/bin/true gcc_cv_prog_makeinfo_modern=no HELP2MAN=/bin/true TEXI2POD=/bin/true POD2MAN=/bin/true"
|
GCC_NODOCS="MAKEINFO=/bin/true gcc_cv_prog_makeinfo_modern=no HELP2MAN=/bin/true TEXI2POD=/bin/true POD2MAN=/bin/true"
|
||||||
|
|
||||||
@ -163,6 +164,12 @@ for target_arch in ${TARGET_ARCH_STR//,/ }; do
|
|||||||
make install
|
make install
|
||||||
cp libssp_nonshared.a $PREFIX/$TARGET/lib/
|
cp libssp_nonshared.a $PREFIX/$TARGET/lib/
|
||||||
|
|
||||||
|
if [[ "$TARGETARCH" == "$ARCH" ]]; then
|
||||||
|
# Fix for aarch64 build: rsync musl headers to native sysroot
|
||||||
|
rsync -av $PREFIX/$TARGET/include/ $PREFIX/include/
|
||||||
|
rsync -av $PREFIX/$TARGET/lib/ $PREFIX/lib/
|
||||||
|
fi
|
||||||
|
|
||||||
# Stage 2
|
# Stage 2
|
||||||
cd "$HOME"/pkgs
|
cd "$HOME"/pkgs
|
||||||
mkdir gcc-${GCC_VERSION}-build-${TARGETARCH}-O${OPT}-final
|
mkdir gcc-${GCC_VERSION}-build-${TARGETARCH}-O${OPT}-final
|
||||||
@ -170,6 +177,7 @@ for target_arch in ${TARGET_ARCH_STR//,/ }; do
|
|||||||
|
|
||||||
"$HOME"/pkgs/gcc-${GCC_VERSION}/configure \
|
"$HOME"/pkgs/gcc-${GCC_VERSION}/configure \
|
||||||
--target=$TARGET --prefix=$PREFIX --with-sysroot=$SYSROOT ${GCC_CONFIGURE_ARGS} \
|
--target=$TARGET --prefix=$PREFIX --with-sysroot=$SYSROOT ${GCC_CONFIGURE_ARGS} \
|
||||||
|
--with-gmp=/usr --with-mpfr=/usr --with-mpc=/usr \
|
||||||
--disable-shared --enable-tls --disable-libstdcxx-pch --disable-multilib --disable-nls --disable-werror --disable-symvers \
|
--disable-shared --enable-tls --disable-libstdcxx-pch --disable-multilib --disable-nls --disable-werror --disable-symvers \
|
||||||
--enable-threads --enable-__cxa_atexit --enable-languages=c,c++ --enable-link-serialization=2 --enable-linker-build-id \
|
--enable-threads --enable-__cxa_atexit --enable-languages=c,c++ --enable-link-serialization=2 --enable-linker-build-id \
|
||||||
--enable-libssp --disable-libsanitizer --with-system-zlib --enable-checking=release --disable-cet --disable-fixed-point \
|
--enable-libssp --disable-libsanitizer --with-system-zlib --enable-checking=release --disable-cet --disable-fixed-point \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user