public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/vendors/ARM/heads/morello)] morello: fix backward-incompatibility of space variable
@ 2022-06-16  9:51 Przemyslaw Wirkus
  0 siblings, 0 replies; only message in thread
From: Przemyslaw Wirkus @ 2022-06-16  9:51 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:49e48292f7e7877e3316d9a94d35d7e5fb31e63e

commit 49e48292f7e7877e3316d9a94d35d7e5fb31e63e
Author: Przemyslaw Wirkus <przemyslaw.wirkus@arm.com>
Date:   Thu Jun 16 10:51:28 2022 +0100

    morello: fix backward-incompatibility of space variable
    
    This patch is fixing error from genmultilib when building Morello
    toolchain with make 4.3:
    
            The rule mabi.purecap/march.morello+c64=mabi.purecap/march.morello+c64+nolse
            is trying to reuse nonexistent multilib.
    
    MULTILIB_OPTIONS variable passed to genmultilib script (option $1) is
    scrambled as seen below:
    
            (make 4.3)   mabi=lp64ilp32purecaphybridcap/mabi=  <snip>
            (make 4.2.1) mabi=lp64/mabi=ilp32/mabi=purecap  <snip>
    
    This issue is caused by backward-incompatibility in Make 4.3, see [0]
    for details. In short:
    
            space =
            space +=
    
    will no longer create string with one space character because previously
    appending using '+=' to an empty variable would result in a value
    starting with a space.  Now (make 4.3 onwards) the initial space is only
    added if the variable `space` already contains some value.
    
            [0] https://lists.gnu.org/archive/html/info-gnu/2020-01/msg00004.html
    
    gcc/ChangeLog:
    
            * config/aarch64/t-aarch64 (space): Redefine space variable to be
            compatible with Make >=4.3.

Diff:
---
 gcc/config/aarch64/t-aarch64 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/config/aarch64/t-aarch64 b/gcc/config/aarch64/t-aarch64
index daba74f12ec..5e69757a03c 100644
--- a/gcc/config/aarch64/t-aarch64
+++ b/gcc/config/aarch64/t-aarch64
@@ -163,8 +163,8 @@ comma=,
 # Adding nothing to an empty variable is one way to obtain a space
 # character in a variable. As with comma above, we then use it as an
 # escaped space character.
-space =
-space +=
+E =
+space = $E $E
 
 WITHOUT_HYBRID = $(subst $(space),$(comma),$(filter-out hybridcap,$(subst $(comma),$(space),$(TM_MULTILIB_CONFIG))))
 MULTILIB_OPTIONS = $(subst $(comma),/, $(patsubst %, mabi=%, $(subst $(comma),$(comma)mabi=,$(WITHOUT_HYBRID))))


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-06-16  9:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-16  9:51 [gcc(refs/vendors/ARM/heads/morello)] morello: fix backward-incompatibility of space variable Przemyslaw Wirkus

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).