All of lore.kernel.org
 help / color / mirror / Atom feed
From: Doug Goldstein <cardoe@cardoe.com>
To: Jan Beulich <JBeulich@suse.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>, Xen-devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH for-4.7] xen/build: Fix build with Clang
Date: Thu, 7 Apr 2016 15:55:50 -0500	[thread overview]
Message-ID: <5706C956.2060204@cardoe.com> (raw)
In-Reply-To: <5706C15802000078000E6017@prv-mh.provo.novell.com>


[-- Attachment #1.1.1: Type: text/plain, Size: 1945 bytes --]

On 4/7/16 2:21 PM, Jan Beulich wrote:
>>>> On 07.04.16 at 21:16, <andrew.cooper3@citrix.com> wrote:
>> On 07/04/16 20:12, Jan Beulich wrote:
>>>>>> On 07.04.16 at 20:46, <andrew.cooper3@citrix.com> wrote:
>>>> --- a/xen/Rules.mk
>>>> +++ b/xen/Rules.mk
>>>> @@ -50,9 +50,15 @@ ALL_OBJS-$(CONFIG_X86)   += $(BASEDIR)/crypto/built_in.o
>>>>  CFLAGS += -nostdinc -fno-builtin -fno-common
>>>>  CFLAGS += -Werror -Wredundant-decls -Wno-pointer-arith
>>>>  CFLAGS += -pipe -g -D__XEN__ -include $(BASEDIR)/include/xen/config.h
>>>> -CFLAGS += -Wa,--strip-local-absolute
>>>>  CFLAGS += '-D__OBJECT_FILE__="$@"'
>>>>  
>>>> +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 += -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 getting
>>> 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.
> 
> That's understood.
> 
>> It will complicate the clang build quite a bit, and won't make much of a
>> dent on the symbol table bloat.
> 
> While this I'm unclear about: Istr Doug mentioning that simply
> adding the option in suitable for to AFLAGS would do.
> 
> Jan
> 

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.

-- 
Doug Goldstein


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 959 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

      parent reply	other threads:[~2016-04-07 20:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-07 18:46 [PATCH for-4.7] xen/build: Fix build with Clang Andrew Cooper
2016-04-07 19:12 ` Jan Beulich
2016-04-07 19:16   ` Andrew Cooper
2016-04-07 19:21     ` Jan Beulich
2016-04-07 19:23       ` Andrew Cooper
2016-04-07 20:55       ` Doug Goldstein [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5706C956.2060204@cardoe.com \
    --to=cardoe@cardoe.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.