Messages in this thread | | | Date | Thu, 24 Dec 1998 13:38:21 -0600 | From | Michael Elizabeth Chastain <> | Subject | Re: linux-kernel-digest V1 #3051 |
| |
Hi Pierfrancesco,
> But I still have to edit it to change the compiler to use egcc. > Would it be possible to define a single variable to choose the > compiler, so that I can pass a value on the command line?
It's possible to reduce it to two variables, but not one.
The host compiler and the target compiler must be kept separate so that cross-compiling works. Consider someone on an i386 who is building a kernel for an alpha machine. They need HOSTCC to compile helper programs like scripts/mkdep.c, and CC to compile the main body of the code.
Try something like this:
HOSTCC =egcc HOSTCFLAGS =-Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
TARGETCC =egcc TARGETCFLAGS =-D__KERNEL__ -I$(HPATH)
CROSS_COMPILE = AS =$(CROSS_COMPILE)as LD =$(CROSS_COMPILE)ld CC =$(CROSS_COMPILE)$(TARGETCC) $(TARGETCFLAGS) CPP =$(CC) -E
If that works for you, mail me a patch, and I'll test it myself and submit it to Alan Cox.
Michael Elizabeth Chastain <mailto:mec@shout.net> "love without fear"
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |