[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [XEN PATCH v3 15/23] xen/build: have the root Makefile generates the CFLAGS
On 26.02.2020 12:33, Anthony PERARD wrote: > @@ -113,6 +115,64 @@ $(KCONFIG_CONFIG): > include/config/%.conf include/config/%.conf.cmd: $(KCONFIG_CONFIG) > $(MAKE) -f $(BASEDIR)/tools/kconfig/Makefile.kconfig ARCH=$(ARCH) > SRCARCH=$(SRCARCH) HOSTCC="$(HOSTCC)" HOSTCXX="$(HOSTCXX)" syncconfig > > +ifeq ($(CONFIG_DEBUG),y) > +CFLAGS += -O1 > +else > +CFLAGS += -O2 > +endif > + > +ifeq ($(CONFIG_FRAME_POINTER),y) > +CFLAGS += -fno-omit-frame-pointer > +else > +CFLAGS += -fomit-frame-pointer > +endif > + > +CFLAGS += -nostdinc -fno-builtin -fno-common > +CFLAGS += -Werror -Wredundant-decls -Wno-pointer-arith > +$(call cc-option-add,CFLAGS,CC,-Wvla) > +CFLAGS += -pipe -D__XEN__ -include $(BASEDIR)/include/xen/config.h > +CFLAGS-$(CONFIG_DEBUG_INFO) += -g > + > +ifneq ($(CONFIG_CC_IS_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 > + > +AFLAGS += -D__ASSEMBLY__ > + > +CFLAGS += $(CFLAGS-y) I can't seem to be able to spot a similar line for AFLAGS. > @@ -107,7 +65,7 @@ $(foreach o,$(filter-out %/,$(obj-y) $(obj-bin-y) > $(extra-y)),$(eval $(call gend > subdir-y := $(subdir-y) $(filter %/, $(obj-y)) > obj-y := $(patsubst %/, %/built_in.o, $(obj-y)) > > -$(filter %.init.o,$(obj-y) $(obj-bin-y) $(extra-y)): CFLAGS += > -DINIT_SECTIONS_ONLY > +$(filter %.init.o,$(obj-y) $(obj-bin-y) $(extra-y)): CFLAGS-y += > -DINIT_SECTIONS_ONLY While in the description you say "We can't use CFLAGS in subdirectories to add flags to particular targets, ...", it remains unclear there why that is, and hence why changes like this one are necessary. If this is a restriction that's going to remain, this also needs writing down in a prominent place. After all if (for example) special compiler options are needed, CFLAGS would be the natural thing one would want to alter. (Even better if wrong playing with CFLAGS could be detected and at least warned about, but I'm completely unclear on how feasible this would be.) > diff --git a/xen/arch/arm/Rules.mk b/xen/arch/arm/Rules.mk > index 022a3a6f82ba..e69de29bb2d1 100644 > --- a/xen/arch/arm/Rules.mk > +++ b/xen/arch/arm/Rules.mk > @@ -1,93 +0,0 @@ As per the header here you're using git. Can you please arrange for this file movement (to arch.mk, and also for x86) to actually be expressed here as a rename, i.e. such that one can see what - if anything - changes? Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |