summarylogtreecommitdiffstats
path: root/0004-Remove-libgloss.patch
diff options
context:
space:
mode:
authorJiuyang liu2019-06-25 08:38:31 +0000
committerJiuyang liu2019-06-25 08:38:31 +0000
commitea4c1a3e9a89cd74a1e844f1db9d7b2ee78e9213 (patch)
tree34fc748ac62993dcdbf4c9daee922995b49b7d39 /0004-Remove-libgloss.patch
downloadaur-riscv-sifive-elf-gcc-stage1.tar.gz
init
Diffstat (limited to '0004-Remove-libgloss.patch')
-rw-r--r--0004-Remove-libgloss.patch17
1 files changed, 17 insertions, 0 deletions
diff --git a/0004-Remove-libgloss.patch b/0004-Remove-libgloss.patch
new file mode 100644
index 000000000000..b7febd4e7218
--- /dev/null
+++ b/0004-Remove-libgloss.patch
@@ -0,0 +1,17 @@
+diff --git a/gcc/config/riscv/elf.h b/gcc/config/riscv/elf.h
+index 9be97b866..8a0df0a37 100644
+--- a/gcc/config/riscv/elf.h
++++ b/gcc/config/riscv/elf.h
+@@ -22,10 +22,9 @@ along with GCC; see the file COPYING3. If not see
+ %{mno-relax:--no-relax} \
+ %{shared}"
+
+-/* Link against Newlib libraries, because the ELF backend assumes Newlib.
+- Handle the circular dependence between libc and libgloss. */
++/* remove the dependency of libgloss, no default libc. */
+ #undef LIB_SPEC
+-#define LIB_SPEC "--start-group -lc %{!specs=nosys.specs:-lgloss} --end-group"
++#define LIB_SPEC "--start-group -lgcc -lg -lc --end-group"
+
+ #undef STARTFILE_SPEC
+ #define STARTFILE_SPEC "crt0%O%s crtbegin%O%s"