diff options
author | Tamar Christina <tamar.christina@arm.com> | 2017-07-05 13:00:23 +0100 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2017-07-05 14:41:27 +0200 |
commit | bfa3bbcf33a43bffb0a2d3287b1de97898a57c02 (patch) | |
tree | 45c6671b645aef777e15596de7e21bae7a5bfc74 /libgloss/aarch64/Makefile.in | |
parent | ebd97f4c0061315dbabb04752edf4ed9cd38187f (diff) | |
download | cygnal-bfa3bbcf33a43bffb0a2d3287b1de97898a57c02.tar.gz cygnal-bfa3bbcf33a43bffb0a2d3287b1de97898a57c02.tar.bz2 cygnal-bfa3bbcf33a43bffb0a2d3287b1de97898a57c02.zip |
Adds the needed build system changes in order to compile and create the new libraries for Semihosting v2.
This uses the new recursive build target in multi-build.in
For AArch64 no new spec files are needed but the makefiles
are modified to keep them in sync with the ARM ones.
Signed-off-by: Tamar Christina <tamar.christina@arm.com>
Diffstat (limited to 'libgloss/aarch64/Makefile.in')
-rw-r--r-- | libgloss/aarch64/Makefile.in | 54 |
1 files changed, 41 insertions, 13 deletions
diff --git a/libgloss/aarch64/Makefile.in b/libgloss/aarch64/Makefile.in index 3c8a9fd10..546557e3c 100644 --- a/libgloss/aarch64/Makefile.in +++ b/libgloss/aarch64/Makefile.in @@ -52,8 +52,11 @@ MULTISRCTOP = MULTIBUILDTOP = MULTIDIRS = MULTISUBDIR = +MULTILIBNAME = MULTIDO = true MULTICLEAN = true +MULTI_FLAGS_FOR_TARGET = MULTI_DEFAULT_FLAGS +MULTI_DEFAULT_FLAGS = -DSEMIHOST_V2 SHELL = /bin/sh @@ -77,11 +80,12 @@ OBJS = ftruncate.o libcfunc.o syscalls.o truncate.o _exit.o _kill.o CRT0 = crt0.o CRT0_INSTALL = install-crt0 -CRT0_INSTALL = install-crt0 -RDIMON_CRT0 = rdimon-crt0.o -RDIMON_BSP = librdimon.a +RDIMON_CRT0 = rdimon-crt0${${MULTILIBNAME}}.o +RDIMON_BSP = librdimon${${MULTILIBNAME}}.a RDIMON_OBJS = $(patsubst %,rdimon-%,$(OBJS)) -RDIMON_SCRIPTS = rdimon.specs aem-ve.specs aem-validation.specs +RDIMON_SCRIPTS = rdimon${${MULTILIBNAME}}.specs \ + aem-ve${${MULTILIBNAME}}.specs \ + aem-validation${${MULTILIBNAME}}.specs RDIMON_INSTALL = install-rdimon CFLAGS = -g @@ -93,6 +97,7 @@ CFLAGS = -g # build a test program for each target board. Just trying to get # it to link is a good test, so we ignore all the errors for now. # + all: ${CRT0} ${RDIMON_CRT0} ${RDIMON_BSP} ${RDIMON_SCRIPTS} @rootpre=`pwd`/; export rootpre; \ srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \ @@ -103,6 +108,7 @@ all: ${CRT0} ${RDIMON_CRT0} ${RDIMON_BSP} ${RDIMON_SCRIPTS} else true; fi; \ else true; fi; \ done + $(MAKE) $(AM_MAKEFLAGS) all-recursive # # here's where we build the test programs for each target @@ -112,35 +118,53 @@ test: # crt0.o: crt0.S + $(CC) $(CFLAGS_FOR_TARGET) $($(MULTI_FLAGS_FOR_TARGET)) $(CFLAGS) $(INCLUDES) -o $@ -c $< -rdimon-crt0.o: crt0.S - $(CC) $(CFLAGS_FOR_TARGET) $(CFLAGS) $(INCLUDES) -DARM_RDI_MONITOR -o $@ -c $< +rdimon-crt0${${MULTILIBNAME}}.o: crt0.S + $(CC) $(CFLAGS_FOR_TARGET) $($(MULTI_FLAGS_FOR_TARGET)) $(CFLAGS) $(INCLUDES) -DARM_RDI_MONITOR -o $@ -c $< #rdimon-trap.o: trap.S -# $(CC) $(CFLAGS_FOR_TARGET) $(CFLAGS) $(INCLUDES) -DARM_RDI_MONITOR -o $@ -c $< +# $(CC) $(CFLAGS_FOR_TARGET) $($(MULTI_FLAGS_FOR_TARGET)) $(CFLAGS) $(INCLUDES) -DARM_RDI_MONITOR -o $@ -c $< rdimon-_exit.o: _exit.c - $(CC) $(CFLAGS_FOR_TARGET) $(CFLAGS) $(INCLUDES) -DARM_RDI_MONITOR -o $@ -c $< + $(CC) $(CFLAGS_FOR_TARGET) $($(MULTI_FLAGS_FOR_TARGET)) $(CFLAGS) $(INCLUDES) -DARM_RDI_MONITOR -o $@ -c $< rdimon-ftruncate.o: ftruncate.c - $(CC) $(CFLAGS_FOR_TARGET) $(CFLAGS) $(INCLUDES) -DARM_RDI_MONITOR -o $@ -c $< + $(CC) $(CFLAGS_FOR_TARGET) $($(MULTI_FLAGS_FOR_TARGET)) $(CFLAGS) $(INCLUDES) -DARM_RDI_MONITOR -o $@ -c $< rdimon-_kill.o: _kill.c - $(CC) $(CFLAGS_FOR_TARGET) $(CFLAGS) $(INCLUDES) -DARM_RDI_MONITOR -o $@ -c $< + $(CC) $(CFLAGS_FOR_TARGET) $($(MULTI_FLAGS_FOR_TARGET)) $(CFLAGS) $(INCLUDES) -DARM_RDI_MONITOR -o $@ -c $< rdimon-libcfunc.o: libcfunc.c - $(CC) $(CFLAGS_FOR_TARGET) $(CFLAGS) $(INCLUDES) -DARM_RDI_MONITOR -o $@ -c $< + $(CC) $(CFLAGS_FOR_TARGET) $($(MULTI_FLAGS_FOR_TARGET)) $(CFLAGS) $(INCLUDES) -DARM_RDI_MONITOR -o $@ -c $< rdimon-syscalls.o: syscalls.c - $(CC) $(CFLAGS_FOR_TARGET) $(CFLAGS) $(INCLUDES) -DARM_RDI_MONITOR -o $@ -c $< + $(CC) $(CFLAGS_FOR_TARGET) $($(MULTI_FLAGS_FOR_TARGET)) $(CFLAGS) $(INCLUDES) -DARM_RDI_MONITOR -o $@ -c $< rdimon-truncate.o: truncate.c - $(CC) $(CFLAGS_FOR_TARGET) $(CFLAGS) $(INCLUDES) -DARM_RDI_MONITOR -o $@ -c $< + $(CC) $(CFLAGS_FOR_TARGET) $($(MULTI_FLAGS_FOR_TARGET)) $(CFLAGS) $(INCLUDES) -DARM_RDI_MONITOR -o $@ -c $< $(RDIMON_BSP): $(RDIMON_OBJS) ${AR} ${ARFLAGS} $@ $^ ${RANLIB} $@ +# Multilib support. +.PHONY: multi-do all-multi clean-multi install-multi + +all-recursive: all-multi +clean-recursive: clean-multi +install-recursive: install-multi + +# The $(MAKE) comments below are to enable parallel building. +all-multi: + $(MAKE) $(AM_MAKEFLAGS) DO=all multi-do + +clean-multi: + $(MAKE) $(AM_MAKEFLAGS) DO=clean multi-do + +install-multi: + $(MAKE) $(AM_MAKEFLAGS) DO=install multi-do + clean mostlyclean: rm -f a.out core *.i *.o *-test *.srec *.dis *.x $(SIM_BSP) ${RDIMON_SCRIPTS} @rootpre=`pwd`/; export rootpre; \ @@ -152,6 +176,7 @@ clean mostlyclean: else true; fi; \ else true; fi; \ done + $(MAKE) $(AM_MAKEFLAGS) clean-recursive distclean maintainer-clean realclean: clean rm -f Makefile config.status *~ @@ -167,6 +192,7 @@ install: ${CRT0_INSTALL} ${RDIMON_INSTALL} else true; fi; \ else true; fi; \ done + $(MAKE) $(AM_MAKEFLAGS) install-recursive install-crt0: ${INSTALL_DATA} ${CRT0} $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x @@ -189,3 +215,5 @@ Makefile: Makefile.in config.status @host_makefile_frag_path@ config.status: configure $(SHELL) config.status --recheck + +include $(srcdir)/../multi-build.in
\ No newline at end of file |