lkml.org 
[lkml]   [2009]   [Sep]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] kconfig CROSS_COMPILE option
On Mon, 7 Sep 2009, Roland McGrath wrote:
> > Yes that would be very nice. Editing Makefile every time I
> > crosscomppile for arm sucks.
>
> The other trick I can recommend is to write a GNUmakefile containing:
>
> ARCH=foo
> CROSS_COMPILE=foo-linux-
> include Makefile

Woow, that's shorter than mine :-)

--------------------------------------------------------------------------------

MAKEARGS = ARCH=powerpc CROSS_COMPILE=ppu- CC="ppu-gcc43 -m32 -mcpu=440"

MAKEFLAGS += --no-print-directory

.PHONY: all $(MAKECMDGOALS)

all := $(filter-out all Makefile,$(MAKECMDGOALS))

all:
$(MAKE) $(MAKEARGS) $(all) -f Makefile

Makefile:;

$(all) %/: all
@:

--------------------------------------------------------------------------------

Note that in this example I also have to override CC, as (1) ppu-gcc is gcc
version 4.1.1, i.e. too old and (2) ppu-gcc43 defaults to -m64 and -mcpu=cell.

> (GNU make reads GNUmakefile in preference to Makefile.)
> But this manual hackery is still not nearly as nice as the automagic way.

Indeed, putting everything in .config would be more convenient.

With kind regards,

Geert Uytterhoeven
Software Architect
Techsoft Centre

Technology and Software Centre Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium

Phone: +32 (0)2 700 8453
Fax: +32 (0)2 700 8622
E-mail: Geert.Uytterhoeven@sonycom.com
Internet: http://www.sony-europe.com/

A division of Sony Europe (Belgium) N.V.
VAT BE 0413.825.160 · RPR Brussels
Fortis · BIC GEBABEBB · IBAN BE41293037680010
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2009-09-09 15:23    [W:0.049 / U:1.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site