This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: [PATCH][libgloss][ARM] Fix newlib arm/aarch64 multi-do build when relative paths to configure are used
- From: Tamar Christina <Tamar dot Christina at arm dot com>
- To: "newlib at sourceware dot org" <newlib at sourceware dot org>, Corinna Vinschen <vinschen at redhat dot com>
- Cc: nd <nd at arm dot com>
- Date: Mon, 9 Oct 2017 16:17:33 +0000
- Subject: Re: [PATCH][libgloss][ARM] Fix newlib arm/aarch64 multi-do build when relative paths to configure are used
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=Tamar dot Christina at arm dot com;
- Nodisclaimer: True
- References: <DB6PR0802MB2309BF562BEF2CD000E9EA60FF710@DB6PR0802MB2309.eurprd08.prod.outlook.com>,<20171009161233.GF3542@calimero.vinschen.de>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
Hi Corinna,
Sure thing, here's the new patch.
Thanks,
Tamar
________________________________________
From: Corinna Vinschen <vinschen@redhat.com>
Sent: Monday, October 9, 2017 5:12:33 PM
To: Tamar Christina
Cc: newlib@sourceware.org; nd
Subject: Re: [PATCH][libgloss][ARM] Fix newlib arm/aarch64 multi-do build when relative paths to configure are used
Hi Tamar,
On Oct 6 15:44, Tamar Christina wrote:
> From 803409fafbd4e68f63d283a57958ce76668ba442 Mon Sep 17 00:00:00 2001
> From: Tamar Christina <tamar.christina@arm.com>
> Date: Tue, 26 Sep 2017 14:47:04 +0100
> Subject: [PATCH] The previous multi-build implementation was copying the
> config.status from the parent multilib directory when building the different
> semihosting variants. It did so because the configuration doesn't change.
> However when you use a relative path to configure it turns out that the paths
> inside the config.status are also relative.
Can you please recreate the patch with a short subject and the rest of
the text in the log message?
Thanks,
Corinna
--
Corinna Vinschen
Cygwin Maintainer
Red Hat
From fdef1f78bb102fc335f5ed2560d251d9ff973478 Mon Sep 17 00:00:00 2001
From: Tamar Christina <tamar.christina@arm.com>
Date: Tue, 26 Sep 2017 14:47:04 +0100
Subject: [PATCH] Fix multido compilation on ARM
The previous multi-build implementation was copying the config.status from the parent
multilib directory when building the different semihosting variants. It did so because
the configuration doesn't change. However when you use a relative path to configure it
turns out that the paths inside the config.status are also relative.
To fix this, the srcdir is adjusted from the initial configuration instead of copying it.
Tested on aarch64-none-elf and arm-none-eabi.
Signed-off-by: Tamar Christina <tamar.christina@arm.com>
---
libgloss/multi-build.in | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libgloss/multi-build.in b/libgloss/multi-build.in
index 1403eb35e..52aeeec26 100644
--- a/libgloss/multi-build.in
+++ b/libgloss/multi-build.in
@@ -17,9 +17,9 @@ multi-do:
destpre=`echo $${rootpre}/$${dir}`/; export destpre; \
if ! test -d $${destpre} ; then \
mkdir -p $${destpre}; \
- cp config.status $${destpre}; \
cd $${destpre}; \
- $(SHELL) config.status; \
+ config_cmd=`../config.status --config | sed -re "s:--srcdir=([^/]):--srcdir=../\1:"`; \
+ $(SHELL) -c "$(SHELL) $${srcrootpre}/configure $${config_cmd}";\
sed -e "s:^MULTIDIRS[[:space:]]*+=.*$$:MULTIDIRS = :" \
-e "s:^MULTILIBNAME[[:space:]]*=.*$$:MULTILIBNAME = MULTIDIR_$${dir}_NAME:" \
-e "s:^MULTI_FLAGS_FOR_TARGET[[:space:]]*=.*$$:MULTI_FLAGS_FOR_TARGET = MULTIDIR_$${dir}_FLAGS:" \
--
2.14.1