summaryrefslogtreecommitdiff
path: root/util/crossgcc/patches/cfe-3.8.0.src_frontend.patch
diff options
context:
space:
mode:
authorIru Cai <mytbk920423@gmail.com>2016-04-02 10:50:59 +0800
committerStefan Reinauer <stefan.reinauer@coreboot.org>2016-05-04 20:21:11 +0200
commitae8e3a0bbb1d028e9d18572304ec93e1495976f5 (patch)
treeae98bf3fb77548fdb16eb0f7d40c2a5cc4fdbf04 /util/crossgcc/patches/cfe-3.8.0.src_frontend.patch
parent2da008afa622e5469a34cd9d9712d498e84e4ea8 (diff)
downloadcoreboot-ae8e3a0bbb1d028e9d18572304ec93e1495976f5.tar.xz
crossgcc: Update toolchain
New tools: * mpfr 3.1.4 * binutils 2.26 * gcc 5.3.0 * llvm/clang 3.8.0 Patch changes: * binutils-2.25_fix-aarch64.patch: fixed in 2.26 * binutils-2.25_host-clang.patch: the positions of header file includes have been adjusted * binutils-2.25_no-bfd-doc.patch: update to 2.26 * binutils-2.25_riscv.patch: update from riscv-gnu-toolchain * gcc-5.2.0_elf_biarch.patch: update to 5.3.0 * gcc-5.2.0_gnat.patch: update to 5.3.0 * gcc-5.2.0_libgcc.patch: update to 5.3.0 * gcc-5.2.0_nds32.patch: update to 5.3.0 * gcc-5.2.0_riscv.patch: update from riscv-gnu-toolchain * cfe-3.7.1.src_frontend.patch: update to 3.8.0 In the latest code of riscv-gnu-toolchain project, the patch for {binutils,gcc}/config.sub has been removed, and the target is renamed as riscv32 and riscv64. The `riscv' to `riscv64' change in xcompile is in another commit. Test results: All GCC and LLVM/clang toolchain build successfully. x86,arm: qemu boots power8: firmware fails to boot aarch64,mips: not tested riscv: firmware fails to build with new binutils clang: firmware fails to boot Signed-off-by: Iru Cai <mytbk920423@gmail.com> Change-Id: I42ce89c29263d768d161c28199994f17d0389633 Reviewed-on: https://review.coreboot.org/14227 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'util/crossgcc/patches/cfe-3.8.0.src_frontend.patch')
-rw-r--r--util/crossgcc/patches/cfe-3.8.0.src_frontend.patch79
1 files changed, 79 insertions, 0 deletions
diff --git a/util/crossgcc/patches/cfe-3.8.0.src_frontend.patch b/util/crossgcc/patches/cfe-3.8.0.src_frontend.patch
new file mode 100644
index 0000000000..3b8e6b70b7
--- /dev/null
+++ b/util/crossgcc/patches/cfe-3.8.0.src_frontend.patch
@@ -0,0 +1,79 @@
+Frontend driver patch from Edward O'Callaghan
+
+https://llvm.org/bugs/show_bug.cgi?id=21538
+
+Index: include/clang/Driver/Driver.h
+===================================================================
+--- cfe-3.7.1.src/include/clang/Driver/Driver.h (revision 211898)
++++ cfe-3.8.0.src/include/clang/Driver/Driver.h (working copy)
+@@ -357,6 +357,14 @@
+ // FIXME: This should be in CompilationInfo.
+ std::string GetFilePath(const char *Name, const ToolChain &TC) const;
+
++ /// GetCompilerRTPath - Find Compiler-RT library path
++ ///
++ /// \param TC - The provided tool chain for additional information on
++ /// directories to search.
++ //
++ // FIXME: This should be in CompilationInfo.
++ std::string GetCompilerRTPath(const ToolChain &TC) const;
++
+ /// GetProgramPath - Lookup \p Name in the list of program search paths.
+ ///
+ /// \param TC - The provided tool chain for additional information on
+Index: include/clang/Driver/Options.td
+===================================================================
+--- cfe-3.7.1.src/include/clang/Driver/Options.td (revision 211898)
++++ cfe-3.8.0.src/include/clang/Driver/Options.td (working copy)
+@@ -1669,6 +1669,8 @@
+ HelpText<"Enable Objective-C Ivar layout bitmap print trace">;
+ def print_libgcc_file_name : Flag<["-", "--"], "print-libgcc-file-name">,
+ HelpText<"Print the library path for \"libgcc.a\"">;
++def print_librt_file_name : Flag<["-", "--"], "print-librt-file-name">,
++ HelpText<"Print the library path for \"libclang_rt.builtins-ARCH.a\"">;
+ def print_multi_directory : Flag<["-", "--"], "print-multi-directory">;
+ def print_multi_lib : Flag<["-", "--"], "print-multi-lib">;
+ def print_multi_os_directory : Flag<["-", "--"], "print-multi-os-directory">;
+Index: lib/Driver/Driver.cpp
+===================================================================
+--- cfe-3.7.1.src/lib/Driver/Driver.cpp (revision 211898)
++++ cfe-3.8.0.src/lib/Driver/Driver.cpp (working copy)
+@@ -910,6 +910,11 @@
+ return false;
+ }
+
++ if (C.getArgs().hasArg(options::OPT_print_librt_file_name)) {
++ llvm::outs() << GetCompilerRTPath(TC) << "\n";
++ return false;
++ }
++
+ if (C.getArgs().hasArg(options::OPT_print_multi_lib)) {
+ for (const Multilib &Multilib : TC.getMultilibs())
+ llvm::outs() << Multilib << "\n";
+@@ -2153,6 +2158,26 @@
+ return false;
+ }
+
++std::string Driver::GetCompilerRTPath(const ToolChain &TC) const {
++ // The runtimes are located in the OS-specific resource directory.
++ SmallString<128> Res(TC.getDriver().ResourceDir);
++ const llvm::Triple &Triple = TC.getTriple();
++
++ // TC.getOS() yield "freebsd10.0" whereas "freebsd" is expected.
++ StringRef OSLibName = (Triple.getOS() == llvm::Triple::FreeBSD) ?
++ "freebsd" : TC.getOS();
++ llvm::sys::path::append(Res, "lib", OSLibName);
++
++ StringRef archName = TC.getArchName();
++ // Until ARM libraries are build separately, we have them all in one library
++ if (TC.getArch() == llvm::Triple::arm ||
++ TC.getArch() == llvm::Triple::armeb)
++ archName = "arm";
++
++ llvm::sys::path::append(Res, Twine("libclang_rt.builtins-") + archName + ".a");
++ return Res.str();
++}
++
+ std::string Driver::GetProgramPath(const char *Name,
+ const ToolChain &TC) const {
+ SmallVector<std::string, 2> TargetSpecificExecutables;