[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 01/12] xen: clang: Support correctly cross-compile
On Fri, 29 Mar 2019, Jan Beulich wrote: > >>> On 29.03.19 at 10:41, <julien.grall@xxxxxxx> wrote: > > On 28/03/2019 09:55, Jan Beulich wrote: > >>>>> On 27.03.19 at 19:45, <julien.grall@xxxxxxx> wrote: > >>> Clang uses "-target" option for cross-compilation. > >> > >>> --- a/config/StdGNU.mk > >>> +++ b/config/StdGNU.mk > >>> @@ -1,8 +1,13 @@ > >>> AS = $(CROSS_COMPILE)as > >>> LD = $(CROSS_COMPILE)ld > >>> ifeq ($(clang),y) > >>> -CC = $(CROSS_COMPILE)clang > >>> -CXX = $(CROSS_COMPILE)clang++ > >>> +ifneq ($(CROSS_COMPILE),) > >>> +CC = clang -target $(CROSS_COMPILE:-=) > >>> +CXX = clang++ -target $(CROSS_COMPILE:-=) > >> > >> Is dropping dashes from the variable uniformly correct? If so, > >> could you please clarify in the commit message why that is? > > The target option requires the following format: > > > > <arch><sub>-<vendor>-<sys>-<abi> > > > > In other places, we need the trailing dash as GNU tools are using the same > > format as above with a dash to separate the tool name. > > Oh, I'm sorry - I keep forgetting that the substitution form you > use only fiddles with trailing dashes. Of course I won't insist, but > I'd prefer the more obvious $(patsubst %-,%,$(CROSS_COMPILE)) > to be used instead, despite realizing that it's meaningfully longer. Either way to do variable manipulation is OK, but it would be good to add Julien's explanation of the -target expected format in the commit message. I don't have any other comments on this patch. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |