linux-kbuild.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* host gcc 4.7 warning when generating defconfig
@ 2013-03-21  6:50 Vineet Gupta
  2013-04-01 12:12 ` Sam Ravnborg
  0 siblings, 1 reply; 3+ messages in thread
From: Vineet Gupta @ 2013-03-21  6:50 UTC (permalink / raw)
  To: linux-kbuild@vger.kernel.org
  Cc: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org,
	Sam Ravnborg, Alexey Brodkin

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 ?

---------------->
diff --git a/arch/arc/Makefile b/arch/arc/Makefile
index 4232d4e..97e6c20 100644
--- a/arch/arc/Makefile
+++ b/arch/arc/Makefile
@@ -8,6 +8,10 @@
 
 UTS_MACHINE := arc
 
+ifeq ($(CROSS_COMPILE),)
+#CROSS_COMPILE := arc-elf32-
+endif
+
 KBUILD_DEFCONFIG := fpga_defconfig

Thx,
-Vineet

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: host gcc 4.7 warning when generating defconfig
  2013-03-21  6:50 host gcc 4.7 warning when generating defconfig Vineet Gupta
@ 2013-04-01 12:12 ` Sam Ravnborg
  2013-04-01 12:28   ` Vineet Gupta
  0 siblings, 1 reply; 3+ messages in thread
From: Sam Ravnborg @ 2013-04-01 12:12 UTC (permalink / raw)
  To: Vineet Gupta
  Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arch@vger.kernel.org, Alexey Brodkin

On Thu, Mar 21, 2013 at 12:20:21PM +0530, Vineet Gupta wrote:
> 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 ?
> 
> ---------------->
> diff --git a/arch/arc/Makefile b/arch/arc/Makefile
> index 4232d4e..97e6c20 100644
> --- a/arch/arc/Makefile
> +++ b/arch/arc/Makefile
> @@ -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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: host gcc 4.7 warning when generating defconfig
  2013-04-01 12:12 ` Sam Ravnborg
@ 2013-04-01 12:28   ` Vineet Gupta
  0 siblings, 0 replies; 3+ messages in thread
From: Vineet Gupta @ 2013-04-01 12:28 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Vineet Gupta, linux-kbuild@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org,
	Alexey Brodkin

Hi Sam,

On 04/01/2013 05:42 PM, Sam Ravnborg wrote:
> On Thu, Mar 21, 2013 at 12:20:21PM +0530, Vineet Gupta wrote:
>> 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 ?
>>
>> ---------------->
>> diff --git a/arch/arc/Makefile b/arch/arc/Makefile
>> index 4232d4e..97e6c20 100644
>> --- a/arch/arc/Makefile
>> +++ b/arch/arc/Makefile
>> @@ -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...

Indeed the defconfig is fixed with your suggestion.
However make ARCH=arc {clean,distclean} still show the same spew !

Thx,
-Vineet

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-04-01 12:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-21  6:50 host gcc 4.7 warning when generating defconfig Vineet Gupta
2013-04-01 12:12 ` Sam Ravnborg
2013-04-01 12:28   ` Vineet Gupta

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).