From ae7dd927e2978cee89d6828b31ab991aa6de40e2 Mon Sep 17 00:00:00 2001 From: Ciro Santilli Date: Wed, 15 Jan 2020 16:11:30 +0000 Subject: [PATCH] scons: fix --gold-linker build after --as-needed The build was failing with: /usr/bin/ld: unrecognized option '--as-needed -fuse-ld=gold' and --verbose confirms that a single quoted CLI parameter was being executed: "-Wl,--as-needed -fuse-ld=gold" This happened because at Ifb001786a66b0dd9b29865e39a5740313002f250 --as-needed was added, and because it is the second option to happen before the following main.subst, it exposed the fact that the existing main.subst was wrong, because it returns a string instead of the expected array. Change-Id: I619d242d60fe9d27438638ac11c2b92512881f26 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/24624 Reviewed-by: Jason Lowe-Power Reviewed-by: Gabe Black Maintainer: Jason Lowe-Power Maintainer: Gabe Black Tested-by: kokoro --- SConstruct | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SConstruct b/SConstruct index d84b91284..f37822763 100755 --- a/SConstruct +++ b/SConstruct @@ -1,6 +1,6 @@ # -*- mode:python -*- -# Copyright (c) 2013, 2015-2019 ARM Limited +# Copyright (c) 2013, 2015-2020 ARM Limited # All rights reserved. # # The license below extends only to copyright in the software and shall @@ -377,7 +377,7 @@ if main['GCC'] or main['CLANG']: main['PSHLINKFLAGS'] = main.subst('${FILTER_PSHLINKFLAGS(SHLINKFLAGS)}') if GetOption('gold_linker'): main.Append(LINKFLAGS='-fuse-ld=gold') - main['PLINKFLAGS'] = main.subst('${LINKFLAGS}') + main['PLINKFLAGS'] = main.get('LINKFLAGS') shared_partial_flags = ['-r', '-nostdlib'] main.Append(PSHLINKFLAGS=shared_partial_flags) main.Append(PLINKFLAGS=shared_partial_flags) -- 2.30.2