Re: cc-version not available to change EXTRA_CFLAGS

Sam Ravnborg
2006-01-21T22:13:03Z

On Sat, Jan 21, 2006 at 07:08:05PM +0100, Olaf Hering wrote:
>
> I want to add a gcc version check for reiserfs, on akpms request.
> This one doesnt work with 2.6.16rc1, havent checked if it ever worked.
...
> Index: linux-2.6.16-rc1-olh/fs/reiserfs/Makefile
> ===================================================================
> --- linux-2.6.16-rc1-olh.orig/fs/reiserfs/Makefile
> +++ linux-2.6.16-rc1-olh/fs/reiserfs/Makefile
> @@ -28,7 +28,7 @@ endif
> # will work around it. If any other architecture displays this behavior,
> # add it here.
> 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 ;)
> endif

cc-option is only available from main Makefile as of today.
I can try to move them to Kbuild.include - that should fix this usecase.

Sam