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: <20090907130402.GB1595@ucw.cz>
Date:	Mon, 7 Sep 2009 15:09:04 +0200
From:	Pavel Machek <pavel@....cz>
To:	Roland McGrath <roland@...hat.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Sam Ravnborg <sam@...nborg.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] kconfig CROSS_COMPILE option

Hi!

> This adds CROSS_COMPILE as a kconfig string so you can store it in .config.
> Then you can use plain "make" in the configured kernel build directory to
> do the right cross compilation without setting the command-line or
> environment variable every time.
> 
> With this, you can set up different build directories for different kernel
> configurations, whether native or cross-builds, and then use the simple:
> 	make -C /build/dir M=module-source-dir
> idiom to build modules for any given target kernel, indicating which one
> by nothing but the build directory chosen.
> 
> I tried a version that defaults the string with env="CROSS_COMPILE" so that
> in a "make oldconfig" with CROSS_COMPILE in the environment you can just
> hit return to store the way you're building it.  But the kconfig prompt for
> strings doesn't give you any way to say you want an empty string instead of
> the default, so I punted that.

Yes that would be very nice. Editing Makefile every time I
crosscomppile for arm sucks.

But... do we need an option for subarch, too? And will Kconfig system
handle that?
									Pavel

>  # Alternatively CROSS_COMPILE can be set in the environment.
> +# A third alternative is to store a setting in .config so that plain
> +# "make" in the configured kernel build directory always uses that.
>  # Default value for CROSS_COMPILE is not to prefix executables
>  # Note: Some architectures assign CROSS_COMPILE in their arch/*/Makefile
>  export KBUILD_BUILDHOST := $(SUBARCH)
>  ARCH		?= $(SUBARCH)
> -CROSS_COMPILE	?=
> +CROSS_COMPILE	?= $(CONFIG_CROSS_COMPILE:"%"=%)
>  
>  # Architecture as present in compile.h
>  UTS_MACHINE 	:= $(ARCH)
> diff --git a/init/Kconfig b/init/Kconfig
> index 3f7e609..452080d 100644

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
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