summarylogtreecommitdiffstats
path: root/0004-Remove-libgloss.patch
diff options
context:
space:
mode:
authorJiuyang liu2019-06-25 08:43:59 +0000
committerJiuyang liu2019-06-25 08:44:27 +0000
commit41560dadd1fdd27009dbe157bc6689ad8cbb2c5e (patch)
tree6785aabec1c3c25023d91e0588b45ff28eee8971 /0004-Remove-libgloss.patch
downloadaur-riscv-sifive-elf-gcc.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"