diff --git a/tool/cosmocc/bin/cosmocc b/tool/cosmocc/bin/cosmocc index 7a797da21..ae71ffeba 100755 --- a/tool/cosmocc/bin/cosmocc +++ b/tool/cosmocc/bin/cosmocc @@ -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 diff --git a/tool/cosmocc/bin/cosmocross b/tool/cosmocc/bin/cosmocross index 555efff09..711c2a79f 100755 --- a/tool/cosmocc/bin/cosmocross +++ b/tool/cosmocc/bin/cosmocross @@ -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" ] ||