cosmo: update version and remove patch (merged upstream)

This commit is contained in:
Connor Olding 2022-10-11 05:19:43 -07:00
parent b785e4cd62
commit 667ab1d097
2 changed files with 3 additions and 1673 deletions

View File

@ -1,8 +1,8 @@
# MAIN: https://justine.lol/cosmopolitan/
# REPO: https://github.com/jart/cosmopolitan
ARG COSMO_FLAVOR=def
ARG COSMO_COMMIT=d5910e267352319359477d2a533c93ac7d883c95
ARG COSMO_SHA256=a8cb999cbe7c6c9405c7aa9c51e54eee61177bc46efe8f88ec68393c776d5ceb
ARG COSMO_COMMIT=31dab8a75d928df7a4cd2e9bcf42916b1810d085
ARG COSMO_SHA256=4acafc98fa38a2429941ed46cbec4ac7c0c313641397d9c1fcda1a8e9115df80
FROM localhost/notwa-util AS downloader
ARG COSMO_COMMIT COSMO_SHA256
@ -20,7 +20,6 @@ WORKDIR /cosmopolitan
# tell makefiles to be less noisy, also use /tmp:
ENV V=0 COLUMNS=80 TMPDIR=/tmp
COPY unbourne-backports.patch /cosmopolitan/
COPY --chmod=0755 --from=localhost/notwa-util /nu/ /usr/bin/
RUN : \
# allow optimized builds to be more portable, so the container is too. \
@ -35,20 +34,16 @@ RUN : \
'/\bNET_HTTP\b/i\\tTHIRD_PARTY_LINENOISE\t\t\\' \
# include LoadZipArgs in cosmopolitan.a \
'/\bNET_HTTP\b/i\\tTOOL_ARGS\t\t\\' \
# include nsync_cv_signal and nsync_cv_wait_with_deadline in cosmopolitan.a \
'/\bTHIRD_PARTY_NSYNC_MALLOC\b/i\\tTHIRD_PARTY_NSYNC_MEM\t\t\\' \
# add missing includes \
&& shed libc/elf/elf.h '/"libc\/elf\/struct\/ehdr.h"/i\\#include "libc/elf/struct/dyn.h"' \
# awk's pledge isn't working for me for whatever reason \
&& shed third_party/awk/main.c '/pledge.*{/,/}/d' \
# create a mapping from flavor to mode (possibly an empty string) \
&& { [ "$COSMO_FLAVOR" != def ] && mode="$COSMO_FLAVOR" || mode=; } \
&& { [ "$COSMO_FLAVOR" != def ] && mode="$COSMO_FLAVOR" || mode= ;} \
&& printf '%s="%s"\n' >env \
commit "$COSMO_COMMIT" \
flavor "$COSMO_FLAVOR" \
mode "$mode" \
# apply patches from dash to unbourne shell \
&& /usr/bin/busybox patch -p1 -i unbourne-backports.patch \
# make calling make a little shorter (don't put this in distrib!) \
&& printf '%s\n' >makeit '#!/usr/bin/env sh' \
"build/bootstrap/make.com -j2 MODE='$mode'"' "$@"' \
@ -112,7 +107,6 @@ RUN : \
# install the rest
FROM builder AS distrib
COPY --chmod=0755 --from=localhost/notwa-util /nu/dedupe /usr/bin/
RUN --mount=type=tmpfs,target=/tmp : \
&& . ./env \
&& find o -name '*.sym' -delete \

File diff suppressed because it is too large Load Diff