From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id 6CBAB5A0262 for ; Sat, 18 Mar 2023 06:02:58 +0100 (CET) Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4Pdply6swgz4xFY; Sat, 18 Mar 2023 16:02:54 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=201602; t=1679115774; bh=ajvgw4E+SSBhMSE4D/hz7rKN3Q6ut755X0Og+TjpNcs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=oqqdTuo562RVV4FTF5w/zhrlO/YAbwRrj9YqDNOR9M+iJpQtnJ/wBDZSDhCKZtL9E TlPorMwDahfeSLnyWZTSTXKqn+Mz7rIcReU0iFewNLrbm0A5uNtOA6rik3M1ehUki0 dyN0xT5Kuw3omwt0GE13wrgJGB/LkAVJ9jXdfCiU= Date: Sat, 18 Mar 2023 13:01:16 +1100 From: David Gibson To: Stefano Brivio Subject: Re: [PATCH] Makefile: Enable external override for TARGET Message-ID: References: <20230315091400.3767149-1-sbrivio@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Osa0pJzUnmx0Bo33" Content-Disposition: inline In-Reply-To: <20230315091400.3767149-1-sbrivio@redhat.com> Message-ID-Hash: EDBJ7RYDAS3MRFUJALJLQYKGLB5ZJXPD X-Message-ID-Hash: EDBJ7RYDAS3MRFUJALJLQYKGLB5ZJXPD X-MailFrom: dgibson@gandalf.ozlabs.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: passt-dev@passt.top X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: --Osa0pJzUnmx0Bo33 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Mar 15, 2023 at 10:14:00AM +0100, Stefano Brivio wrote: > A cross-architecture build might pass a target-specific CC on 'make', > and not on 'make install', and this is what happens in Debian > cross-qa tests. >=20 > Given that we select binaries to be installed depending on the target > architecture, this means we would build AVX2 binaries in any case on > a x86_64 build machine. >=20 > By overriding TARGET in package build rules, we can tell the Makefile > about the target architecture, also for the 'install' (Makefile) > target. >=20 > Signed-off-by: Stefano Brivio Reviewed-by: David Gibson > --- > Makefile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/Makefile b/Makefile > index 6f8bd81..0dd1057 100644 > --- a/Makefile > +++ b/Makefile > @@ -20,7 +20,7 @@ ifeq ($(RLIMIT_STACK_VAL),unlimited) > RLIMIT_STACK_VAL :=3D 1024 > endif > =20 > -TARGET :=3D $(shell $(CC) -dumpmachine) > +TARGET ?=3D $(shell $(CC) -dumpmachine) > # Get 'uname -m'-like architecture description for target > TARGET_ARCH :=3D $(shell echo $(TARGET) | cut -f1 -d- | tr [A-Z] [a-z]) > TARGET_ARCH :=3D $(shell echo $(TARGET_ARCH) | sed 's/powerpc/ppc/') --=20 David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson --Osa0pJzUnmx0Bo33 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmQVG2UACgkQzQJF27ox 2GecbhAAjV+lFdj4YEBZJzxniBjoUPu1MmHOBRV8XrJx+Huorq3xnTwU4/B1OTbm CN4If1LernqlfZLHYbQ9eyNVuF1OYzhd5ERUJivnAc+H+KE6mvjR5NHu3telzdIr sldxgRcUZx192w1S95ufUp9jVyT94PUJMS4z35wpklZWjU0zHHy94Rrccozs7/1+ 3AmX1dBQJ7PlEj1QTzUFz7WaSTL1BTE/iL3v/LEO3fLLrkFAUrjJT22qXKS5hp2u YS7SpJpiVZJu3lpkRv7G099Xt2zyAZLYmTn5i6zmyOAFG9elkQNPADjLAmZzNb8a 4jAkAqaooAoALRtclkvJMwck1bPh5eFPsVesPNsJ1NzSp8e84+Ls/cwOFLSgzaFw mY69ckD0VUGgybjP4GNdpo4FEe0hkaJAHb/T0ERxcqjsqtvwmkzAqqfyG7lu2SFl sme1tiKdbYSj1oKh9geD1WedjPuTCUbL+/kdPVTfbBUmhMIHWjCoOWv5cWnKTgLq ujGHz7ulIEuKUX8rKABVuw41O6cl5eNVMPE0FX+30hSgGfPMwVxByUeBQbH7Hn2g QNm7XdUnzi7jqgP98IhVi2gTH+D1FrBjJrExVwBdOL8NCcoViu+mtSwNOLwdh8Cs zYUUXu2UfhTmXpDclukJ36zxlj/zTpllYgsQOvn25Wqn6kLMeWc= =xeeS -----END PGP SIGNATURE----- --Osa0pJzUnmx0Bo33--