cosmoc: update flags
This commit is contained in:
parent
a7b998a0e3
commit
37e18a40ac
@ -8,18 +8,19 @@ stdenv.mkDerivation {
|
|||||||
dontUnpack = true;
|
dontUnpack = true;
|
||||||
dontBuild = true;
|
dontBuild = true;
|
||||||
|
|
||||||
|
# compiler arguments based on upstream README.md
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
runHook preInstall
|
runHook preInstall
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
cat <<EOF >$out/bin/cosmoc
|
cat <<EOF >$out/bin/cosmoc
|
||||||
#!${stdenv.shell}
|
#!${stdenv.shell}
|
||||||
exec ${stdenv.cc}/bin/${stdenv.cc.targetPrefix}gcc \
|
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 -Wl,--gc-sections \
|
||||||
-fuse-ld=bfd -Wl,-T,${cosmopolitan}/lib/ape.lds \
|
|
||||||
-include ${cosmopolitan}/include/cosmopolitan.h \
|
-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
|
EOF
|
||||||
chmod +x $out/bin/cosmoc
|
chmod +x $out/bin/cosmoc
|
||||||
runHook postInstall
|
runHook postInstall
|
||||||
|
Loading…
Reference in New Issue
Block a user