cosmoc: update flags
This commit is contained in:
parent
a7b998a0e3
commit
37e18a40ac
@ -8,18 +8,19 @@ stdenv.mkDerivation {
|
||||
dontUnpack = true;
|
||||
dontBuild = true;
|
||||
|
||||
# compiler arguments based on upstream README.md
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p $out/bin
|
||||
cat <<EOF >$out/bin/cosmoc
|
||||
#!${stdenv.shell}
|
||||
exec ${stdenv.cc}/bin/${stdenv.cc.targetPrefix}gcc \
|
||||
-O -static -nostdlib -nostdinc -fno-pie -no-pie -mno-red-zone \
|
||||
-Os -static -nostdlib -nostdinc -fno-pie -no-pie -mno-red-zone \
|
||||
-fno-omit-frame-pointer -pg -mnop-mcount -mno-tls-direct-seg-refs \
|
||||
"\$@" \
|
||||
-Wl,--gc-sections -Wl,-z,max-page-size=0x1000 \
|
||||
-fuse-ld=bfd -Wl,-T,${cosmopolitan}/lib/ape.lds \
|
||||
-fuse-ld=bfd -Wl,-T,${cosmopolitan}/lib/ape.lds -Wl,--gc-sections \
|
||||
-include ${cosmopolitan}/include/cosmopolitan.h \
|
||||
${cosmopolitan}/lib/{crt.o,ape.o,cosmopolitan.a}
|
||||
${cosmopolitan}/lib/{crt.o,ape-no-modify-self.o,cosmopolitan.a}
|
||||
EOF
|
||||
chmod +x $out/bin/cosmoc
|
||||
runHook postInstall
|
||||
|
Loading…
Reference in New Issue
Block a user