forked from OSchip/llvm-project
![]() 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 |
||
---|---|---|
.. | ||
B_opt_tree | ||
basic_android_tree | ||
basic_freebsd64_tree | ||
basic_freebsd_tree | ||
basic_linux_tree | ||
debian_6_mips_tree | ||
debian_multiarch_tree | ||
fake_install_tree | ||
fedora_18_tree | ||
freescale_ppc64_tree | ||
freescale_ppc_tree | ||
gcc_version_parsing1 | ||
gcc_version_parsing2 | ||
gcc_version_parsing3 | ||
gcc_version_parsing4 | ||
hexagon_tree | ||
mips_cs_tree | ||
montavista_i686_tree/usr/lib/gcc/i686-montavista-linux/4.2.0 | ||
multiarch_freebsd64_tree | ||
multilib_32bit_linux_tree | ||
multilib_64bit_linux_tree | ||
prefixed_tools_tree | ||
resource_dir/lib/linux | ||
suse_10.3_ppc64_tree | ||
ubuntu_11.04_multiarch_tree | ||
ubuntu_12.04_LTS_multiarch_tree | ||
ubuntu_13.04_multiarch_tree | ||
lit.local.cfg |