[LLVMdev] -fPIC warning on every compile on Cygwin

Nick Lewycky nicholas at mxc.ca
Thu Feb 19 09:52:25 PST 2009


Aaron Gray wrote:
> Hi,
>   
> I partly built LLVM on Cygwin yesterday and it was fine as far as it 
> went. But after doing a svn update today I am getting the following 
> warning on every compile :-
>   
> 
>     llvm[3]: Compiling LowerAllocations.cpp for Debug build
>     /usr/src/llvm/lib/Transforms/Utils/LowerAllocations.cpp:1: warning:
>     -fPIC ignored for target (all code is position independent) 
> 
>  
> This maybe happening on other targets too.

Thanks for the report. This is certainly due to my change last night to 
make LLVM build as PIC by default.

Part of the fix is going to be splitting apart whether we're building 
PIC and whether we pass in the -fPIC flag. We want to know whether the 
build is PIC in order to control whether libLTO should be built. On your 
platform we'll still want to build libLTO but don't want to pass the 
-fPIC flag.

The other part of the fix I'm not so sure about. How should the build 
system detect that we're building PIC without the -fPIC flag on this 
platform?

Nick

> Aaron
> 
>  
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev




More information about the llvm-dev mailing list