Ignore -pie and -fpie in cosmocc

Fixes #1126
This commit is contained in:
Justine Tunney 2024-03-22 03:55:01 -07:00
parent bb92347158
commit 1c34088ba0
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
2 changed files with 8 additions and 0 deletions

View file

@ -180,6 +180,10 @@ for x; do
# no support for building dynamic shared objects yet. reports
# indicate that ignoring these flags, helps let autoconf know
continue
elif [ x"$x" = x"-fpie" ] || [ x"$x" = x"-pie" ]; then
# no support for position independent executables
# https://github.com/jart/cosmopolitan/issues/1126
continue
elif [ x"$x" = x"-Werror" ] || \
[ x"$x" = x"-pedantic-errors" ]; then
# this toolchain is intended for building other people's code

View file

@ -142,6 +142,10 @@ for x; do
continue
elif [ x"$x" = x"-fPIC" ]; then
continue
elif [ x"$x" = x"-fpie" ] || [ x"$x" = x"-pie" ]; then
# no support for position independent executables
# https://github.com/jart/cosmopolitan/issues/1126
continue
elif [ x"$x" = x"-r" ] ||
[ x"$x" = x"-pie" ] ||
[ x"$x" = x"-shared" ] ||