From mboxrd@z Thu Jan 1 00:00:00 1970 From: Doug Goldstein Subject: Re: [PATCH for-4.7] xen/build: Fix build with Clang Date: Thu, 7 Apr 2016 15:55:50 -0500 Message-ID: <5706C956.2060204@cardoe.com> References: <1460054805-2393-1-git-send-email-andrew.cooper3@citrix.com> <5706BF3602000078000E600C@prv-mh.provo.novell.com> <5706B202.40004@citrix.com> <5706C15802000078000E6017@prv-mh.provo.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7065256772851912949==" Return-path: In-Reply-To: <5706C15802000078000E6017@prv-mh.provo.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" To: Jan Beulich , Andrew Cooper Cc: Wei Liu , Xen-devel List-Id: xen-devel@lists.xenproject.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --===============7065256772851912949== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="vCTBNe3Wrnen259IXA9am4bwAKuqsi1AB" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --vCTBNe3Wrnen259IXA9am4bwAKuqsi1AB Content-Type: multipart/mixed; boundary="57FITFFTch1Sx0SAEt0Pw2GFk94jjOMUS" From: Doug Goldstein To: Jan Beulich , Andrew Cooper Cc: Wei Liu , Xen-devel Message-ID: <5706C956.2060204@cardoe.com> Subject: Re: [Xen-devel] [PATCH for-4.7] xen/build: Fix build with Clang References: <1460054805-2393-1-git-send-email-andrew.cooper3@citrix.com> <5706BF3602000078000E600C@prv-mh.provo.novell.com> <5706B202.40004@citrix.com> <5706C15802000078000E6017@prv-mh.provo.novell.com> In-Reply-To: <5706C15802000078000E6017@prv-mh.provo.novell.com> --57FITFFTch1Sx0SAEt0Pw2GFk94jjOMUS Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 4/7/16 2:21 PM, Jan Beulich wrote: >>>> On 07.04.16 at 21:16, wrote: >> On 07/04/16 20:12, Jan Beulich wrote: >>>>>> On 07.04.16 at 20:46, wrote: >>>> --- a/xen/Rules.mk >>>> +++ b/xen/Rules.mk >>>> @@ -50,9 +50,15 @@ ALL_OBJS-$(CONFIG_X86) +=3D $(BASEDIR)/crypto/b= uilt_in.o >>>> CFLAGS +=3D -nostdinc -fno-builtin -fno-common >>>> CFLAGS +=3D -Werror -Wredundant-decls -Wno-pointer-arith >>>> CFLAGS +=3D -pipe -g -D__XEN__ -include $(BASEDIR)/include/xen/conf= ig.h >>>> -CFLAGS +=3D -Wa,--strip-local-absolute >>>> CFLAGS +=3D '-D__OBJECT_FILE__=3D"$@"' >>>> =20 >>>> +ifneq ($(clang),y) >>>> +# Clang doesn't understand this command line argument, and doesn't = appear to >>>> +# have an suitable alternative. The resulting compiled binary does= function, >>>> +# but has an excessively large symbol table. >>>> +CFLAGS +=3D -Wa,--strip-local-absolute >>>> +endif >>> Well, that's the brute force undo-it-altogether-for-clang approach >>> that I think Doug had also considered. You may have seen the >>> discussion (on irc iirc) - I'd really like to see the option still ge= tting >>> passed to gas (for all the .S files) even when using clang. Would >>> that really be hard to arrange for? >> >> That won't fix the fact that all the .c files which include >> cpufeatureset.h also gets the absolute symbols, to allow the >> alternatives() blocks to compile. >=20 > That's understood. >=20 >> It will complicate the clang build quite a bit, and won't make much of= a >> dent on the symbol table bloat. >=20 > While this I'm unclear about: Istr Doug mentioning that simply > adding the option in suitable for to AFLAGS would do. >=20 > Jan >=20 I was trying to do exactly what you mentioned where we still passed it to gas and didn't pass it to llvm but unfortunately at some point the flags get combined together and passed to llvm and fails. --=20 Doug Goldstein --57FITFFTch1Sx0SAEt0Pw2GFk94jjOMUS-- --vCTBNe3Wrnen259IXA9am4bwAKuqsi1AB Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0 iQJ8BAEBCgBmBQJXBslaXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRBNTM5MEQ2RTNFMTkyNzlCNzVDMzIwOTVB MkJDMDNEQzg3RUQxQkQ0AAoJEKK8A9yH7RvUkBkP/0+DBeNUHFv4a1tzqXAb/E5h Vb9ZWO0u4OiBUw6xodOBWfK18TcbLIkvN+RlHYP93SYpxVxPqf1hDZqWz8FoqYgt zqZ5NnQtuJKFuONia9iFVpETwN5Ym0Yeys+QfFyzlGR6T4yFn/8WT6oEEOEdDB2+ p4Rg5FvMzJjFvU6OrAD+zJ48mnbCQikEsVwfn8pjnA+MS5RdMO4RCiSNe4cI6N2y WhFfct4XrmBwTGEhHB0oUhaM1aDQBKzdlKN42h1eAOkI9pkD9x8MlYR8oSo1w6Nc lSdI2XKvRF9DaW7ycKtHsjtPtf3sjrSi0QICI5OZjWg7d1BHYk5MUI5RuSJ6sW1N nOMdWPygEKuQ1/5CKn4oBwagmTDEiL6erNrb5g4e8wTdRr97T+oD6z2AJpNUAdzh mUmQMiVNud4BXEI5iT4IVxPlS4pX0AJmL6fEvVsK8YUuCTHctvaUewXENnYWZATL KZdW8CQ45rHHaYdjdlUuUCQTimftjGVG00gjILUtrWmq8scgzVh8csxstmavL06N SBMe8q17HEWX+/7JV6v6MCrjbitHMFSV5B0s6SrrjHKgTurnChy7tReXpI4BX44T PNiJF/y87RxQk2d5oqm+WH9qwPGC21SXilQiiidnlJCc8Nyem0D8ugyUfirkOj+j U69UXv/9RrCXUKVsCfaM =jfIG -----END PGP SIGNATURE----- --vCTBNe3Wrnen259IXA9am4bwAKuqsi1AB-- --===============7065256772851912949== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwOi8vbGlzdHMueGVuLm9y Zy94ZW4tZGV2ZWwK --===============7065256772851912949==--