Fix bug in cosmocc / cosmoc++ scripts

The necessary flags weren't being passed when compiling programs as a
single step (i.e. not using `-c` to make intermediate objects).
This commit is contained in:
Justine Tunney 2023-05-01 13:46:15 -07:00
parent 3dac9f8999
commit fc82f77a46
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
2 changed files with 2 additions and 2 deletions

View file

@ -90,7 +90,7 @@ if [ "$HAS_E" = "1" ]; then
elif [ "$HAS_C" = "1" ]; then
set -- $CCFLAGS $CXXFLAGS $CPPFLAGS "$@" -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer
else
set -- $LDFLAGS $CPPFLAGS "$@" $LDLIBS -Wl,-z,common-page-size=4096 -Wl,-z,max-page-size=4096
set -- $LDFLAGS $CXXFLAGS $CPPFLAGS "$@" $LDLIBS -Wl,-z,common-page-size=4096 -Wl,-z,max-page-size=4096
fi
set -- "$CXX" "$@"

View file

@ -92,7 +92,7 @@ if [ "$HAS_E" = "1" ]; then
elif [ "$HAS_C" = "1" ]; then
set -- $CFLAGS $CPPFLAGS "$@" -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer
else
set -- $LDFLAGS $CPPFLAGS "$@" $LDLIBS -Wl,-z,common-page-size=4096 -Wl,-z,max-page-size=4096
set -- $LDFLAGS $CFLAGS $CPPFLAGS "$@" $LDLIBS -Wl,-z,common-page-size=4096 -Wl,-z,max-page-size=4096
fi
set -- "$CC" "$@"