[llvm-commits] Fix cmake for Hexagon cross compilers

Douglas Gregor dgregor at apple.com
Mon Aug 6 23:16:26 PDT 2012


On Aug 6, 2012, at 1:11 PM, Sebastian Pop <spop at codeaurora.org> wrote:

> Ping^4.
> 
> Hi, I'm waiting for a month now for an OK to commit.
> It seems that really nobody except me cares for this change.
> Does it really matter to somebody if I'm pushing this change out to svn?
> 
> How should I proceed in timeout cases like this?

Patch looks good, please go ahead and commit. If this happens again, please CC me. If I can't review the patch, I'll find someone who can. Sorry about that!

	- Doug

> Thanks,
> Sebastian
> 
> 
> On Wed, Aug 1, 2012 at 10:43 AM, Sebastian Pop <spop at codeaurora.org> wrote:
>> Ping^2.
>> 
>> Looks like nobody finds anything to say about this patch:
>> could then somebody ok the patch?
>> 
>> Thanks,
>> Sebastian
>> 
>> On Wed, Jul 18, 2012 at 10:55 PM, Sebastian Pop <spop at codeaurora.org> wrote:
>>> On Tue, Jul 3, 2012 at 11:51 PM, Sebastian Pop <spop at codeaurora.org> wrote:
>>>> On Tue, Jul 3, 2012 at 10:42 PM, Sebastian Pop <spop at codeaurora.org> wrote:
>>>>> Hi,
>>>>> 
>>>>> here is a patch that allows us to use cmake to specify a cross
>>>>> compiler for Hexagon.
>>>>> 
>>>>> In particular, the patch adds a missing case for the target Hexagon in
>>>>> cmake/config-ix.cmake, and it moves LLVM_DEFAULT_TARGET_TRIPLE and TARGET_TRIPLE
>>>>> variables from cmake/config-ix.cmake to the toplevel CMakeLists.txt to make them
>>>>> available at configure time. Here is the command line that I have used to test
>>>>> my patches:
>>>>> 
>>>>> $ cmake -G Ninja -D BUILD_SHARED_LIBS:BOOL=ON -D
>>>>> LLVM_TARGETS_TO_BUILD:STRING=Hexagon -D
>>>>> TARGET_TRIPLE:STRING=hexagon-unknown-linux-gnu -D
>>>>> LLVM_DEFAULT_TARGET_TRIPLE:STRING=hexagon-unknown-linux-gnu -D
>>>>> LLVM_TARGET_ARCH:STRING=hexagon-unknown-linux-gnu -D
>>>>> LLVM_ENABLE_PIC:BOOL=OFF ..
>>>>> $ ninja check
>>>>> 
>>>> 
>>>> With this cmake command, building clang fails for two programs
>>>> c-arcmt-test and c-index-test like this:
>>>> 
>>>> [102/649] Linking CXX executable bin/c-index-test
>>>> FAILED: : && /usr/bin/c++   -fno-common -Woverloaded-virtual
>>>> -Wcast-qual -fno-strict-aliasing -pedantic -Wno-long-long -Wall -W
>>>> -Wno-unused-parameter -Wwrite-strings -fno-rtti
>>>> tools/clang/tools/c-index-test/CMakeFiles/c-index-test.dir/c-index-test.c.o
>>>> -o bin/c-index-test -rdynamic lib/libLLVMMC.so lib/libLLVMObject.so
>>>> lib/libLLVMSupport.so -ldl -lpthread -llibclang
>>>> -Wl,-rpath,/home/spop/llvm/svn-git-llvm/ninja.build/lib: && :
>>>> /usr/bin/ld: cannot find -llibclang
>>>> 
>>>> We are trying to link against a static libclang even when we explicitly asked
>>>> cmake -D BUILD_SHARED_LIBS:BOOL=ON
>>>> 
>>>> The attached patch fixes the compilation of these two programs by generating
>>>> the static libclang.a even when BUILD_SHARED_LIBS is ON.
>>>> 
>>>> Ok to commit the attached patch, or is there a better way to fix the cmake
>>>> compilations by avoiding the static link against libclang?
>>> 
>>> Ping second patch.
>>> 
>>> Thanks,
>>> Sebastian
>>> --
>>> Qualcomm Innovation Center, Inc is a member of Code Aurora Forum
>> 
>> 
>> 
>> --
>> Qualcomm Innovation Center, Inc is a member of Code Aurora Forum
> 
> 
> 
> -- 
> Qualcomm Innovation Center, Inc is a member of Code Aurora Forum
> <0001-build-a-static-libclang.a-even-for-BUILD_SHARED_LIBS.patch>_______________________________________________
> 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