File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -23,14 +23,25 @@ RUN apk add --no-cache \
2323 xz \
2424 patch \
2525 # this is required to support building v16 on python 3.12
26- py3-packaging
27-
28- RUN cd /opt \
29- && curl -O https://musl.cc/aarch64-linux-musl-cross.tgz \
30- && tar xzf aarch64-linux-musl-cross.tgz
26+ py3-packaging \
27+ # extra packages required for creating the musl bases cross-compiler
28+ rsync make gcc g++ bzip2 git
29+
30+ COPY <<-EOF /config/config.mak
31+ # We only set the variables that are really needed, others are the sane defaults from the repo itself
32+ TARGET = aarch64-linux-musl
33+ GCC_VER = 14.2.0
34+ OUTPUT = /opt/aarch64-linux-musl-cross
35+ EOF
36+
37+ RUN git clone https://github.com/richfelker/musl-cross-make /musl-cross-make && \
38+ cd /musl-cross-make && \
39+ make -I /config -j$(getconf _NPROCESSORS_ONLN) && \
40+ make -I /config install && \
41+ cd / && \
42+ rm -rf /musl-cross-make
3143
3244COPY --chown=node:node run.sh /home/node/run.sh
33- COPY --chown=node:node 55596.diff /home/node/55596.diff
3445COPY --chown=node:node 51256-v16.diff /home/node/51256-v16.diff
3546
3647VOLUME /home/node/.ccache
Original file line number Diff line number Diff line change @@ -51,14 +51,6 @@ if [ "$major" == "16" ] ; then
5151 patch -d tools -p1 < /home/node/2888.diff
5252fi
5353
54- # Patch needed to support compilation of Node 22 using musl
55- # @see https://github.com/nodejs/node/issues/55596#issuecomment-2451411974
56- # Although the GCC version in Alpine 3.22 is 14, The musl toolchain used is compiled using 11.2 (see https://musl.cc/)
57- # recompiling musl is a step too far, so we add a simple patch that allows us to compile v22
58- if [ " $major " == " 22" ]; then
59- patch -p1 < /home/node/55596.diff
60- fi
61-
6254export CC_host=" ccache gcc"
6355export CXX_host=" ccache g++"
6456export CC=" ccache /opt/aarch64-linux-musl-cross/bin/aarch64-linux-musl-gcc"
You can’t perform that action at this time.
0 commit comments