From 9d3352416413817b37b13277cb44308651c42121 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Fri, 28 Jan 2022 06:21:41 -0500 Subject: [PATCH] libgloss: aarch64/sparc: fix missing dir with parallel install Depending on the processing order of rules when installing in parallel, install-board might run first and the target dirs don't yet exist. --- libgloss/aarch64/Makefile.in | 6 +++++- libgloss/sparc/Makefile.in | 6 ++++++ libgloss/sparc_leon/Makefile.in | 3 +++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/libgloss/aarch64/Makefile.in b/libgloss/aarch64/Makefile.in index b8c2ca43c..82a0e3717 100644 --- a/libgloss/aarch64/Makefile.in +++ b/libgloss/aarch64/Makefile.in @@ -60,6 +60,8 @@ MULTI_DEFAULT_FLAGS = -DSEMIHOST_V2 SHELL = /bin/sh +mkinstalldirs = $(SHELL) $(srcroot)/mkinstalldirs + CC = @CC@ AS = @AS@ @@ -196,9 +198,11 @@ install: ${CRT0_INSTALL} ${RDIMON_INSTALL} $(MAKE) $(AM_MAKEFLAGS) install-recursive install-crt0: + ${mkinstalldirs} ${DESTDIR}${tooldir}/lib${MULTISUBDIR} ${INSTALL_DATA} ${CRT0} $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x install-rdimon: + ${mkinstalldirs} ${DESTDIR}${tooldir}/lib${MULTISUBDIR} set -e; for x in ${RDIMON_CRT0} ${RDIMON_BSP}; do ${INSTALL_DATA} $$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done set -e; for x in ${RDIMON_SCRIPTS}; do ${INSTALL_DATA} ${srcdir}/${objtype}$$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done @@ -217,4 +221,4 @@ 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 +include $(srcdir)/../multi-build.in diff --git a/libgloss/sparc/Makefile.in b/libgloss/sparc/Makefile.in index 67f19ac7a..5c3ac6618 100644 --- a/libgloss/sparc/Makefile.in +++ b/libgloss/sparc/Makefile.in @@ -43,6 +43,8 @@ INSTALL_DATA = @INSTALL_DATA@ SHELL = /bin/sh +mkinstalldirs = $(SHELL) $(srcroot)/mkinstalldirs + CC = @CC@ AS = @AS@ @@ -172,15 +174,18 @@ $(objdir)/cygmon.ld: @CYGMONLDSCRIPTTEMPL@ sed 's/TARGET_OBJ_FORMAT/$($(CPU)_OBJ_FORMAT)/g;s/TARGET_RAM_START/$($(CPU)_RAM_START)/g;' < $(<) > $(objdir)/cygmon.ld install: $($(CPU)_INSTALL) + ${mkinstalldirs} ${DESTDIR}${tooldir}/lib${MULTISUBDIR} $(INSTALL_DATA) $(CRT0) $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$(CRT0) sparc-install: + ${mkinstalldirs} ${DESTDIR}${tooldir}/lib${MULTISUBDIR} $(INSTALL_DATA) $(CYGMON_BSP) $(DESTDIR)$(tooldir)/lib${MULTISUBDIR} $(INSTALL_DATA) $(CYGMON_OBJS) $(DESTDIR)$(tooldir)/lib${MULTISUBDIR} $(INSTALL_DATA) $(objdir)/cygmon.ld $(DESTDIR)$(tooldir)/lib${MULTISUBDIR} $(INSTALL_DATA) $(CYGMON_CRT0) $(DESTDIR)$(tooldir)/lib${MULTISUBDIR} slite-install: + ${mkinstalldirs} ${DESTDIR}${tooldir}/lib${MULTISUBDIR} $(INSTALL_DATA) $(930_BSP) $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$(930_BSP) $(INSTALL_DATA) $(931_BSP) $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$(931_BSP) $(INSTALL_DATA) $(934_BSP) $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$(934_BSP) @@ -199,6 +204,7 @@ slite-install: $(INSTALL_DATA) $(CYGMON_CRT0) $(DESTDIR)$(tooldir)/lib${MULTISUBDIR} splet-install: + ${mkinstalldirs} ${DESTDIR}${tooldir}/lib${MULTISUBDIR} $(INSTALL_DATA) $(701_CRT0) $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$(701_CRT0) $(INSTALL_DATA) $(701_BSP) $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$(701_BSP) $(INSTALL_DATA) $(srcdir)/tsc701.ld $(DESTDIR)$(tooldir)/lib${MULTISUBDIR} diff --git a/libgloss/sparc_leon/Makefile.in b/libgloss/sparc_leon/Makefile.in index c21a3e39f..5cc1e5491 100644 --- a/libgloss/sparc_leon/Makefile.in +++ b/libgloss/sparc_leon/Makefile.in @@ -32,6 +32,8 @@ INSTALL_DATA = @INSTALL_DATA@ SHELL = /bin/sh +mkinstalldirs = $(SHELL) $(srcroot)/mkinstalldirs + CC = @CC@ AS = @AS@ @@ -103,6 +105,7 @@ $(LEONBARE_THREADS): $(LEONBARE_THREADS_OBJS) ${RANLIB} $@ install: + ${mkinstalldirs} ${DESTDIR}${tooldir}/lib${MULTISUBDIR} $(INSTALL_DATA) $(CRT0) $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$(CRT0) $(INSTALL_DATA) $(LOCORESVT) $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$(LOCORESVT) $(INSTALL_DATA) $(LOCOREMVT) $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$(LOCOREMVT) -- 2.43.5