public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: newlib@sourceware.org
Subject: [PATCH/committed] libgloss: aarch64/sparc: fix missing dir with parallel install
Date: Fri, 28 Jan 2022 06:22:15 -0500	[thread overview]
Message-ID: <20220128112215.23528-1-vapier@gentoo.org> (raw)

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 b8c2ca43c149..82a0e3717cc2 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 67f19ac7a8fb..5c3ac661880a 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 c21a3e39f58e..5cc1e5491ffc 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.34.1


                 reply	other threads:[~2022-01-28 11:22 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220128112215.23528-1-vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=newlib@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).