all: properly use the right cosmopolitan libraries

This commit is contained in:
Connor Olding 2022-10-18 19:02:39 -07:00
parent 53bcb46c1c
commit e09790470e
3 changed files with 16 additions and 3 deletions

View File

@ -46,6 +46,13 @@ build_simple() { : \
;done \ ;done \
;} ;}
build_base() { : \
&& sed 's/\bcosmo-bootstrap\b/cosmo-all/g' \
<cosmo-dist/Dockerfile >cosmo-dist/all.Dockerfile \
&& build cosmo-dist -f cosmo-dist/all.Dockerfile \
&& build cosmo-base \
;}
: \ : \
&& me="$(readlink -f "$0")" && cd "${me%/*}" && { [ -d out ] || mkdir out ;} \ && me="$(readlink -f "$0")" && cd "${me%/*}" && { [ -d out ] || mkdir out ;} \
&& : \ && : \
@ -62,7 +69,7 @@ build_simple() { : \
&& build rescue \ && build rescue \
\ \
`# phase 4` \ `# phase 4` \
&& build cosmo-base \ && build_base \
&& build_simple \ && build_simple \
\ \
`# phase 5` \ `# phase 5` \

View File

@ -15,6 +15,10 @@ RUN : \
commit "$commit" \ commit "$commit" \
flavor "$COSMO_FLAVOR" \ flavor "$COSMO_FLAVOR" \
mode "$mode" \ mode "$mode" \
COSMO "$PWD" \
COSMO_DIST "$PWD/dist/$COSMO_FLAVOR" \
\
&& shed expand "s_o='o/[^']*'_o='o/$mode'_g" \
; ;
RUN --mount=type=tmpfs,target=/tmp : \ RUN --mount=type=tmpfs,target=/tmp : \
@ -44,5 +48,5 @@ RUN --mount=type=tmpfs,target=/tmp : \
install -m0755 -t /usr/local/bin {} \ install -m0755 -t /usr/local/bin {} \
+ \ + \
# save some space: \ # save some space: \
&& find o '(' -name '*.com.dbg' -o -name '*_test.*' -o -name 'test_*' ')' -delete \ && find o -type f '(' -name '*.com.dbg' -o -name '*_test.*' -o -name 'test_*' ')' -delete \
; ;

View File

@ -1,6 +1,8 @@
#!/usr/bin/env sh #!/usr/bin/env sh
cosmo="${COSMO:-"/cosmopolitan"}" cosmo="${COSMO:-"/cosmopolitan"}"
dist="${COSMO_DIST:-"$cosmo/dist/def"}" unset flavor
[ ! -s "$cosmo/env" ] || . "$cosmo/env"
dist="${COSMO_DIST:-"$cosmo/dist/${flavor:-def}"}"
_CFLAGS="-fno-omit-frame-pointer -fdata-sections -ffunction-sections -fno-pie -pg -mnop-mcount -mno-tls-direct-seg-refs" _CFLAGS="-fno-omit-frame-pointer -fdata-sections -ffunction-sections -fno-pie -pg -mnop-mcount -mno-tls-direct-seg-refs"
_CPPFLAGS="-DNDEBUG -nostdinc -iquote $cosmo -isystem $cosmo/libc/isystem -include $cosmo/libc/integral/normalize.inc" _CPPFLAGS="-DNDEBUG -nostdinc -iquote $cosmo -isystem $cosmo/libc/isystem -include $cosmo/libc/integral/normalize.inc"