Update to Bookworm + musl 1.2.5

Also, fix `CFLAGS` bug and add `norelro` to avoid huge size increases on some architectures. 🚀
This commit is contained in:
Tianon Gravi 2025-01-21 15:06:03 -08:00
parent 680f908cc1
commit a71acd2dfb
12 changed files with 8 additions and 7 deletions

View File

@ -1,5 +1,5 @@
# explicitly use Debian for maximum cross-architecture compatibility
FROM debian:bullseye-slim
FROM debian:bookworm-slim
RUN set -eux; \
apt-get update; \
@ -36,7 +36,7 @@ RUN set -eux; \
rm -rf /var/lib/apt/lists/*
# https://musl.libc.org/releases.html
ENV MUSL_VERSION 1.2.4
ENV MUSL_VERSION 1.2.5
RUN set -eux; \
wget -O musl.tgz.asc "https://musl.libc.org/releases/musl-$MUSL_VERSION.tar.gz.asc"; \
wget -O musl.tgz "https://musl.libc.org/releases/musl-$MUSL_VERSION.tar.gz"; \
@ -64,21 +64,21 @@ RUN set -ex; \
make clean all test \
TARGET_ARCH='arm32v5' \
CROSS_COMPILE='arm-linux-gnueabi-' \
# CFLAGS+='-march=armv5te' \
# EXTRA_CFLAGS='-march=armv5te' \
ARCH_TEST='armel'
RUN set -ex; \
make clean all test \
TARGET_ARCH='arm32v6' \
CROSS_COMPILE='arm-linux-gnueabi-' \
CFLAGS+='-march=armv6+fp' \
EXTRA_CFLAGS='-march=armv6+fp' \
ARCH_TEST='armhf'
RUN set -ex; \
make clean all test \
TARGET_ARCH='arm32v7' \
CROSS_COMPILE='arm-linux-gnueabihf-' \
# CFLAGS+='-march=armv7-a+fp' \
# EXTRA_CFLAGS='-march=armv7-a+fp' \
ARCH_TEST='armhf'
RUN set -ex; \
@ -103,7 +103,7 @@ RUN set -ex; \
make clean all test \
TARGET_ARCH='ppc64le' \
CROSS_COMPILE='powerpc64le-linux-gnu-' \
CFLAGS+='-mlong-double-64' \
EXTRA_CFLAGS='-mlong-double-64' \
ARCH_TEST='ppc64el'
RUN set -ex; \

View File

@ -4,7 +4,8 @@ TARGET_ARCH := amd64
export ARCH_TEST :=
C_TARGETS := $(addsuffix hello, $(wildcard $(TARGET_ARCH)/*/))
export CFLAGS := -Os -fdata-sections -ffunction-sections -s
# norelro: https://stackoverflow.com/a/59084373/433558
export CFLAGS := -Os -fdata-sections -ffunction-sections -Wl,-z,norelro -s $(EXTRA_CFLAGS)
STRIP := $(CROSS_COMPILE)strip
.PHONY: all

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.