Ian Jackson
2009-Jan-12 17:05 UTC
[Xen-devel] [PATCH] xen/Rules.mk: Do not dance about pointlessly with CFLAGS_tmp
It is usually better to use `='' in Makefiles than `:=''. The expansion rules for `:='' are simpler - so simple in fact that they don''t work if any part of the expansion depends on the source or target filenames. In this patch we remove the shuffling of the value of CFLAGS between := and = flavour variables. This was previously `necessary'' because otherwise it would run the seddery for removing -fomit-frame-pointer once for each rule. However this seddery is not actually necessary because there is plenty of other machinery for (a) only setting -fomit-frame-frame-pointer when applicable AND (b) passing -fno-omit-frame-pointer later on the command line if it''s not applicable. So we already have belt and braces and can remove the safety pins. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2009-Jan-12 18:55 UTC
Re: [Xen-devel] [PATCH] xen/Rules.mk: Do not dance about pointlessly with CFLAGS_tmp
On 12/01/2009 17:05, "Ian Jackson" <Ian.Jackson@eu.citrix.com> wrote:> It is usually better to use `='' in Makefiles than `:=''. The expansion > rules for `:='' are simpler - so simple in fact that they don''t work if > any part of the expansion depends on the source or target filenames. > > In this patch we remove the shuffling of the value of CFLAGS between > := and = flavour variables. This was previously `necessary'' because > otherwise it would run the seddery for removing -fomit-frame-pointer > once for each rule. > > However this seddery is not actually necessary because there is plenty > of other machinery for (a) only setting -fomit-frame-frame-pointer > when applicable AND (b) passing -fno-omit-frame-pointer later on the > command line if it''s not applicable. So we already have belt and > braces and can remove the safety pins.You missed a := in arch/x86/Rules.mk. Can that one be avoided so easily? -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2009-Jan-12 20:26 UTC
Re: [Xen-devel] [PATCH] xen/Rules.mk: Do not dance about pointlessly with CFLAGS_tmp
On 12/01/2009 18:55, "Keir Fraser" <keir.fraser@eu.citrix.com> wrote:>> However this seddery is not actually necessary because there is plenty >> of other machinery for (a) only setting -fomit-frame-frame-pointer >> when applicable AND (b) passing -fno-omit-frame-pointer later on the >> command line if it''s not applicable. So we already have belt and >> braces and can remove the safety pins. > > You missed a := in arch/x86/Rules.mk. Can that one be avoided so easily?Ah, well the answer is rather obviously yes. I''ll fix this one up myself and check it in. I''ll also adjust cc-option to run $(CC) immediately and add the resulting appropriate option correctly even to a recursively-expanded variable. So $(CC) execution is not delayed and does not occur multiple times even if CFLAGS is expanded multiple times. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Possibly Parallel Threads
- [PATCH] mk/efi: add -znoseparate-code to LD_FLAGS for EFI builds
- do_fileinfo / file.info test for file IS directory during package load pointlessly stresses NIS by getting username / group info
- Debugging the hypervisor
- ZAPtel channel dance
- Ports/source dance