Skip to content

Commit

Permalink
Fix bug in cosmocc / cosmoc++ scripts
Browse files Browse the repository at this point in the history
The necessary flags weren't being passed when compiling programs as a
single step (i.e. not using `-c` to make intermediate objects).
  • Loading branch information
jart committed May 1, 2023
1 parent 3dac9f8 commit fc82f77
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tool/scripts/cosmoc++
Original file line number Diff line number Diff line change
Expand Up @@ -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" "$@"
Expand Down
2 changes: 1 addition & 1 deletion tool/scripts/cosmocc
Original file line number Diff line number Diff line change
Expand Up @@ -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" "$@"
Expand Down

0 comments on commit fc82f77

Please sign in to comment.