host gcc 4.7 warning when generating defconfig
Subsystems (3)
Hi,
We do cross compile builds for ARC Linux. To avoid the env var set, we have a defconfig entry for CONFIG_CROSS_COMPILE.
This worked fine so far (host gcc 4.4 i.e.). When switched to a new host distro (gcc 4.7), a defconfig build spews out the warning.
------------------->8-------------------------- mymake defconfig
gcc: error: unrecognized command line option '-marc600'
gcc: error: unrecognized command line option '-mA7'
gcc: error: unrecognized command line option '-mno-sdata'
gcc: error: unrecognized command line option '-mno-mpy' *** Default configuration is based on 'fpga_defconfig' #
# configuration written to .config ------------------->8--------------------------
While the following trivial fix seems to fix this, it seems that the spew is coming due to LIBGCC definition line, which is strange to be called for defconfig generation. Any thoughts ?
---------------->
arch/arc/Makefile +4 -0
@@ -8,6 +8,10 @@ UTS_MACHINE := arc +ifeq ($(CROSS_COMPILE),) +#CROSS_COMPILE := arc-elf32- +endif + KBUILD_DEFCONFIG := fpga_defconfig
Thx,
-Vineet
Quoted 28 lines · Vineet Gupta
Hi,
We do cross compile builds for ARC Linux. To avoid the env var set, we have a defconfig entry for
CONFIG_CROSS_COMPILE.
This worked fine so far (host gcc 4.4 i.e.). When switched to a new host distro (gcc 4.7), a defconfig build spews out the warning.------------------->8-------------------------- mymake defconfig
gcc: error: unrecognized command line option '-marc600'
gcc: error: unrecognized command line option '-mA7'
gcc: error: unrecognized command line option '-mno-sdata'
gcc: error: unrecognized command line option '-mno-mpy' *** Default configuration is based on 'fpga_defconfig' ## configuration written to .config ------------------->8--------------------------While the following trivial fix seems to fix this, it seems that the spew is coming due to LIBGCC definition line, which is strange to be called for defconfig generation. Any thoughts ?
---------------->
arch/arc/Makefile +0
-0
arch/arc/Makefile line 15
Quoted 8 lines
arch/arc/Makefile +4
-0@@ -8,6 +8,10 @@ UTS_MACHINE := arc +ifeq ($(CROSS_COMPILE),) +#CROSS_COMPILE := arc-elf32- +endif + KBUILD_DEFCONFIG := fpga_defconfig
You could try to use LIBGCC = $(shell ... for assignment. Use "=" and not ":=".
Like this:
-LIBGCC := $(shell $(CC) $(ARC_LIBGCC) $(cflags-y) --print-libgcc-file-name) +LIBGCC = $(shell $(CC) $(ARC_LIBGCC) $(cflags-y) --print-libgcc-file-name)
This would defer the evaluation until we actually reference the variable, and thus I think it will not trigger for a defconfig build.
I could not reproduce the problem here so I am not sure this has any effect though...
Sam
Hi Sam,
Quoted 47 lines · Sam Ravnborg
Quoted 28 lines · Vineet Gupta
Hi,
We do cross compile builds for ARC Linux. To avoid the env var set, we have a defconfig entry for
CONFIG_CROSS_COMPILE.
This worked fine so far (host gcc 4.4 i.e.). When switched to a new host distro (gcc 4.7), a defconfig build spews out the warning.------------------->8-------------------------- mymake defconfig
gcc: error: unrecognized command line option '-marc600'
gcc: error: unrecognized command line option '-mA7'
gcc: error: unrecognized command line option '-mno-sdata'
gcc: error: unrecognized command line option '-mno-mpy' *** Default configuration is based on 'fpga_defconfig' ## configuration written to .config ------------------->8--------------------------While the following trivial fix seems to fix this, it seems that the spew is coming due to LIBGCC definition line, which is strange to be called for defconfig generation. Any thoughts ?
---------------->
arch/arc/Makefile +0
-0arch/arc/Makefile line 15
Quoted 8 lines
arch/arc/Makefile +4
-0@@ -8,6 +8,10 @@ UTS_MACHINE := arc +ifeq ($(CROSS_COMPILE),) +#CROSS_COMPILE := arc-elf32- +endif + KBUILD_DEFCONFIG := fpga_defconfigYou could try to use LIBGCC = $(shell ... for assignment. Use "=" and not ":=".
Like this:
(quoted diff) +1
-1-LIBGCC := $(shell $(CC) $(ARC_LIBGCC) $(cflags-y) --print-libgcc-file-name) +LIBGCC = $(shell $(CC) $(ARC_LIBGCC) $(cflags-y) --print-libgcc-file-name)
Quoted 4 lines
This would defer the evaluation until we actually reference the variable, and thus I think it will not trigger for a defconfig build.
I could not reproduce the problem here so I am not sure this has any effect though...
Indeed the defconfig is fixed with your suggestion. However make ARCH=arc {clean,distclean} still show the same spew !
Thx,
-Vineet