BUILD_SHARED_LIBS build

Rafael EspĂ­ndola rafael.espindola at gmail.com
Mon Nov 24 07:47:21 PST 2014


It was committed as r221530.

On 24 November 2014 at 05:45, Khilan Gudka <Khilan.Gudka at cl.cam.ac.uk> wrote:
> I mean for when compiling under FreeBSD.
>
>
> --
> Khilan Gudka
> Research Associate
> Security Group
> Computer Laboratory
> University of Cambridge
> http://www.cl.cam.ac.uk/~kg365/
>
> On 24 November 2014 at 10:24, Khilan Gudka <Khilan.Gudka at cl.cam.ac.uk>
> wrote:
>>
>> Hi Rafael
>>
>> I'm also experiencing this with FreeBSD's linker (10.0-RELEASE-p12).
>> Applying your patch resolves the issue. Would it make sense to commit the
>> patch?
>>
>> Thanks
>>
>> --
>> Khilan Gudka
>> Research Associate
>> Security Group
>> Computer Laboratory
>> University of Cambridge
>> http://www.cl.cam.ac.uk/~kg365/
>>
>> On 5 November 2014 at 17:41, Rafael EspĂ­ndola <rafael.espindola at gmail.com>
>> wrote:
>>>
>>> > The reduced testcase is attached. Build it with
>>> >
>>> > gcc test3.c -fPIC -shared -o test3.so
>>> > gcc test2.c -fPIC -shared -o test2.so test3.so
>>> > gcc test.c -o test test2.so -fuse-ld=gold # works
>>> > gcc test.c -o test test2.so -fuse-ld=bfd #fails
>>> >
>>> > Maybe we should just require a non-broken linker for BUILD_SHARED_LIBS?
>>>
>>> Good news is that bfd ld has a command line option to enable the sane
>>> behavior, so we should be able to just use the attached patch. With it
>>> we get fewer bogus dependencies. For example, we go from
>>>
>>> build
>>> lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/AggressiveAntiDepBreaker.cpp.o:
>>> CXX_COMPILER
>>> /home/espindola/llvm/llvm/lib/CodeGen/AggressiveAntiDepBreaker.cpp
>>> || include/llvm/IR/intrinsics_gen lib/libLLVMSupport.so
>>> lib/libLLVMCore.so lib/libLLVMBitReader.so
>>> lib/libLLVMTransformUtils.so lib/libLLVMInstCombine.so
>>> lib/libLLVMScalarOpts.so lib/libLLVMipa.so lib/libLLVMAnalysis.so
>>> lib/libLLVMMCParser.so lib/libLLVMMC.so lib/libLLVMObject.so
>>> lib/libLLVMTarget.so lib/libLLVMProfileData.so
>>>
>>> to
>>>
>>> build
>>> lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/AggressiveAntiDepBreaker.cpp.o:
>>> CXX_COMPILER
>>> /home/espindola/llvm/llvm/lib/CodeGen/AggressiveAntiDepBreaker.cpp
>>> || include/llvm/IR/intrinsics_gen lib/libLLVMSupport.so
>>> lib/libLLVMCore.so lib/libLLVMTransformUtils.so
>>> lib/libLLVMScalarOpts.so lib/libLLVMAnalysis.so lib/libLLVMMC.so
>>> lib/libLLVMTarget.so
>>>
>>> Cheers,
>>> Rafael
>>>
>>> _______________________________________________
>>> llvm-commits mailing list
>>> llvm-commits at cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>>
>>
>




More information about the llvm-commits mailing list