summaryrefslogtreecommitdiffstats
path: root/clang/test/Driver/linux-header-search.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [Driver] Support g++ headers in include/g++David Greene2018-11-131-0/+12
| | | | | | | | | | ray's gcc installation puts C++ headers in PREFIX/include/g++ without indicating a gcc version at all. Typically this is because the version is encoded somewhere in PREFIX. Differential Revision: https://reviews.llvm.org/D53770 llvm-svn: 346802
* Fix clash of gcc toolchains in driver regression testsKarl-Johan Karlsson2018-08-071-0/+2
| | | | | | | | | | | | | | | | For some regression tests the path to the right toolchain is specified using the -sysroot switch. However, if clang was configured with a custom gcc toolchain (either by using GCC_INSTALL_PREFIX in cmake or the equivalent configure command), the path to the custom gcc toolchain path takes precedence to the one specified by sysroot. This causes several regression tests to fail as they will be using an unexpected path. This patch fixes this issue by adding --gcc-toolchain='' to all tests that rely on that. The empty string causes the driver to pick the path from sysroot instead. This patch contain the same kind of fixes as done in rC225182 llvm-svn: 339112
* Fix linux-header-search.cpp with CLANG_DEFAULT_CXX_STDLIBJonas Hahnfeld2018-07-311-2/+2
| | | | | | | This configuration was broken after r338294 because Clang might be configured to always use libc++. llvm-svn: 338360
* [OpenEmbedded] Fix lib paths for OpenEmbedded targetsMandeep Singh Grang2018-07-301-0/+22
| | | | | | | | | | | | | | | | | | | | | Summary: The lib paths are not correctly picked up for OpenEmbedded sysroots (like arm-oe-linux-gnueabi) for 2 reasons: 1. OpenEmbedded sysroots are of the form <sysroot>/usr/lib/<triple>/x.y.z. This form is handled in clang but only for Freescale vendor. 2. 64-bit OpenEmbedded sysroots may not have a /usr/lib dir. So they cannot find /usr/lib64 as it is referenced as /usr/lib/../lib64 in clang. This is a follow-up to the llvm patch: D48861 Reviewers: dlj, rengolin, fedor.sergeev, javed.absar, hfinkel, rsmith Reviewed By: rsmith Subscribers: rsmith, kristof.beyls, cfe-commits Differential Revision: https://reviews.llvm.org/D48862 llvm-svn: 338294
* Support for multiarch runtimes layoutPetr Hosek2018-06-281-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | This change adds a support for multiarch style runtimes layout, so in addition to the existing layout where runtimes get installed to: lib/clang/$version/lib/$os Clang now allows runtimes to be installed to: lib/clang/$version/$target/lib This also includes libc++, libc++abi and libunwind; today those are assumed to be in Clang library directory built for host, with the new layout it is possible to install libc++, libc++abi and libunwind into the runtime directory built for different targets. The use of new layout is enabled by setting the LLVM_ENABLE_RUNTIME_TARGET_DIR CMake variable and is supported by both projects and runtimes layouts. The runtimes CMake build has been further modified to use the new layout when building runtimes for multiple targets. Differential Revision: https://reviews.llvm.org/D45604 llvm-svn: 335809
* [Driver] Update GCC libraries detection logic for Gentoo.Manoj Gupta2018-04-071-0/+53
| | | | | | | | | | | | | | | | | Summary: 1. Find GCC's LDPATH from the actual GCC config file. 2. Avoid picking libraries from a similar named tuple if the exact tuple is installed. Reviewers: mgorny, chandlerc, thakis, rnk Reviewed By: mgorny, rnk Subscribers: cfe-commits, mgorny Differential Revision: https://reviews.llvm.org/D45233 llvm-svn: 329512
* [Driver] Fix finding multilib gcc install on Gentoo (with gcc-config)Michal Gorny2016-12-121-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | Fix the gcc-config code to support multilib gcc installs properly. This solves two problems: -mx32 using the 64-bit gcc directory (due to matching installation triple), and -m32 not respecting gcc-config at all (due to mismatched installation triple). In order to fix the former issue, split the multilib scan out of Generic_GCC::GCCInstallationDetector::ScanLibDirForGCCTriple() (the code is otherwise unchanged), and call it for each installation found via gcc-config. In order to fix the latter issue, split the gcc-config processing out of Generic_GCC::GCCInstallationDetector::init() and repeat it for all triples, including extra and biarch triples. The only change in the gcc-config code itself is adding the call to multilib scan. Convert the gentoo_linux_gcc_multi_version_tree test input to multilib x86_64+32+x32 install, and add appropriate tests to linux-header-search and linux-ld. Differential Revision: https://reviews.llvm.org/D26887 llvm-svn: 289436
* [Driver] Support obtaining active toolchain from gcc-config on GentooMichal Gorny2016-10-251-0/+9
| | | | | | | | | | | Support using gcc-config to determine the correct GCC toolchain location on Gentoo. In order to do that, attempt to read gcc-config configuration form [[sysroot]]/etc/env.d/gcc, if no custom toolchain location is provided. Differential Revision: https://reviews.llvm.org/D25661 llvm-svn: 285074
* Teach header search about GCC 4.9 header search paths in Gentoo, theyChandler Carruth2016-05-081-0/+15
| | | | | | now use the full GCC version in their weird suffix. llvm-svn: 268874
* tests: Add explicit -stdlib=libstdc++ to tests that require itJonas Hahnfeld2016-02-121-19/+19
| | | | | | | This will be needed for the next commit that allows to switch the default C++ library which would otherwise make these tests fail. llvm-svn: 260661
* Extend linux header search to find libc++ headers in c++/vN for any N.Evgeniy Stepanov2015-11-091-0/+36
| | | | llvm-svn: 252514
* [SPARC] Add multiarch include paths.James Y Knight2015-06-051-0/+57
| | | | | | | | | | | Adds tests verifying the proper dirs are found in the Debian 8/GCC4.9 layout for sparc (32bit), sparc (32bit) with lib64 multilib, and sparc64. The test cases added here also cover r239047, which fixed the linker paths. llvm-svn: 239154
* Avoid testing for a particular choice of resource dir.Sean Silva2015-01-281-12/+24
| | | | | | | | | | | | | | | Without this patch, this test was accidentally testing that CLANG_RESOURCE_DIR, CLANG_LIBDIR_SUFFIX, and CLANG_VERSION_STRING were set to a particular set of values. The test was also getting pretty hairy since it was attempting to craft a regular expression that covered "all" possible combinations of settings for these configure-time constants. Clean it up by directly capturing the resource directory in a FileCheck variable. llvm-svn: 227310
* Fix clash of gcc toolchains in driver regression tests.Samuel Antao2015-01-051-0/+18
| | | | | | For some regression tests the path to the right toolchain is specified using the -sysroot switch. However, if clang was configured with a custom gcc toolchain (either by using GCC_INSTALL_PREFIX in cmake or the equivalent configure command), the path to the custom gcc toolchain path takes precedence to the one specified by sysroot. This causes several regression tests to fail as they will be using an unexpected path. This patch fixes this issue by adding --gcc-toolchain='' to all tests that rely on that. The empty string causes the driver to pick the path from sysroot instead. llvm-svn: 225182
* Significantly fix Clang's header search for Ubuntu (and possibly otherChandler Carruth2014-08-271-10/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | modern Debian-based distributions) due to on-going multiarch madness. It appears that when the multiarch heeader search support went into the clang driver, it went in in a quite bad state. The order of includes completely failed to match the order exhibited by GCC, and in a specific case -- when the GCC triple and the multiarch triple don't match as with i686-linux-gnu and i386-linux-gnu -- we would absolutely fail to find the libstdc++ target-specific header files. I assume that folks who have been using Clang on Ubuntu 32-bit systems have been applying weird patches to hack around this. I can't imagine how else it could have worked. This was originally reported by a 64-bit operating system user who had a 32-bit crosscompiler installed. We tried to use that rather than the bi-arch support of the 64-bit compiler, but failed due to the triple differences. I've corrected all the wrong orderings in the existing tests and added a specific test for the multiarch triple strings that are different in a significant way. This should significantly improve the usability of Clang when checked out vanilla from upstream onto Ubuntu machines with an i686 GCC installation for whatever reason. llvm-svn: 216531
* [x32] Adding X32 target support to driver, including ↵Zinovy Nis2014-07-101-0/+16
| | | | | | | | | | TargetInfo,DescriptionString, flags, paths lookup, etc. Cover changes with new tests. The author of the patch is Pavel Chupin (@pavel.v.chupin). The changes enable "hello world" on x32 target (x86_64-*-linux-gnux32). s/isX32/IsX32/ also fixed. Differential Revision: http://reviews.llvm.org/D4180 llvm-svn: 212725
* [Driver][Mips] Support mips64-linux-gnuabi64 / mips64el-linux-gnuabi64 ↵Simon Atanasyan2014-06-241-0/+32
| | | | | | | | | target triples. The patch fixes the bug #19869. http://llvm.org/bugs/show_bug.cgi?id=19869 llvm-svn: 211619
* [PowerPC] Add MultiarchIncludeDirs for powerpc64leUlrich Weigand2014-06-201-0/+16
| | | | | | | | | | There was already partial support for multi-arch on powerpc64le, but the MultiarchIncludeDirs setting was missing. This patch adds the appropriate definition, and also extends the linux-header-search.cpp test case to verify an Ubuntu 14.04 powerpc64le tree. llvm-svn: 211359
* [Driver] Do not lose already detected set of toolchain's multilibs whileSimon Atanasyan2014-05-121-0/+14
| | | | | | | | | | | | | | | | | iterating over different library path suffixes and different library versions. To find the most appropriate library for the given command line flags we iterate over a set of disk paths. Before probe each path the already detected set of multilibs are cleared. If the set of paths contains existing paths which do not satisfy command line flags or do not contain necessary libraries and object files at all we might lose found multilibs. The patch updates variables which hold detected multilibs if we really find a new multilib matches command line flags. The patch reviewed by Jon Roelofs. llvm-svn: 208523
* Update tests for addition of patch level to LLVM versionTom Stellard2014-03-031-9/+9
| | | | llvm-svn: 202721
* Make the Linux support for finding libc++ somewhat less braindead.Chandler Carruth2014-01-201-0/+23
| | | | | | | | | | | | Now instead of just looking in the system root for it, we also look relative to the clang binary's directory. This should "just work" in almost all cases. I've added test cases accordingly. This is probably *very* worthwhile to backport to the 3.4 branch so that folks can check it out, build it, and use that as their host compiler going forward. llvm-svn: 199632
* Teach the Linux toolchain about more modern Gentoo installations of GCCChandler Carruth2013-08-261-0/+29
| | | | | | | | 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
* Rework r187192, to tweak expressions to be tolerant of DOSish paths. XFAILs ↵NAKAMURA Takumi2013-07-261-4/+1
| | | | | | can be removed. llvm-svn: 187194
* clang/test/Driver/linux-header-search.cpp: Add XFAILs, for now. I'll fix ↵NAKAMURA Takumi2013-07-261-0/+3
| | | | | | them later. llvm-svn: 187192
* Fix gcc search for cross-compiler on Ubuntu 13.04.Eli Friedman2013-07-261-0/+14
| | | | | | | | Just more craziness to find crtbegin.o etc. Patch by Stephen Kelly. llvm-svn: 187175
* Remove PathV1.h usage from ToolChains.cpp.Rafael Espindola2013-06-261-6/+6
| | | | llvm-svn: 184902
* Driver: add support for new style multiarch in Ubuntu 13.04Dmitri Gribenko2013-03-061-0/+28
| | | | | | Patch by Sanne Wouda. llvm-svn: 176557
* The clang driver has a fairly fancy support for executing gcc instead ofRafael Espindola2012-10-091-2/+2
| | | | | | | | | | | | | | clang itself. This dates back to clang's early days and while it looks like some of it is still used (for kext for example), other parts are probably dead. Remove the -ccc-clang-archs option and associated code. I don't think there is any remaining setup where clang doesn't support an architecture but it can expect an working gcc cross compiler to be available. A nice side effect is that tests no longer need to differentiate architectures that are included in production builds of clang and those that are not. llvm-svn: 165545
* Author: Daniel Dunbar <daniel@zuster.org>Daniel Dunbar2012-04-091-2/+2
| | | | | | | --- log message follows this test --- [tests] Fixup some tests to work in "CLANG_IS_PRODUCTION" mode. llvm-svn: 154342
* Okay, makes sense to change all the occurences to match clang.EXE.Benjamin Kramer2012-02-261-3/+3
| | | | llvm-svn: 151491
* Allow any file extension for the clang binary in the linux-header-search test.Benjamin Kramer2012-02-261-1/+1
| | | | | | Turns out this can be .exe or .EXE, depending on the build system. llvm-svn: 151490
* A follow-up to r151482 which added support for powerpc and powerpc64Chandler Carruth2012-02-261-0/+58
| | | | | | | | | | | | | | | | | Debian multiarch libraries, this should in theory add support for those platform's header search rules. I don't have a system to check this with, so review appreciated. I've added the corresponding tests referring to the debian multiarch tree. We are starting to have a relatively completely tested Linux platform for header search and library search, with several interesting peculiarities. We should point people at the debian_multiarch_tree when suggesting new tests. Folks with Debian systems that can check this for correctness, it would be much appreciated. The missing chunks I know of are testing bi-arch peudo-cross-compiling toolchains betwen 32-bit and 64-bit variants of platforms, and the MIPS and ARM Debian toolchains. llvm-svn: 151484
* rename -ccc-host-triple into -targetSebastian Pop2012-01-201-1/+1
| | | | llvm-svn: 148582
* Revert r148138; it's causing test failures.Eli Friedman2012-01-131-1/+1
| | | | llvm-svn: 148141
* rename -ccc-host-triple into -targetSebastian Pop2012-01-131-1/+1
| | | | llvm-svn: 148138
* Try to fix an issue on some hosts where the 'lib' in the builtin includeChandler Carruth2011-11-091-1/+1
| | | | | | path is actually a multilib. llvm-svn: 144177
* Fix an issue that Duncan discovered on a specific (no longer current)Chandler Carruth2011-11-091-0/+17
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
OpenPOWER on IntegriCloud