This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
How to suppress "warning: -fPIC ignored for target..." under Cygwin
- From: Jeffrey Walton <noloader at gmail dot com>
- To: "gcc-help at gcc dot gnu dot org" <gcc-help at gcc dot gnu dot org>
- Date: Wed, 19 Aug 2015 04:10:37 -0400
- Subject: How to suppress "warning: -fPIC ignored for target..." under Cygwin
- Authentication-results: sourceware.org; auth=none
- Reply-to: noloader at gmail dot com
Under Cygwin, GCC prints out the following warning and the head of
each file it compiles when using -fPIC.
I want to avoid removing PIC because its not clear to me when PIE may
(or may not) be automatically present. That is, users of older
platforms may not have it by default.
What is the -Wno-XXX used to disable the warning? How do I suppress
the extraneous output?
Thanks in advance.
**********
$ make
g++ -DNDEBUG -O3 -g2 -fPIC -march=native -pipe
-DCRYPTOPP_NO_UNALIGNED_DATA_ACCESS -c shacal2.cpp
shacal2.cpp:1:0: warning: -fPIC ignored for target (all code is
position independent)
// shacal2.cpp - by Kevin Springle, 2003
^
g++ -DNDEBUG -O3 -g2 -fPIC -march=native -pipe
-DCRYPTOPP_NO_UNALIGNED_DATA_ACCESS -c seed.cpp
seed.cpp:1:0: warning: -fPIC ignored for target (all code is position
independent)
// seed.cpp - written and placed in the public domain by Wei Dai
^
g++ -DNDEBUG -O3 -g2 -fPIC -march=native -pipe
-DCRYPTOPP_NO_UNALIGNED_DATA_ACCESS -c shark.cpp
shark.cpp:1:0: warning: -fPIC ignored for target (all code is position
independent)
// shark.cpp - written and placed in the public domain by Wei Dai
^
...