lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130401121218.GA4409@merkur.ravnborg.org>
Date:	Mon, 1 Apr 2013 14:12:18 +0200
From:	Sam Ravnborg <sam@...nborg.org>
To:	Vineet Gupta <Vineet.Gupta1@...opsys.com>
Cc:	"linux-kbuild@...r.kernel.org" <linux-kbuild@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-arch@...r.kernel.org" <linux-arch@...r.kernel.org>,
	Alexey Brodkin <Alexey.Brodkin@...opsys.com>
Subject: Re: host gcc 4.7 warning when generating defconfig

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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ