Non-working "-no-pie" test?
Ben Gamari
ben at smart-cactus.org
Mon Nov 14 17:16:26 UTC 2016
Gabor Greif <ggreif at gmail.com> writes:
> 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?
>
Oh dear; it seems that GCC prior to 4.8 doesn't exit with a non-zero
exit code when faced with an unrecognized flag. Could you verify that
https://phabricator.haskell.org/D2707 fixes this?
Cheers,
- Ben
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 454 bytes
Desc: not available
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20161114/9786fe44/attachment.sig>
More information about the ghc-devs
mailing list