Hi,
I got into several issues while trying to cross-compile a Linux 2.6 PPC
kernel from a Solaris 2.8 host (beside getting a valid cross compilation
chain). Mainly some programs compiled on the host are not planned to be
compiled on anything but Linux (The host has to run Linux).
While I understand that it makes more sense to use Linux to (cross)
compile Linux, there are case/companies where this is not (yet) an
option.
So here are few minor modifications (against 2.6.7 from kernel.org) I
had to do to get things going. I guess all of these are not PPC
specific. It just happens I am working with PPC targets.
Regards
JC
Hi,
I got into several issues while trying to cross-compile a Linux 2.6 PPC
kernel from a Solaris 2.8 host (beside getting a valid cross compilation
chain). Mainly some programs compiled on the host are not planned to be
compiled on anything but Linux (The host has to run Linux).
All of the things you've changed look wrong to me.
Most of your changes are taking out <stdint.h>, which is not correct.
This header should be on any system, it is part of the C standard. Even
the getopt changes shouldn't be required, you should be using the
version of getopt that came with your package.
Are you sure that you've specified -nostdinc -nostdlib and given the
proper list of locations for the cross-compile system includes when
compiling?
-Bret
--
Bret Indrelee QLogic Corporation
Bret.Indrelee@qlogic.com 6321 Bury Drive, St 13, Eden Prairie, MN 55346
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
All of the things you've changed look wrong to me.
Most of your changes are taking out <stdint.h>, which is not correct.
This header should be on any system, it is part of the C standard.
Sorry but stdint.h is not present on my Solaris 2.8 system. There is
little I can do about this. So maybe Solaris doesn't respect the
standard somewhere but ...
Even
the getopt changes shouldn't be required, you should be using the
version of getopt that came with your package.
Same here getopt.h is not part of solaris headers. Solaris does not seem
to support getopt_long() and getopt() prototype is part of stdio.h,
stdlib.h or unistd.h. But no getopt.h on the horizon ... Should use one
of the other mentioned files.
Are you sure that you've specified -nostdinc -nostdlib and given the
proper list of locations for the cross-compile system includes when
compiling?
For what I understand these programs (the ones build from the source I
modified) should not be cross-compiled but build for the host platform
(here Solaris) with the native compiler. Am I wrong?
Oh and I didn't specify any particular -nostdinc -nostdlib flag
anywhere. I am just using the standard Linux 2.6.7 Makefile. The command
used is:
make ARCH=ppc CROSS_COMPILE=powerpc-7400-linux-gnu-
JC
On Tue, 2004-07-06 at 15:47, Jean-Christophe Dubois wrote:
Sorry but stdint.h is not present on my Solaris 2.8 system. There is
little I can do about this. So maybe Solaris doesn't respect the
standard somewhere but ...
Even
the getopt changes shouldn't be required, you should be using the
version of getopt that came with your package.
Same here getopt.h is not part of solaris headers. Solaris does not seem
to support getopt_long() and getopt() prototype is part of stdio.h,
stdlib.h or unistd.h. But no getopt.h on the horizon ... Should use one
of the other mentioned files.
getopt_long() is not part of any IEEE standard (AFAIK) and getopt.h is
not part of IEEE Std 1003.1-2001-conforming systems. This seems to be
very GNU specific and not part of Solaris base system (so far).
http://www.opengroup.org/onlinepubs/009695399/functions/getopt.html
quoted
Are you sure that you've specified -nostdinc -nostdlib and given the
proper list of locations for the cross-compile system includes when
compiling?
For what I understand these programs (the ones build from the source I
modified) should not be cross-compiled but build for the host platform
(here Solaris) with the native compiler. Am I wrong?
Oh and I didn't specify any particular -nostdinc -nostdlib flag
anywhere. I am just using the standard Linux 2.6.7 Makefile. The command
used is:
make ARCH=ppc CROSS_COMPILE=powerpc-7400-linux-gnu-
JC
quoted
-Bret
--
Jean-Christophe Dubois [off-list ref]
Mercury Computer Systems
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Hello,
I rewrote my patches to be a little more well behaved in regards to non
linux systems.
Any feedback is welcome. Once again this is just to enable Solaris 2.8
(and others?) to be a valid host to cross-compile the 2.6 Linux Kernel
(for PPC).
Regards
JC
On Tue, 2004-07-06 at 16:57, Jean-Christophe Dubois wrote:
On Tue, 2004-07-06 at 15:47, Jean-Christophe Dubois wrote:
quoted
Sorry but stdint.h is not present on my Solaris 2.8 system. There is
little I can do about this. So maybe Solaris doesn't respect the
standard somewhere but ...
Even
the getopt changes shouldn't be required, you should be using the
version of getopt that came with your package.
Same here getopt.h is not part of solaris headers. Solaris does not seem
to support getopt_long() and getopt() prototype is part of stdio.h,
stdlib.h or unistd.h. But no getopt.h on the horizon ... Should use one
of the other mentioned files.
getopt_long() is not part of any IEEE standard (AFAIK) and getopt.h is
not part of IEEE Std 1003.1-2001-conforming systems. This seems to be
very GNU specific and not part of Solaris base system (so far).
http://www.opengroup.org/onlinepubs/009695399/functions/getopt.html
quoted
quoted
Are you sure that you've specified -nostdinc -nostdlib and given the
proper list of locations for the cross-compile system includes when
compiling?
For what I understand these programs (the ones build from the source I
modified) should not be cross-compiled but build for the host platform
(here Solaris) with the native compiler. Am I wrong?
Oh and I didn't specify any particular -nostdinc -nostdlib flag
anywhere. I am just using the standard Linux 2.6.7 Makefile. The command
used is:
make ARCH=ppc CROSS_COMPILE=powerpc-7400-linux-gnu-
JC
quoted
-Bret
--
Jean-Christophe Dubois [off-list ref]
Mercury Computer Systems
On Tue, Jul 06, 2004 at 11:20:51AM +0200, Jean-Christophe Dubois wrote:
I got into several issues while trying to cross-compile a Linux 2.6 PPC
kernel from a Solaris 2.8 host (beside getting a valid cross compilation
chain). Mainly some programs compiled on the host are not planned to be
compiled on anything but Linux (The host has to run Linux).
@@ -49,10 +49,12 @@ /* size of read buffer */ #define SIZE 0x1000+#ifdef __linux__ /* typedef long int32_t; */ typedef unsigned long uint32_t; typedef unsigned short uint16_t; typedef unsigned char uint8_t;+#endif /* PPCBUG ROM boot header */ typedef struct bug_boot_header {
This, and possibly the rest, should probably be #ifndef __sun__. Or at
least mkbugboot.c is OK with that on cygwin (haven't heard of a 2.6 compile
on cygwin yet so I can't say for certain if the other two are OK there).
I'll change and push up. Thanks.
--
Tom Rini
http://gate.crashing.org/~trini/
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
On Thu, Jul 08, 2004 at 11:35:31AM +0200, Jean-Christophe Dubois wrote:
Hello,
I rewrote my patches to be a little more well behaved in regards to non
linux systems.
Any feedback is welcome. Once again this is just to enable Solaris 2.8
(and others?) to be a valid host to cross-compile the 2.6 Linux Kernel
(for PPC).