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.
			
			
This commit is contained in:
		
							parent
							
								
									82768d9bab
								
							
						
					
					
						commit
						e90da68265
					
				|  | @ -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: | ||||
|  |  | |||
|  | @ -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}} | ||||
| 
 | ||||
|  | @ -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 | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue