2003-05-19 19:40:38

by Jesse Barnes

[permalink] [raw]
Subject: [PATCH] pull $CROSS_COMPILE from env. if present

Simple patch to pull CROSS_COMPILE from the environment if it's
present, which makes it easier to compile the kernel with different
compiler versions and such.

Thanks,
Jesse


# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
# ChangeSet 1.1093 -> 1.1094
# Makefile 1.406 -> 1.407
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/05/19 [email protected] 1.1094
# make CROSS_COMPILE come from an env. variable if present
# --------------------------------------------
#
diff -Nru a/Makefile b/Makefile
--- a/Makefile Mon May 19 12:49:12 2003
+++ b/Makefile Mon May 19 12:49:12 2003
@@ -53,7 +53,7 @@
HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
HOSTCXXFLAGS = -O2

-CROSS_COMPILE =
+CROSS_COMPILE ?=

# That's our default target when none is given on the command line
# Note that 'modules' will be added as a prerequisite as well,


2003-05-19 21:46:20

by Sam Ravnborg

[permalink] [raw]
Subject: Re: [PATCH] pull $CROSS_COMPILE from env. if present

On Mon, May 19, 2003 at 12:53:33PM -0700, Jesse Barnes wrote:
> Simple patch to pull CROSS_COMPILE from the environment if it's
> present, which makes it easier to compile the kernel with different
> compiler versions and such.

I like it, but...

If we do it for CROSS_COMPILE we should do it for ARCH as well.
Something like
ifeq ($(origin ARCH), undefined)
ARCH := $(SUBARCH)
endif

And then group ARCH and CROSS_COMPILE togeher in the Makefile, and
provide a few meaningful comments.
I will test it tomorrow if you do not beat me in it.

Sam

2003-05-19 22:17:28

by Jesse Barnes

[permalink] [raw]
Subject: Re: [PATCH] pull $CROSS_COMPILE from env. if present

On Mon, May 19, 2003 at 11:59:17PM +0200, Sam Ravnborg wrote:
> On Mon, May 19, 2003 at 12:53:33PM -0700, Jesse Barnes wrote:
> > Simple patch to pull CROSS_COMPILE from the environment if it's
> > present, which makes it easier to compile the kernel with different
> > compiler versions and such.
>
> I like it, but...
>
> If we do it for CROSS_COMPILE we should do it for ARCH as well.
> Something like
> ifeq ($(origin ARCH), undefined)
> ARCH := $(SUBARCH)
> endif
>
> And then group ARCH and CROSS_COMPILE togeher in the Makefile, and
> provide a few meaningful comments.
> I will test it tomorrow if you do not beat me in it.

That's a good idea too, I used that awhile back when all my ia64
compiles were x86->ia64 cross-compiles...

Thanks,
Jesse