Re: [PATCH,v2] Only add '-fwrapv' to gcc CFLAGS for gcc 4.2 and later

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Saturday 18 July 2009, Sam Ravnborg wrote:
> > I based my patch on arch/x86/Makefile:
> > 35:        KBUILD_CFLAGS += $(shell if [ $(call cc-version) -lt 0400 ] ; then \
> > 36:                echo $(call cc-option,-fno-unit-at-a-time); fi ;)
> >
> > Guess that could be improved to use cc-ifversion then.
>
> Yes, please...

I've got patches for x86, ia64, powerpc and um, but have a couple of
questions before I submit them.

Can the patches go through your kbuild tree or should they go through the
arch trees (they will be CCed of course)?

In my patches I've left the cc-option check where it existed, so for x86
you get (tested to work):
-        KBUILD_CFLAGS += $(shell if [ $(call cc-version) -lt 0400 ] ; then \
-                echo $(call cc-option,-fno-unit-at-a-time); fi ;)
+        KBUILD_CFLAGS += $(call cc-ifversion, -lt, 0400, \
+                               $(call cc-option,-fno-unit-at-a-time))

Or is it safe to simplify that to just:
+        KBUILD_CFLAGS += $(call cc-ifversion, -lt, 0400, -fno-unit-at-a-time)
?

> > And a quick git grep gives a few other potential candidates:
> > arch/parisc/Makefile:129:       @if test "$(call cc-version)" -lt "0303"; then \

I left this one unchanged as it does not add a compiler option; instead it
displays an "unsupported' message.
--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux