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]
Date:	Thu, 9 Jul 2015 16:09:35 -0700
From:	Behan Webster <behanw@...verseincode.com>
To:	Michal Marek <mmarek@...e.cz>
Cc:	Paul Cercueil <paul@...pouillou.net>, linux-kbuild@...r.kernel.org,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] Makefile: Fix detection of clang when cross-compiling

Resent since gmail HTML-ified my previous email...

On Wed, Apr 22, 2015 at 7:33 AM, Michal Marek <mmarek@...e.cz 
<mailto:mmarek@...e.cz>> wrote:

    On Fri, Apr 17, 2015 at 11:35:04PM +0200, Paul Cercueil wrote:
     > When the host's C compiler is clang, and when attempting to
     > cross-compile Linux e.g. to MIPS with mipsel-linux-gcc, the Makefile
     > would incorrectly detect the use of clang, which resulted in
     > clang-specific flags being passed to mipsel-linux-gcc.
     >
     > This can be verified under Debian by installing the "clang" package,
     > and then using it as the default compiler with:
     > sudo update-alternatives --config cc
     >
     > This patch moves the detection of clang after the $(CC) variable is
     > initialized to the name of the cross-compiler, so that the check
    applies
     > to the cross-compiler and not the host's C compiler.
     >
     > v2: Move the detection of clang after the inclusion of the
     > arch/*/Makefile (as they might set $(CROSS_COMPILE))
     >
     > Signed-off-by: Paul Cercueil <paul@...pouillou.net
    <mailto:paul@...pouillou.net>>

    Applied to kbuild.git#kbuild. I will push it after v4.1-rc1 becomes
    available, though.


Drat. I wish I saw this earlier.

This breaks patches which check for the value of COMPILER in 
arch/*/Makefile. This detection must be performed before the inclusion 
of the arch Makefile.

Can I move this to after the initialization of CC but before the include?

I'm not sure that being able to define the default compiler per arch is 
necessary. But I know I need to be able to add arch specific flags for 
clang.

Behan

-- 
Behan Webster
behanw@...verseincode.com <mailto:behanw@...verseincode.com>
--
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