all: use cosmopolitan make.com everywhere
This commit is contained in:
parent
16fe288a9f
commit
4ef5dd5a5e
2 changed files with 14 additions and 5 deletions
|
@ -25,9 +25,6 @@ RUN --mount=type=cache,id=common,target=/media/common,sharing=locked \
|
|||
|
||||
FROM localhost/cosmo AS builder
|
||||
|
||||
# TODO: this shouldn't be necessary!
|
||||
RUN apk add --no-cache make
|
||||
|
||||
COPY --from=downloader /perl /perl
|
||||
RUN : \
|
||||
&& cd cosmopolitan \
|
||||
|
@ -51,12 +48,14 @@ RUN : \
|
|||
&& tar zxf dist/headers.tar.gz \
|
||||
\
|
||||
&& for f in \
|
||||
bin/make.com \
|
||||
bin/unzip.com \
|
||||
bin/zip.com \
|
||||
;do : \
|
||||
&& cp -- "$f" /a.out \
|
||||
&& /cosmopolitan/bin/ape bin/assimilate.com /a.out \
|
||||
&& bin/ape bin/assimilate.com /a.out \
|
||||
&& install -m0755 /a.out "/usr/bin/$(basename "${f%.com}")" \
|
||||
|| exit \
|
||||
;done \
|
||||
\
|
||||
&& rm /usr/bin/strings \
|
||||
|
@ -64,6 +63,7 @@ RUN : \
|
|||
;do : \
|
||||
&& g="$(basename "$f")" \
|
||||
&& ln -s "$(realpath "$f")" "/usr/bin/${g#x86_64-linux-musl-}" \
|
||||
|| exit \
|
||||
;done \
|
||||
;
|
||||
|
||||
|
|
|
@ -32,11 +32,13 @@ RUN --mount=type=cache,id=common,target=/media/common,sharing=locked \
|
|||
|
||||
FROM localhost/cosmo AS builder
|
||||
|
||||
RUN apk add --no-cache autoconf gperf make
|
||||
RUN apk add --no-cache autoconf gperf
|
||||
|
||||
RUN : \
|
||||
&& cd /cosmopolitan \
|
||||
&& tar zxf dist/headers.tar.gz \
|
||||
&& install -m0755 bin/make.com /usr/bin/make \
|
||||
&& bin/ape bin/assimilate.com /usr/bin/make \
|
||||
;
|
||||
COPY --chmod=0755 --from=localhost/notwa-util /nu/cosmocc /nu/quickconf /nu/shed /usr/bin/
|
||||
|
||||
|
@ -47,6 +49,8 @@ RUN : \
|
|||
&& shed src/application.c '/#include <unistd.h>/i\\#include <time.h>' \
|
||||
# completely override CFLAGS: \
|
||||
&& shed configure '/passtocompiler -fpic/i\\CFLAGS=" -O2 -g -Wall"' \
|
||||
# mitigate issues with 'shell' command (this related to using landlocked make) \
|
||||
&& shed makefile.in '/^INCLUDES=/c\INCLUDES=-I../build' \
|
||||
# we don't need -static here because it's already part of cosmocc: \
|
||||
&& CC=cosmocc ./configure \
|
||||
;
|
||||
|
@ -83,6 +87,11 @@ RUN : \
|
|||
&& shed src/terms/bv_constants.c 's/\bhextoint\b/&_/g' \
|
||||
&& shed src/terms/bv64_constants.c 's/\bhextoint\b/&_/g' \
|
||||
&& shed src/utils/timeout.c '/#include <unistd.h>/i\\#include <time.h>' \
|
||||
# mitigate issues with 'shell' command (this related to using landlocked make) \
|
||||
&& shed Makefile \
|
||||
'/^ARCH=/c\ARCH=x86_64-pc-linux-gnu' \
|
||||
'/^POSIXOS=/c\POSIXOS=linux' \
|
||||
'/^YICES_TOP_DIR=/c\YICES_TOP_DIR=/yices' \
|
||||
# the static-lib target attempts to build a dynamic library. don't do that. \
|
||||
&& shed src/Makefile 's/ $(static_libyices_dynamic)//g' \
|
||||
\
|
||||
|
|
Loading…
Reference in a new issue