Commit Graph

59 Commits

Author SHA1 Message Date
Tim Northover d875d34171 Macho-embedded: fix tests after last rename
Very sorry, I managed to completely forget "make check".

llvm-svn: 199739
2014-01-21 13:23:09 +00:00
Chandler Carruth 0cfd0e98df Add the test trees that were supposed to be part of r199632.
llvm-svn: 199633
2014-01-20 09:47:21 +00:00
Tim Northover 9c7e035656 Darwin-embedded: find correct libclang_rt for embedded targets.
This refactors some of the Darwin toolchain classification to give a more solid
distinction between the three primary Darwin platforms (OS X, IOS and IOS
simulator) so that a 4th choice can be added temporarily: embedded MachO
targets.

Longer term, this support will be factored out into a separate class and no
longer classified as "darwin-eabi", but the refactoring should still be useful.

llvm-svn: 197148
2013-12-12 11:55:52 +00:00
Simon Atanasyan 3e0f388725 [Mips] Add support for nan2008 libraries and headers look up for Code
Sourcery MIPS toolchain.

llvm-svn: 195753
2013-11-26 11:57:48 +00:00
Simon Atanasyan 5c5b5daab2 [Mips] Take in account the -mfp64 command line option when build paths
to the crt*.o files, libraries and headers for the MIPS FSFS toolchain.

llvm-svn: 195249
2013-11-20 13:53:20 +00:00
Alp Toker 9c5ae47c94 Ignore test Inputs globally and remove redundant lit.local.cfg files
By adding a default config.excludes pattern we can avoid individual
suppressions in subdirectories.

This matches LLVM's lit.cfg which also excludes a few other common non-test
filenames for consistency.

llvm-svn: 194814
2013-11-15 13:37:49 +00:00
Diego Novillo 5c29705c13 Add -fprofile-sample-use to Clang's driver.
This adds a new option -fprofile-sample-use=filename to Clang. It
tells the driver to schedule the SampleProfileLoader pass and passes
on the name of the profile file to use.

llvm-svn: 194567
2013-11-13 12:22:39 +00:00
Rafael Espindola 236db46f79 This reverts commit r194330, r194329 and r194328.
The test was still failing on OS X and mingw.

llvm-svn: 194334
2013-11-09 20:07:19 +00:00
David Chisnall e6dcfaf127 Add support for -fuse-ld=.
llvm-svn: 194328
2013-11-09 14:16:52 +00:00
Chandler Carruth da797048d9 Teach the driver to not try to use 'lib32' multilib spellings on ARM
which doesn't use that multilib. As a consequence, fix Clang's support
for cross compiling environments that were relying on this quirk to
ensure the correct library search path ordering.

This also re-instates the new test cases from Rafael's r193528 for
cross-compiling to ARM on Ubuntu 13.10 without any of the changes to the
existing test cases (they were no longer needed).

This solution was the result of a lot of IRC debugging and trying to
understand *exactly* what quirk was being relied upon. It took some time
for me to figure out that it was the use of 'lib32' is a multilib that
was throwing a wrench in the works.

In case you are thinking that its silly to use a multilib of 'lib' at
all, entertainingly, GCC does so as well (you can see it with the
.../lib/../lib/crt1.o pattern it uses), and the 2-phase sequence of
search paths (multilib followed by non-multilib) has observable (if
dubious) consequences. =/ Yuck.

llvm-svn: 193601
2013-10-29 10:27:30 +00:00
Rafael Espindola a839855b56 Revert "Support cross linking to arm on ubuntu."
This reverts commit r193528 (and fixes).

It broke Chandler's setup.

llvm-svn: 193554
2013-10-28 23:14:34 +00:00
Rafael Espindola cdd2c0044d Support cross linking to arm on ubuntu.
With this patch we correctly determine that ubuntu's ARM tree is not biarch
and use "lib" istead of "lib32".

Without this patch the search inside the arm tree for the crt files was failing
and we would end up trying to use the i686 ones in lib32.

llvm-svn: 193528
2013-10-28 18:52:30 +00:00
Joerg Sonnenberger 033e5a21fa Provide a dummy NetBSD tree and use --sysroot in the driver test.
llvm-svn: 192641
2013-10-14 23:26:44 +00:00
Simon Atanasyan a61b7ecb2f [Mips] Support FSF Mips toolchain directories tree in the Clang driver.
The patch reviewed by Rafael Espindola.
http://llvm-reviews.chandlerc.com/D1843

llvm-svn: 192343
2013-10-10 07:57:44 +00:00
Chandler Carruth 1f2b2f8d45 Teach the Linux toolchain about more modern Gentoo installations of GCC
which add another wrinkle to the installation of the libstdc++ headers.

Add at least some basic testing of the weirdnesses of Gentoo's layout.

llvm-svn: 189212
2013-08-26 08:59:53 +00:00
Benjamin Kramer 9f56828c5d Testcase for r188400.
llvm-svn: 188405
2013-08-14 19:45:27 +00:00
Eli Friedman bf44f366a1 Fix gcc search for cross-compiler on Ubuntu 13.04.
Just more craziness to find crtbegin.o etc.

Patch by Stephen Kelly.

llvm-svn: 187175
2013-07-26 00:53:40 +00:00
Chandler Carruth d6c62b66b5 Update a comment to clarify that searching the target triple bin
directory for programs used by the driver is actually the standard
behavior we want to be compatible with GCC cross compilers -- it isn't
specific to SUSE or any other distro.

Also start fleshing out testing of the different cross compilation
patterns, both with a new very bare-bones tree of cross compilers and by
extending the multilib trees. Currently, we don't correctly model doing
a cross compile using the non-triple target of a bi-arch GCC install,
but I'll add support for that (and tests) next.

llvm-svn: 184499
2013-06-20 23:37:54 +00:00
Simon Atanasyan 08450bd55c Supports Sourcery CodeBench Mips toolchain directories tree.
Sourcery CodeBench and modern FSF Mips toolchains require a bit more
complicated algorithm to calculate headers, libraries and sysroot paths
than implemented by Clang driver now. The main problem is that all these
paths depend on a set of command line arguments additionally to a target
triple value. For example, let $TC is a toolchain installation directory.
If we compile big-endian 32-bit mips code, crtbegin.o is in the
$TC/lib/gcc/mips-linux-gnu/4.7.2 folder and the toolchain's linker requires
--sysroot=$TC/mips-linux-gnu/libc argument. If we compile little-endian
32-bit soft-float mips code, crtbegin.o is in the
$TC/lib/gcc/mips-linux-gnu/4.7.2/soft-float/el folder and the toolchain's
linker requires --sysroot=$TC/mips-linux-gnu/libc/soft-float/el argument.

1. Calculate MultiarchSuffix using all necessary command line options and
   use this MultiarchSuffix to detect crtbegin.o location in the
   GCCInstallationDetector::ScanLibDirForGCCTriple() routine.
2. If a user does not provide --sysroot argument to the driver explicitly,
   calculate new sysroot value based on command line options. Then use this
   calculated sysroot path:
   a. To populate a file search paths list in the Linux::Linux() constructor.
   b. To find Mips toolchain specific include headers directories
      in the Linux::AddClangSystemIncludeArgs() routine.
   c. To provide -–sysroot argument for a linker.

Note:
- The FSF's tree slightly differs (folder names) and is not supported
  yet.
- New addExternCSystemIncludeIfExits() routine is a temporary solution.
  I plan to move path existence check to the addExternCSystemInclude()
  routine by a separate commit.

The patch reviewed by Rafael Espindola.
http://llvm-reviews.chandlerc.com/D644

llvm-svn: 179934
2013-04-20 08:15:03 +00:00
Rafael Espindola 50ba983d25 Add driver support for fedora 18 on ARM.
llvm-svn: 179484
2013-04-14 10:14:21 +00:00
Richard Smith f3e624ca73 If a .syms file is available alongside a sanitizer runtime, pass it to the
linker via --dynamic-list instead of using --export-dynamic. This reduces the
size of the dynamic symbol table, and thus of the binary (in some cases by up
to ~30%).

llvm-svn: 177783
2013-03-23 00:30:08 +00:00
Dmitri Gribenko 15225aee17 Driver: add support for new style multiarch in Ubuntu 13.04
Patch by Sanne Wouda.

llvm-svn: 176557
2013-03-06 17:14:05 +00:00
Chandler Carruth 4588e349b0 Beef up the testing of our 'ld' invocation on linux to cover static
linking. About to fix a bug here and there was no good test case.

llvm-svn: 176427
2013-03-04 01:27:49 +00:00
NAKAMURA Takumi 2d765204d9 Create clang/test/Driver/lit.local.cfg.
These files had been ignored.

  - clang_f_opts.h
  - debug-comp-dir.S
  - debug-main-file.S

llvm-svn: 173416
2013-01-25 05:09:37 +00:00
Logan Chien 48a353d339 Revert r169557. It seems that the test is too restricted
and will break the build on buildbot.

llvm-svn: 169562
2012-12-06 23:40:31 +00:00
Logan Chien 74aa8f1141 Add i686-linux-android for gcc toolchain detection.
* Look for i686-linux-android under <sysroot>/lib/gcc.

* This patch also slightly enhance the test suite for
  Android GCC toolchain detection.

llvm-svn: 169557
2012-12-06 22:59:37 +00:00
Matthew Curtis e689b0570c Hexagon TC: Reimplement Link::ConstructJob to call
linker directly

Rather than calling gcc.

llvm-svn: 169512
2012-12-06 15:46:07 +00:00
Matthew Curtis 22dd8da6cd Hexagon TC: Update toolchain to add appropriate include
paths

- Inherit from Linux rather than ToolChain
- Override AddClangSystemIncludeArgs and AddClangCXXStdlibIncludeArgs
  to properly set include paths.

llvm-svn: 169495
2012-12-06 12:43:18 +00:00
Simon Atanasyan 86bdab7468 Extend -Bprefix functionality and make it closer to gcc. If the "prefix"
is not a directory, Driver::GetProgramPath() routine does not try to append
the program name as a "path component" to it. It just joins the "prefix" with
the program name and checks the resulting path existence.

The patch reviewed by Rafael Espindola.

llvm-svn: 167114
2012-10-31 12:01:53 +00:00
Benjamin Kramer 058666a8d0 Driver: Link crtfastmath.o if it's available and -ffast-math is specified.
crtfastmath.o contains routines to set the floating point flags to a faster,
unsafe mode. Linking it in speeds up code dealing with denormals significantly
(PR14024).

For now this is only enabled on linux where I can test it and crtfastmath.o is
widely available. We may want to provide a similar file with compiler-rt
eventually and/or enable it on other platforms too.

llvm-svn: 165240
2012-10-04 19:42:20 +00:00
Simon Atanasyan 53fefd1f6a Implement Adnroid MIPS toolchain support:
1. Add mipsel-linux-android to the list of valid MIPS target triples.
2. Add <gcc install path>/mips-r2 to the list of toolchain specific path
   prefixes if target is mipsel-linux-android.

The patch reviewed by Logan Chien.

llvm-svn: 165131
2012-10-03 17:46:38 +00:00
Hal Finkel 455ba73752 Add the freescale_ppc64_tree that should have been included in r164177.
llvm-svn: 164179
2012-09-18 22:53:24 +00:00
Hal Finkel f358791e27 Add C/C++ header locations for the Freescale SDK.
The Freescale SDK is based on OpenEmbedded, and this might be useful
for other OpenEmbedded-based configurations as well.

With minor modifications, patch by Tobias von Koch!

llvm-svn: 164177
2012-09-18 22:25:07 +00:00
Simon Atanasyan d44138808f Do not use "lib32" directory to create a library/object files
paths when target is MIPS 32-bit.

The patch reviewed by Chandler Carruth.

llvm-svn: 163898
2012-09-14 11:27:24 +00:00
Evgeniy Stepanov 763671edeb Android standalone toolchain support.
This change adds detection of C++ headers and libraries paths when
building with the standalone toolchain from Android NDK. They are in a
slightly unusual place.

llvm-svn: 163109
2012-09-03 09:05:50 +00:00
Jiangning Liu 5007bb6c0b Add two more .keep files to avoid the missing of empty folders in git repository.
llvm-svn: 161043
2012-07-31 10:52:55 +00:00
Jiangning Liu 43f37dca77 Add two .keep files to avoid the missing of empty folders in git repository.
llvm-svn: 161042
2012-07-31 10:24:27 +00:00
Jiangning Liu 61b06cbcb4 Support ARM hard float (arm-linux-gnueabihf).
llvm-svn: 161038
2012-07-31 08:06:29 +00:00
Gabor Greif 0d1c121bf7 supply a simple-minded testcase for r156813, to check whether the embedded montavista gcc toolchain is recognized
llvm-svn: 157686
2012-05-30 09:56:26 +00:00
Simon Atanasyan 2be62257a8 MIPS: Add tests to check the debian multiarch stuff for mips and mipsel targets.
llvm-svn: 155628
2012-04-26 08:35:58 +00:00
Evgeniy Stepanov 7786671b5a Clang driver support for linking on Android.
llvm-svn: 155541
2012-04-25 08:59:22 +00:00
Chandler Carruth df8ae4b949 Add the critical crtbegin.o files necessary for any of the tests in
r151482 and r151484 to work. Sorry about the fallout...

llvm-svn: 151485
2012-02-26 10:46:17 +00:00
Chandler Carruth af3c2090b4 Add support for PPC and PPC64 multiarch toolchains on Debain.
Patch from Michel Dänzer, sent our way via Jeremy Huddleston who added
64-bit support. I just added one other place where powerpc64-linux-gnu
was missing (we only had powerpc64-unknown-linux-gnu).

I've also added a tree to test out the debian multiarch stuff. I don't
use debian regularly, so I'm not certain this is entirely accurate. If
anyone wants to check it against a debian system and fix any
inaccuracies, fire away. This way at least folks can see how this is
*supposed* to be tested.

It'd be particularly good to get the Debian MIPS toolchains tested in
this way.

llvm-svn: 151482
2012-02-26 09:03:21 +00:00
Joerg Sonnenberger 17d7551e73 Revert part of r148839 and keep DefaultTargetTriple in the form adjusted
by -target and similar options. As discussed in PR 12026, the change
broke support for target-prefixed tools, i.e. calling x86_64--linux-ld
when compiling for x86_64--linux. Improve the test cases added
originally in r149083 to not require execution, just executable files.
Document the hack with appropiate FIXME comments.

llvm-svn: 151185
2012-02-22 19:15:16 +00:00
Chandler Carruth 0b1756b880 Reintroduce r148981 with significantly improved regression test. Now it
both actually tests what it wants to, doesn't have bogus and broken
assertions in it, and is also formatted much more cleanly and
consistently. Probably still some more that can be improved here, but
its much better.

Original commit message:
----
Try to unbreak the FreeBSD toolchain's detection of 32-bit targets
inside a 64-bit freebsd machine with the 32-bit compatibility layer
installed. The FreeBSD image always has the /usr/lib32 directory, so
test for the more concrete existence of crt1.o. Also enhance the tests
for freebsd to clarify what these trees look like and exercise the new
code.

Thanks to all the FreeBSD folks for helping me understand what caused
the failure and how we might fix it. =] That helps a lot. Also, yay
build bots.

llvm-svn: 149011
2012-01-26 01:35:15 +00:00
Argyrios Kyrtzidis e8be6652ce Revert r148981 because it fails test/Driver/freebsd.c
Original log:

Author: chandlerc <chandlerc@91177308-0d34-0410-b5e6-96231b3b80d8>
Date:   Wed Jan 25 21:32:31 2012 +0000

    Try to unbreak the FreeBSD toolchain's detection of 32-bit targets
    inside a 64-bit freebsd machine with the 32-bit compatibility layer
    installed. The FreeBSD image always has the /usr/lib32 directory, so
    test for the more concrete existence of crt1.o. Also enhance the tests
    for freebsd to clarify what these trees look like and exercise the new
    code.

    Thanks to all the FreeBSD folks for helping me understand what caused
    the failure and how we might fix it. =] That helps a lot. Also, yay
    build bots.

llvm-svn: 148993
2012-01-25 22:55:16 +00:00
Chandler Carruth 143f2f6e37 Try to unbreak the FreeBSD toolchain's detection of 32-bit targets
inside a 64-bit freebsd machine with the 32-bit compatibility layer
installed. The FreeBSD image always has the /usr/lib32 directory, so
test for the more concrete existence of crt1.o. Also enhance the tests
for freebsd to clarify what these trees look like and exercise the new
code.

Thanks to all the FreeBSD folks for helping me understand what caused
the failure and how we might fix it. =] That helps a lot. Also, yay
build bots.

llvm-svn: 148981
2012-01-25 21:32:31 +00:00
Chandler Carruth 013820fea3 Add some really minimalist freebsd testing trees and use them in the
freebsd test so that it's behavior isn't dependent on the filesystem of
the host running the tests. This should revive the build bots at least.
The tests and the trees still need a lot of love to make them as useful
and easy to maintain as linux-ld.c.

llvm-svn: 148949
2012-01-25 10:50:34 +00:00
Hal Finkel 6b89a10b45 add tree test for suse on ppc64 (r146142)
llvm-svn: 146176
2011-12-08 20:36:19 +00:00
Chandler Carruth 6e46ca2c10 Fix an issue that Duncan discovered on a specific (no longer current)
version of Ubuntu. It has a very broken multiarch configuration, and so
we need special logic to handle it correctly. Fixing and testing this
uncovered a few other trivial issues with the logic that are fixed as
well.

I added tests to cover this as it is hard to notice if you install
recent versions of the OS.

llvm-svn: 144165
2011-11-09 03:46:20 +00:00