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] [day] [month] [year] [list]
Date:	Fri, 12 Oct 2007 19:53:08 +0200
From:	Sam Ravnborg <sam@...nborg.org>
To:	kbuild devel <kbuild-devel@...ts.sourceforge.net>,
	LKML <linux-kernel@...r.kernel.org>
Cc:	Andi Kleen <ak@...e.de>, Adrian Bunk <bunk@...nel.org>
Subject: Re: [PATCH v2] kbuild: save ARCH & CROSS_COMPILE when building a kernel

On Tue, Oct 09, 2007 at 09:49:19PM +0200, Sam Ravnborg wrote:
> When building a kernel for a different architecture
> kbuild requires the user always to specify ARCH and
> CROSS_COMPILE on the command-line.
> Failing to do so can result in strange build errros especially
> when the asm symlink point to anohter architecture than
> the one being build.
> The typical case is that the user forget to specify
> ARCH and/or CROSS_COMPILE on the commandline.
> 
> Address the above issues by saving ARCH and CROSS_COMPILE
> when building a kernel. The information is saved in a
> file named ".kbuild" which is not supposed to be manually
> edited and kbuild will overwrite it when a kernel is build.
> 
> If a kernel is build and no ARCH/CROSS_COMPILE info is saved
> then the current settings are saved.
> If ARCH/CROSS_COMPILE was saved then these value are used.
> If the user specified either ARCH and/or CROSS_COMPILE
> it is validated that they match the saved values and kbuild
> error out if this is not the case.

There quickly turned up two issues which this patch when
hitting -mm.
Issue 1) Adding the ARCH ?= caused all native builds
to loose their ARCH setting. I only tested this with
my suite of crosscompilers and not native.

Issue 2) When installing the kernel in a different
environment than where is was compiled turned up that
we even for a modules_install or headers_install call
gcc - and with CROSS_COMPILE set the gcc could not be
located and we printed an error message.

The latter issue require some more involved refactoring
of the top-level Makefile and is thus not ready until next
merge window.
The patch will be withdrawn for now and I hope to have
the top-level Makefile refactored until next merge window.

The prime reason for the refactoring is to remove the top-
level Makefile from the 3xun list.
3xun = Unreadable, unhackable, unmaintainable

Introducing said patch afterwoard is just a nice bonus.

	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