Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
216 views
in Technique[技术] by (71.8m points)

Why does Cygwin's GCC display the first line of every file?

I'm not a regular Cygwin user. I installed Cygwin and Cygwin64 for testing proposed patches.

Here's the output of a typical make:

User@windows-7-x64 ~/cryptopp
$ make
g++ -DNDEBUG -g -O2 -fPIC -march=native -pipe -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 -g -O2 -fPIC -march=native -pipe -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 -g -O2 -fPIC -march=native -pipe -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
 ^
...

Cygwin's make displays the first line of every file it compiles.

Why does Cygwin's make display the first line of every file? How can I stop the behavior?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

The output is due to the warning about the -fPIC command line option, just as it says. Remove the -fPIC option from your makefile's CXXFLAGS (or wherever) and it will go away.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...