[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [RFC 2/7] WIP: Compilation with ARM DS-6 compiler
Hi Jan, Sorry for delayed reply On Thu, 2019-11-07 at 08:31 +0100, Jan Beulich wrote: > On 06.11.2019 23:08, Artem Mygaiev wrote: > > On Wed, Nov 6, 2019 at 4:28 PM Jan Beulich < > > jbeulich@xxxxxxxx > > > wrote: > > > On 06.11.2019 10:19, Andrii Anisov wrote: > > > > --- a/Config.mk > > > > +++ b/Config.mk > > > > @@ -221,7 +221,9 @@ CFLAGS += -Wall -Wstrict-prototypes > > > > > > > > $(call cc-option-add,HOSTCFLAGS,HOSTCC,-Wdeclaration-after- > > > > statement) > > > > $(call cc-option-add,CFLAGS,CC,-Wdeclaration-after-statement) > > > > +ifneq ($(armds),y) > > > > $(call cc-option-add,CFLAGS,CC,-Wno-unused-but-set-variable) > > > > +endif > > > > $(call cc-option-add,CFLAGS,CC,-Wno-unused-local-typedefs) > > > > > > > > LDFLAGS += $(foreach i, $(EXTRA_LIB), -L$(i)) > > > > > > ... this would be necessary. > > > > I am very sorry, this patch does not have a proper description > > indeed. > > > > For this particular change - arm clang does not undestand > > -Wno-unused-but-set-variable > > option at all, that is why it is under !$(armds) > > But avoiding to add options which the compiler doesn't understand > is the purpose of using cc-option-add, rather than blindly > adding > them to CFLAGS. What am I missing here? You are right, the script shall check the compiler option and avoid including it to CFLAGS. But armclang require '--target=...' to be specified in order to operate properly, and the proper fix shall be something like this (instead of 'ifneq' hack above): diff --git a/Config.mk b/Config.mk index 01487a7..abe8e44 100644 --- a/Config.mk +++ b/Config.mk @@ -107,7 +107,7 @@ cc-option = $(shell if test -z "`echo 'void*p=1;' | \ # Usage: $(call cc-option-add CFLAGS,CC,-march=winchip-c6) cc-option-add = $(eval $(call cc-option-add-closure,$(1),$(2),$(3))) define cc-option-add-closure - ifneq ($$(call cc-option,$$($(2)),$(3),n),n) + ifneq ($$(call cc-option,$$($(2) $(1)),$(3),n),n) $(1) += $(3) endif endef so that CFLAGS that are already defined and include '--target=...' option from config/arm*.mk are passed to compiler to make it happy. I am not sure if this breaks anything else so decided to go with ugly 'ifneq' hack and check how this can be solved later on. > Jan > > _______________________________________________ > Xen-devel mailing list > Xen-devel@xxxxxxxxxxxxxxxxxxxx > > https://urldefense.com/v3/__https://lists.xenproject.org/mailman/listinfo/xen-devel__;!K6dmGCEab4ueJg!mfAKUfGDnRPgNHksMlffaLrptu7demkLHApa3STsHRSKyoHnusYbCLzhLjD8K_vpFw$ > _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |