summaryrefslogtreecommitdiffstats
path: root/libgloss
diff options
context:
space:
mode:
authorTamar Christina <tamar.christina@arm.com>2017-09-26 14:47:04 +0100
committerCorinna Vinschen <corinna@vinschen.de>2017-10-09 19:03:52 +0200
commit111b6813fb967a4bae51dc43d574c0c28d4dea6c (patch)
tree39aef873ac0e06bd7cd409ed1e48b5e479c7df2a /libgloss
parent4bee8c48dfb1c53669dcc94dbe0e13e13af298ac (diff)
downloadcygnal-111b6813fb967a4bae51dc43d574c0c28d4dea6c.tar.gz
cygnal-111b6813fb967a4bae51dc43d574c0c28d4dea6c.tar.bz2
cygnal-111b6813fb967a4bae51dc43d574c0c28d4dea6c.zip
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>
Diffstat (limited to 'libgloss')
-rw-r--r--libgloss/multi-build.in4
1 files 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:" \