[cfe-commits] r146051 - /cfe/trunk/runtime/compiler-rt/Makefile
Kostya Serebryany
kcc at google.com
Thu Dec 8 09:52:06 PST 2011
On Thu, Dec 8, 2011 at 9:45 AM, Daniel Dunbar <daniel at zuster.org> wrote:
> On Wed, Dec 7, 2011 at 3:48 PM, Kostya Serebryany <kcc at google.com> wrote:
> >
> >
> > On Wed, Dec 7, 2011 at 3:26 PM, Daniel Dunbar <daniel at zuster.org> wrote:
> >>
> >> Should work out of the box as of r146094, please let me know if you
> >> see problems.
> >
> >
> > Yes, it works for the host platform now. Good!
> > What additional make command would you recommend to build the secondary
> > platform (i386 in my case)?
>
> There isn't one, at the moment. Unless you need something immediately,
> give me a day or two and I should have something for you. If you do
> need something immediately I can give you a patch.
>
No rush, for immediate needs we can still use the old makefile.
Thanks!
--kcc
>
> - Daniel
>
> >
> > --kcc
> >
> >
> >>
> >>
> >> - Daniel
> >>
> >> On Wed, Dec 7, 2011 at 2:18 PM, Kostya Serebryany <kcc at google.com>
> wrote:
> >> >
> >> >
> >> > On Wed, Dec 7, 2011 at 1:49 PM, Nico Weber <thakis at chromium.org>
> wrote:
> >> >>
> >> >> Hi,
> >> >>
> >> >> I'm trying to use ASan on linux. I checked out compiler-rt into
> >> >> llvm/projects, ran `make`, and now I'm trying to compile a test file:
> >> >>
> >> >> $ Release+Asserts/bin/clang -faddress-sanitizer ~/test/test.c
> >> >> /usr/bin/ld:
> >> >>
> >> >>
> /usr/local/google/chrome/src/third_party/llvm-build/Release+Asserts/lib/clang/linux/x86_64/libclang_rt.asan.a:
> >> >> No such file: No such file or directory
> >> >> clang: error: linker command failed with exit code 1 (use -v to see
> >> >> invocation)
> >> >>
> >> >> That library does exist, but at a slightly different path:
> >> >> $ ls
> Release+Asserts/lib/clang/3.1/lib/linux/libclang_rt.asan-x86_64.a
> >> >>
> >> >>
> >> >>
> third_party/llvm-build/Release+Asserts/lib/clang/3.1/lib/linux/libclang_rt.asan-x86_64.a
> >> >>
> >> >> Is that user error, or are not all paths quite right yet?
> >> >
> >> >
> >> > Yes, we need a patch to tools/clang/lib/Driver/Tools.cpp, see above.
> >> >
> >> >
> >> >>
> >> >> Thanks,
> >> >> Nico
> >> >>
> >> >> On Wed, Dec 7, 2011 at 1:30 PM, Daniel Dunbar <daniel at zuster.org>
> >> >> wrote:
> >> >> > On Wed, Dec 7, 2011 at 1:16 PM, Kostya Serebryany <kcc at google.com>
> >> >> > wrote:
> >> >> >>
> >> >> >>
> >> >> >> On Wed, Dec 7, 2011 at 1:07 PM, Daniel Dunbar <daniel at zuster.org>
> >> >> >> wrote:
> >> >> >>>
> >> >> >>> On Wed, Dec 7, 2011 at 1:01 PM, Kostya Serebryany <
> kcc at google.com>
> >> >> >>> wrote:
> >> >> >>> > Thanks!
> >> >> >>> >
> >> >> >>> > Question:
> >> >> >>> > There seem to be no way to build 32- and 64-bit linux libraries
> >> >> >>> > with
> >> >> >>> > a
> >> >> >>> > single make command.
> >> >> >>> > Am I right?
> >> >> >>>
> >> >> >>> Yes.
> >> >> >>>
> >> >> >>> > Do you plan to change this?
> >> >> >>>
> >> >> >>> I would like to, but it's a tad tricky with the current level of
> >> >> >>> build
> >> >> >>> support we have. This is also a cumbersome area to test because
> it
> >> >> >>> really varies quite a lot based on the host Linux system, and
> there
> >> >> >>> is
> >> >> >>> so much diversity amongst distributions. I really wish we had a
> >> >> >>> good
> >> >> >>> farm of different common Linux distros available.
> >> >> >>
> >> >> >>
> >> >> >> Can we build the secondary arch using a separate make command
> inside
> >> >> >> compiler-rt (so that we don't need to re-build the hole
> llvm/clang)?
> >> >> >
> >> >> > Yes, that is no problem. The difficulty is in knowing whether or
> not
> >> >> > we will successfully be able to build the alternate arch (-m64 on
> >> >> > i386
> >> >> > or -m32 on x86_64), i.e. does the user have whatever multi arch
> >> >> > support is required installed. I'll see what I can do...
> >> >> >
> >> >> > - Daniel
> >> >> >
> >> >> >>>
> >> >> >>>
> >> >> >>> > This change requires to fix the asan driver
> >> >> >>> > in tools/clang/lib/Driver/Tools.cpp, I'll prepare a patch
> unless
> >> >> >>> > you
> >> >> >>> > have it
> >> >> >>> > ready.
> >> >> >>>
> >> >> >>> I'll fix it, I'm in the area.
> >> >> >>
> >> >> >>
> >> >> >> Thanks!
> >> >> >>
> >> >> >>>
> >> >> >>>
> >> >> >>> > Evgeniy, could you please prepare a similar patch for linux/arm
> >> >> >>> > (take
> >> >> >>> > r146051 and r145950 as an example)
> >> >> >>>
> >> >> >>> This is going to be hard. Unless I am mistaken, there is little
> to
> >> >> >>> no
> >> >> >>> standard for how to find the ARM toolchain to use to cross
> compile.
> >> >> >>> Am
> >> >> >>> I mistaken?
> >> >> >>>
> >> >> >>> My long term plan for fixing this is to make it blocked on good
> >> >> >>> cross
> >> >> >>> compilation support in Clang, but I understand that is not ideal
> if
> >> >> >>> you want ASAN/ARM available in Clang ASAP.
> >> >> >>
> >> >> >>
> >> >> >> Let's see what Evgeniy has to say (he has been porting asan to
> ARM).
> >> >> >>
> >> >> >> --kcc
> >> >> >>
> >> >> >>>
> >> >> >>>
> >> >> >>> - Daniel
> >> >> >>>
> >> >> >>> >
> >> >> >>> > --kcc
> >> >> >>> >
> >> >> >>> >
> >> >> >>> >
> >> >> >>> > On Wed, Dec 7, 2011 at 11:35 AM, Daniel Dunbar
> >> >> >>> > <daniel at zuster.org>
> >> >> >>> > wrote:
> >> >> >>> >>
> >> >> >>> >> Author: ddunbar
> >> >> >>> >> Date: Wed Dec 7 13:35:10 2011
> >> >> >>> >> New Revision: 146051
> >> >> >>> >>
> >> >> >>> >> URL: http://llvm.org/viewvc/llvm-project?rev=146051&view=rev
> >> >> >>> >> Log:
> >> >> >>> >> runtime/Linux: Include the profile and ASAN libs on x86.
> >> >> >>> >>
> >> >> >>> >> Modified:
> >> >> >>> >> cfe/trunk/runtime/compiler-rt/Makefile
> >> >> >>> >>
> >> >> >>> >> Modified: cfe/trunk/runtime/compiler-rt/Makefile
> >> >> >>> >> URL:
> >> >> >>> >>
> >> >> >>> >>
> >> >> >>> >>
> >> >> >>> >>
> http://llvm.org/viewvc/llvm-project/cfe/trunk/runtime/compiler-rt/Makefile?rev=146051&r1=146050&r2=146051&view=diff
> >> >> >>> >>
> >> >> >>> >>
> >> >> >>> >>
> >> >> >>> >>
> >> >> >>> >>
> ==============================================================================
> >> >> >>> >> --- cfe/trunk/runtime/compiler-rt/Makefile (original)
> >> >> >>> >> +++ cfe/trunk/runtime/compiler-rt/Makefile Wed Dec 7 13:35:10
> >> >> >>> >> 2011
> >> >> >>> >> @@ -93,10 +93,12 @@
> >> >> >>> >>
> >> >> >>> >> # We currently only try to generate runtime libraries on x86.
> >> >> >>> >> ifeq ($(ARCH),x86)
> >> >> >>> >> -RuntimeLibrary.linux.Configs += full-i386
> >> >> >>> >> +RuntimeLibrary.linux.Configs += \
> >> >> >>> >> + full-i386 profile-i386 asan-i386
> >> >> >>> >> endif
> >> >> >>> >> ifeq ($(ARCH),x86_64)
> >> >> >>> >> -RuntimeLibrary.linux.Configs += full-x86_64
> >> >> >>> >> +RuntimeLibrary.linux.Configs += \
> >> >> >>> >> + full-x86_64 profile-x86_64 asan-x86_64
> >> >> >>> >> endif
> >> >> >>> >>
> >> >> >>> >> endif
> >> >> >>> >>
> >> >> >>> >>
> >> >> >>> >> _______________________________________________
> >> >> >>> >> cfe-commits mailing list
> >> >> >>> >> cfe-commits at cs.uiuc.edu
> >> >> >>> >> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
> >> >> >>> >
> >> >> >>> >
> >> >> >>
> >> >> >>
> >> >> >
> >> >> > _______________________________________________
> >> >> > cfe-commits mailing list
> >> >> > cfe-commits at cs.uiuc.edu
> >> >> > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
> >> >
> >> >
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20111208/1eed6fa9/attachment.html>
More information about the cfe-commits
mailing list