On 2010-03-14 15:28-0400 Bill Hoffman wrote:

Perhaps adding the flags causes the compiler to be mis-identified somehow. Can you run with the gcc -g -fvisibility=hidden, and without on a very simple C only project. Then send me the binary trees from both. I am suspecting there will be some sort of error in the compiler id code.

Better yet, let me send you a simple test case project (attached) where
you can easily demonstrate and investigate this issue for yourself.

Note, if you use

export CC='gcc -g'

all is well with this simple test case, and the -fPIC flag is used
appropriately.

However,

export CC='gcc -g -g'

triggers the bug with cmake-2.8.1-rc4.  (i.e., the -fPIC flag is incorrectly
dropped).  I didn't use -fvisibility=hidden for the second flag because
this simple project is not set up for that, and there should be no harm in simply repeating the -g flag. But from my bad PLplot build result with

export CC='gcc -g -fvisibility=hidden'

I expect the dropped -fPIC problem will occur whenever there are two flags
of any kind.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________

Attachment: test_c_library_build.tar.gz
Description: simple test project that illustrates dropped -fPIC bug

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to