From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7820) id 40A663858C56; Thu, 16 Jun 2022 09:51:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 40A663858C56 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Przemyslaw Wirkus To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/vendors/ARM/heads/morello)] morello: fix backward-incompatibility of space variable X-Act-Checkin: gcc X-Git-Author: Przemyslaw Wirkus X-Git-Refname: refs/vendors/ARM/heads/morello X-Git-Oldrev: 92446a01050f5c20f8f719966137a4976dbd6b75 X-Git-Newrev: 49e48292f7e7877e3316d9a94d35d7e5fb31e63e Message-Id: <20220616095158.40A663858C56@sourceware.org> Date: Thu, 16 Jun 2022 09:51:58 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jun 2022 09:51:58 -0000 https://gcc.gnu.org/g:49e48292f7e7877e3316d9a94d35d7e5fb31e63e commit 49e48292f7e7877e3316d9a94d35d7e5fb31e63e Author: Przemyslaw Wirkus 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= (make 4.2.1) mabi=lp64/mabi=ilp32/mabi=purecap 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))))