Non-working "-no-pie" test?

Gabor Greif ggreif at gmail.com
Mon Nov 14 15:57:04 UTC 2016


Hi all,

The test for checking "-no-pie" support of GCC doesn't seem to work. See below:

$ gcc --version
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4)
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ echo 'int main() { return 0; }' > conftest.c

$ if gcc -o conftest -no-pie conftest.c > /dev/null 2>&1 ; then echo
YEP ; else echo NOPE ; fi
YEP
$ if gcc -o conftest -no-pie conftest.c ; then echo YEP ; else echo NOPE ; fi
gcc: unrecognized option '-no-pie'
YEP
$ if gcc -o conftest -no-pie conftest.c > /dev/null ; then echo YEP ;
else echo NOPE ; fi
gcc: unrecognized option '-no-pie'
YEP


Is the test supposed to check that there is nothing output into stdout?

If so, it seems to fail. It leads to lots of failures when "make
test", because gcc gets chatty.

Cheers,

    Gabor

PS: I have bash 4.1.


More information about the ghc-devs mailing list