summaryrefslogtreecommitdiffstats
path: root/clang/test/Driver/Inputs
Commit message (Collapse)AuthorAgeFilesLines
...
* Teach the driver to not try to use 'lib32' multilib spellings on ARMChandler Carruth2013-10-2911-0/+0
| | | | | | | | | | | | | | | | | | | | | | | 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
* Revert "Support cross linking to arm on ubuntu."Rafael Espindola2013-10-2813-2/+0
| | | | | | | | This reverts commit r193528 (and fixes). It broke Chandler's setup. llvm-svn: 193554
* Support cross linking to arm on ubuntu.Rafael Espindola2013-10-2813-0/+2
| | | | | | | | | | 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
* Provide a dummy NetBSD tree and use --sysroot in the driver test.Joerg Sonnenberger2013-10-147-0/+0
| | | | llvm-svn: 192641
* [Mips] Support FSF Mips toolchain directories tree in the Clang driver.Simon Atanasyan2013-10-10369-0/+0
| | | | | | | The patch reviewed by Rafael Espindola. http://llvm-reviews.chandlerc.com/D1843 llvm-svn: 192343
* Teach the Linux toolchain about more modern Gentoo installations of GCCChandler Carruth2013-08-266-0/+0
| | | | | | | | 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
* Testcase for r188400.Benjamin Kramer2013-08-141-0/+0
| | | | llvm-svn: 188405
* Fix gcc search for cross-compiler on Ubuntu 13.04.Eli Friedman2013-07-261-0/+1
| | | | | | | | Just more craziness to find crtbegin.o etc. Patch by Stephen Kelly. llvm-svn: 187175
* Update a comment to clarify that searching the target triple binChandler Carruth2013-06-2034-0/+28
| | | | | | | | | | | | | | 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
* Supports Sourcery CodeBench Mips toolchain directories tree.Simon Atanasyan2013-04-20116-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add driver support for fedora 18 on ARM.Rafael Espindola2013-04-146-0/+0
| | | | llvm-svn: 179484
* If a .syms file is available alongside a sanitizer runtime, pass it to theRichard Smith2013-03-238-0/+0
| | | | | | | | 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
* Driver: add support for new style multiarch in Ubuntu 13.04Dmitri Gribenko2013-03-067-0/+0
| | | | | | Patch by Sanne Wouda. llvm-svn: 176557
* Beef up the testing of our 'ld' invocation on linux to cover staticChandler Carruth2013-03-041-0/+0
| | | | | | linking. About to fix a bug here and there was no good test case. llvm-svn: 176427
* Create clang/test/Driver/lit.local.cfg.NAKAMURA Takumi2013-01-251-0/+1
| | | | | | | | | | These files had been ignored. - clang_f_opts.h - debug-comp-dir.S - debug-main-file.S llvm-svn: 173416
* Revert r169557. It seems that the test is too restrictedLogan Chien2012-12-066-0/+0
| | | | | | and will break the build on buildbot. llvm-svn: 169562
* Add i686-linux-android for gcc toolchain detection.Logan Chien2012-12-066-0/+0
| | | | | | | | | * 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
* Hexagon TC: Reimplement Link::ConstructJob to callMatthew Curtis2012-12-061-0/+1
| | | | | | | | linker directly Rather than calling gcc. llvm-svn: 169512
* Hexagon TC: Update toolchain to add appropriate includeMatthew Curtis2012-12-067-0/+7
| | | | | | | | | | paths - Inherit from Linux rather than ToolChain - Override AddClangSystemIncludeArgs and AddClangCXXStdlibIncludeArgs to properly set include paths. llvm-svn: 169495
* Extend -Bprefix functionality and make it closer to gcc. If the "prefix"Simon Atanasyan2012-10-314-0/+0
| | | | | | | | | | 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
* Driver: Link crtfastmath.o if it's available and -ffast-math is specified.Benjamin Kramer2012-10-041-0/+0
| | | | | | | | | | | | 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
* Implement Adnroid MIPS toolchain support:Simon Atanasyan2012-10-0313-0/+0
| | | | | | | | | | 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
* Add the freescale_ppc64_tree that should have been included in r164177.Hal Finkel2012-09-186-0/+0
| | | | llvm-svn: 164179
* Add C/C++ header locations for the Freescale SDK.Hal Finkel2012-09-186-0/+0
| | | | | | | | | 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
* Do not use "lib32" directory to create a library/object filesSimon Atanasyan2012-09-1412-0/+0
| | | | | | | | paths when target is MIPS 32-bit. The patch reviewed by Chandler Carruth. llvm-svn: 163898
* Android standalone toolchain support.Evgeniy Stepanov2012-09-0313-0/+0
| | | | | | | | 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
* Add two more .keep files to avoid the missing of empty folders in git ↵Jiangning Liu2012-07-312-0/+0
| | | | | | repository. llvm-svn: 161043
* Add two .keep files to avoid the missing of empty folders in git repository.Jiangning Liu2012-07-312-0/+0
| | | | llvm-svn: 161042
* Support ARM hard float (arm-linux-gnueabihf).Jiangning Liu2012-07-3113-0/+0
| | | | llvm-svn: 161038
* supply a simple-minded testcase for r156813, to check whether the embedded ↵Gabor Greif2012-05-302-0/+2
| | | | | | montavista gcc toolchain is recognized llvm-svn: 157686
* MIPS: Add tests to check the debian multiarch stuff for mips and mipsel targets.Simon Atanasyan2012-04-2614-0/+0
| | | | llvm-svn: 155628
* Clang driver support for linking on Android.Evgeniy Stepanov2012-04-255-0/+0
| | | | llvm-svn: 155541
* Add the critical crtbegin.o files necessary for any of the tests inChandler Carruth2012-02-264-0/+0
| | | | | | r151482 and r151484 to work. Sorry about the fallout... llvm-svn: 151485
* Add support for PPC and PPC64 multiarch toolchains on Debain.Chandler Carruth2012-02-2621-0/+0
| | | | | | | | | | | | | | | | | 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
* Revert part of r148839 and keep DefaultTargetTriple in the form adjustedJoerg Sonnenberger2012-02-222-0/+4
| | | | | | | | | | 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
* Reintroduce r148981 with significantly improved regression test. Now itChandler Carruth2012-01-268-0/+0
| | | | | | | | | | | | | | | | | | | | | | 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
* Revert r148981 because it fails test/Driver/freebsd.cArgyrios Kyrtzidis2012-01-258-0/+0
| | | | | | | | | | | | | | | | | | | | 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
* Try to unbreak the FreeBSD toolchain's detection of 32-bit targetsChandler Carruth2012-01-258-0/+0
| | | | | | | | | | | | | | 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
* Add some really minimalist freebsd testing trees and use them in theChandler Carruth2012-01-255-0/+0
| | | | | | | | | 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
* add tree test for suse on ppc64 (r146142)Hal Finkel2011-12-085-0/+0
| | | | llvm-svn: 146176
* Fix an issue that Duncan discovered on a specific (no longer current)Chandler Carruth2011-11-0910-0/+0
| | | | | | | | | | | | 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
* Enhance the GCC version parsing and comparison logic to handle some moreChandler Carruth2011-11-0513-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | edge cases and have better behavior. Specifically, we should actually prefer the general '4.6' version string over the '4.6.1' string, as '4.6.2' should be able to replace it without breaking rpaths or any other place that these paths have been embedded. Debian-based distributions are already using a path structure with symlinks to achieve in-place upgrades for patch versions. Now our parsing reflects this and we select the shorter paths instead of the longer paths. A separate issue was that we would not parse a leading patch version number even in the presence of a suffix. The above change makes this more problematic as it would cause a suffix being added to make us treat the entire thing as patch-version-agnostic, which it isn't. This changes the logic to distinguish between '4.4.x' and 4.4.1-x', and retain that the latter has *some* patch number information. Currently, we always bias toward the shorter and more canonical version strings. If it becomes important we can add more Debian like rules to produce sequences such as '4.4.1b' > '4.4.1' > '4.4.1-rc3' > '4.4.1-rc2' > '4.4.1-pre5', but I'm very doubtful this will ever matter or be desirable. I've made the tests for this logic a bit more interesting, and added some specific tests for logic that is now different. llvm-svn: 143841
* Use the InstalledDir correctly, and test it correctly as well. =/ ShouldChandler Carruth2011-10-054-0/+0
| | | | | | have noticed this previously, sorry. llvm-svn: 141167
* Teach Clang to cope with GCC installations that have unusual patchChandler Carruth2011-10-053-0/+0
| | | | | | | "versions". Currently, these are just dropped on the floor, A concrete version number will always win out. llvm-svn: 141159
* Implement the feature I was originally driving toward when I startedChandler Carruth2011-10-052-0/+0
| | | | | | | | | | | | | | this saga. Teach the driver to detect a GCC installed along side Clang using the existing InstalledDir support in the Clang driver. This makes a lot of Clang's behavior more automatic when it is installed along side GCC. Also include the first test cases (more to come, honest) which test both the install directory behavior, and the version sorting behavior to show that we're actually searching for the best candidate GCC installation now. llvm-svn: 141145
* Test a multilib setup on a 64-bit host. This is the far more commonChandler Carruth2011-10-0311-0/+0
| | | | | | | | | | | | | configuration, although the test still stubs out more directories than are necessary or common in order to exercise all of the lookup paths observed with upstream GCC. This finishes testing the distribution-independent and GCC-installation-independent parts of the library path search logic. More testing is still needed for the triple detection, GCC-installation detection, and handling distributions with unusual configurations. llvm-svn: 141000
* Enable generic multilib support on 32bit hosts. Previously this was onlyChandler Carruth2011-10-0311-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | enabled for debian hosts, which is quite odd. I think all restriction on when Clang attempts to use a multilib installation should go away. Clang is fundamentally a cross compiler. It behaves more like GCC when built as a cross compiler, and so it should just use multilib installs when they are present on the system. However, there is a very specific exemption for Exherbo, which I can't test on, so I'm leaving that in place. With this, check in a generic test tree for multilib on a 32-bit host. This stubs out many directories that most distributions don't use but that uptsream GCC supports. This is intended to be an agnostic test that the driver behaves properly compared with the GCC driver it aims for compatibility with. Also, fix a bug in the driver that this testing exposed (see!) where it was incorrectly testing the target architecture rather than the host architecture. If anyone is having trouble with the tree-structure stubs I'm creating to test this, let me know and I can revisit the design. I chose this over (for example) a tar-ball in order to make tests run faster at the small, hopefully amortized VCS cost. llvm-svn: 140999
* Test that we include a GCC-triple-prefixed tree. While I don't know ofChandler Carruth2011-10-032-0/+0
| | | | | | | any distros that use this, building a multilib GCC from mainline will install linker scripts here. llvm-svn: 140996
* Teach the logic for locating an installed GCC about the system root.Chandler Carruth2011-10-032-0/+0
| | | | | | | | | | | | | | | | | This requires fixing a latent bug -- if we used the default host triple instead of an autodetected triple to locate GCC's installation, we didn't go back and fix the GCC triple. Correct that with a pile of hacks. This entire routine needs a major refactoring which I'm saving for a subsequent commit. Essentially, the detection of the GCC triple should be hoisted into the same routine as we locate the GCC installation: the first is intrinsically tied to the latter. Then the routine will just return the triple and base directory. Also start to bring the rest of the library search path logic under test, including locating crtbegin.o. Still need to test the multilib and other behaviors, but there are also bugs in the way of that. llvm-svn: 140995
* Add initial support for applying the sysroot to library search paths.Chandler Carruth2011-10-032-0/+0
This is still very much a WIP, but sysroot was completely broken before this so we are moving closer to correctness. The crux of this is that 'ld' (on Linux, the only place I'm touching here) doesn't apply the sysroot to any flags given to it. Instead, the driver must translate all the paths it adds to the link step with the system root. This is easily observed by building a GCC that supports sysroot, and checking its driver output. This patch just fixes the non-multilib library search paths. We should also use this in many other places, but first things first. This also allows us to make the Linux 'ld' test independent of the host system. This in turn will allow me to check in test tree configurations based on various different distro's configuration. Again, WIP. llvm-svn: 140990
OpenPOWER on IntegriCloud