[cfe-dev] Clang and multilib search paths

Armin K. via cfe-dev cfe-dev at lists.llvm.org
Wed Jul 20 16:26:46 PDT 2016


On 21.07.2016 01:24, Vedant Kumar wrote:
> Hi Armin,
> 
> Please upload your patch to reviews.llvm.org [1]. Be sure to add a reviewer
> (perhaps Sylvestre Ledru) and subscribe cfe-commits to the review.
> 
> best
> vedant
> 
> [1] http://llvm.org/docs/Phabricator.html
> 

Hi, I don't think patch is upstreamable, as it changes default runtime
to compiler-rt for all of linux. This was just an FYI. Also, I can't
submit it with current distro detection, as all Linux From Scratch users
would be affected, and I can't allow that.

>> On Jul 20, 2016, at 3:59 PM, Armin K. via cfe-dev <cfe-dev at lists.llvm.org> wrote:
>>
>> On 20.07.2016 19:33, Armin K. via cfe-dev wrote:
>>> Hi again,
>>>
>>> This is a follow up from the previous thread.
>>>
>>> When I use crtbegin.S and crtend.S for x86_64 from OpenBSD, and
>>> place the assembled *.o files in /usr/lib/clang/3.9.0, I can
>>> compile a 64 bit program, and it will use crtbegin.o and crtend.o
>>> from /usr/lib/clang/3.9.0, which I can confirm by running clang
>>> with -v.
>>>
>>> However, this is also a multilib system. I have 32 bit clang
>>> runtime in /usr/lib32/clang/3.9.0. If I assemble crtbegin.S and
>>> crtend.S for i386, and place them in the mentioned dir, clang
>>> won't pick them up. It tries to use ones from /usr/lib/clang/3.9.0
>>> when compiling a test program with clang -m32.
>>>
>>> Everything's okay and it picks up gcc's 32 bit files just fine. And,
>>> of course, it works too when I explicitly use -B/usr/lib32/clang/3.9.0.
>>>
>>> So, the question is:
>>>
>>> How to make clang automatically search /usr/lib32/clang/3.9.0? or
>>> Is there another directory the 32 bit files should be placed in?
>>>
>>> Thanks in advance!
>>>
>>
>> After spending some hours on hacking the clang source, I came up
>> with the following patch.
>> <clang-runtime.patch>_______________________________________________
>> cfe-dev mailing list
>> cfe-dev at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20160721/4f3ff1cd/attachment.sig>


More information about the cfe-dev mailing list