aboutsummaryrefslogtreecommitdiff
path: root/libgloss/arc
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2016-04-29 15:14:51 -0400
committerJeff Johnston <jjohnstn@redhat.com>2016-04-29 15:17:11 -0400
commite90da68265f1cf1d029970aa02d3bf8c63e2a6b5 (patch)
treee209d613a7d6faf654b320d1734f39d48bd6fed9 /libgloss/arc
parent82768d9bab0a8f1fa805799f9afbb0379c276da5 (diff)
downloadnewlib-e90da68265f1cf1d029970aa02d3bf8c63e2a6b5.zip
newlib-e90da68265f1cf1d029970aa02d3bf8c63e2a6b5.tar.gz
newlib-e90da68265f1cf1d029970aa02d3bf8c63e2a6b5.tar.bz2
Add necessary infrastructure to support "nano" build of newlib.
ARC aproach to this feature is similiar to ARM's one here. 2016-04-29 Anton Kolesov <anton.kolesov@synopsys.com> * arc/nano.specs: New file. * arc/Makefile.in: Support nano.specs. * arc/nsim.specs: Likewise.
Diffstat (limited to 'libgloss/arc')
-rw-r--r--libgloss/arc/Makefile.in10
-rw-r--r--libgloss/arc/nano.specs18
-rw-r--r--libgloss/arc/nsim.specs10
3 files changed, 35 insertions, 3 deletions
diff --git a/libgloss/arc/Makefile.in b/libgloss/arc/Makefile.in
index ab8ad6d..d14bcea 100644
--- a/libgloss/arc/Makefile.in
+++ b/libgloss/arc/Makefile.in
@@ -58,6 +58,9 @@ NSIM_OBJS = \
NSIM_INSTALL = install-nsim
NSIM_SCRIPTS = nsim.specs
+NANO_SCRIPTS = nano.specs
+NANO_INSTALL = install-nano
+
CFLAGS = -g
# Host specific makefile fragment comes in here.
@@ -83,7 +86,7 @@ distclean maintainer-clean realclean: clean
rm -f Makefile config.status config.log config.cache *~
.PHONY: install info install-info clean-info doc dvi
-install: $(CRT0_INSTALL) $(NSIM_INSTALL)
+install: $(CRT0_INSTALL) $(NSIM_INSTALL) $(NANO_INSTALL)
# multilibdir may not exist yet - libgcc for ARC depends on libc, hence
# newlib/libgloss is built before libgcc. And in parallel build libgloss maybe
@@ -100,6 +103,11 @@ $(NSIM_INSTALL):
for x in $(NSIM_SCRIPTS); do \
$(INSTALL_DATA) $(srcdir)/$$x $(DESTDIR)$(tooldir)/lib$(MULTISUBDIR)/$$x; done
+$(NANO_INSTALL):
+ $(mkinstalldirs) $(DESTDIR)${tooldir}/lib${MULTISUBDIR}
+ for x in $(NANO_SCRIPTS); do \
+ $(INSTALL_DATA) $(srcdir)/$$x $(DESTDIR)$(tooldir)/lib$(MULTISUBDIR)/$$x; done
+
doc:
info:
dvi:
diff --git a/libgloss/arc/nano.specs b/libgloss/arc/nano.specs
new file mode 100644
index 0000000..dc9cbf3
--- /dev/null
+++ b/libgloss/arc/nano.specs
@@ -0,0 +1,18 @@
+%rename link nano_link
+%rename link_gcc_c_sequence nano_link_gcc_c_sequence
+
+*nano_libc:
+-lc_nano
+
+*nano_libgloss:
+%{specs=nsim.specsnsim} %{specs=nosys.specsnosys}
+
+*link_gcc_c_sequence:
+%(nano_link_gcc_c_sequence) --start-group %G %(nano_libc) %(nano_libgloss) --end-group
+
+*link:
+%(nano_link) %:replace-outfile(-lc -lc_nano) %:replace-outfile(-lg -lg_nano) %:replace-outfile(-lstdc++ -lstdc++_nano) %:replace-outfile(-lsupc++ -lsupc++_nano)
+
+*lib:
+%{!shared:%{g*g_nano} %{!p:%{!pgc_nano}}%{pc_p}%{pgc_p}}
+
diff --git a/libgloss/arc/nsim.specs b/libgloss/arc/nsim.specs
index aa77eea..ec8724c 100644
--- a/libgloss/arc/nsim.specs
+++ b/libgloss/arc/nsim.specs
@@ -1,5 +1,11 @@
-%rename link_gcc_c_sequence nsim_link_gcc_c_sequence
+%rename link_gcc_c_sequence nsim_link_gcc_c_sequence
+
+*nsim_libgloss:
+-lnsim
+
+*nsim_libc:
+%{!specs=nano.specsc} %{specs=nano.specsc_nano}
*link_gcc_c_sequence:
-%(nsim_link_gcc_c_sequence) --start-group %G -lc -lnsim --end-group
+%(nsim_link_gcc_c_sequence) --start-group %G %(nsim_libc) %(nsim_libgloss) --end-group