Re: cc-version not available to change EXTRA_CFLAGS

From: Olaf Hering
Date: Sat Jan 21 2006 - 18:17:43 EST


On Sat, Jan 21, Sam Ravnborg wrote:

> Let me know if this works for you.

Works perfect, beside this minor glitch.

Warning: trailing whitespace in line 1067 of
Documentation/kbuild/makefiles.txt

> > ifeq ($(CONFIG_PPC32),y)
> > -EXTRA_CFLAGS := -O1
> > +EXTRA_CFLAGS := $(shell set -x ; if [ $(call cc-version) -lt 0402 ] ; then echo $(call cc-option,-O1); fi ;)
>
> For -O1 I do not see the point in using $(call cc-option ...).
> I assume all gcc version does support -O1 - or?

this was just c&p during debug, from another file.

> + Example:
> + #fs/reiserfs/Makefile
> + EXTRA_CFLAGS := $(call cc-ifversion, -lt, 0402, -O1)
> +
> + In this example EXTRA_CFLAGS will be assigned the value -O1 if the
> + $(CC) version is less than 4.2.

I meant 4.0.2 as shipped with SuSE 10.0, but thats ok. I think the buggy
version was 3.2, as we have not seen in with gcc 3.3-hammer in SLES9.
Will you include the reiserfs change with a check for earlier then 4.0
or 4.1 or should I send a separate patch?

--
short story of a lazy sysadmin:
alias appserv=wotan
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/