This is a long mail, there are a few short questions below. Maybe you don't
need the extra info.
Hi,
I'm trying to get a working cross-development environment for arm-linux
kernel development. I'm getting close, but still not there. For building the
Arm cross compiler (from i686-linux host), I use the following files:
- gcc-2.95.tar.gz (GNU)
- gcc-2.95-2.95.1-diff.gz (GNU)
- gcc-2.95.1-2.95.2-diff.gz (GNU)
- gcc-2.95.2-diff-991022.gz (Chris) Does not apply cleanly:
Changelog.rej:
***************
*** 1,3 ****
Mon Aug 16 01:29:24 PDT 1999 Jeff Law ([EMAIL PROTECTED])
* gcc-2.95.1 Released.
--- 1,7 ----
+ 1999-09-10 Philip Blundell <[EMAIL PROTECTED]>
+
+ * config.guess, config.sub: Import from latest autoconf.
+
Mon Aug 16 01:29:24 PDT 1999 Jeff Law ([EMAIL PROTECTED])
* gcc-2.95.1 Released.
- Patch from me (forgot -u option...):
file gcc/libgcc2.c: (moved xcc -> inhibit stuff upwards and added anidecl.h
to let machmode.h compile)
34a35,42
>
> /* In a cross-compilation situation, default to inhibiting compilation
> of routines that use libc. */
>
> #if defined(CROSS_COMPILE) && !defined(inhibit_libc)
> #define inhibit_libc
> #endif
>
42a51,52
> #else
> #include <ansidecl.h> // for PROTO in machmode.h
60,66d69
< /* In a cross-compilation situation, default to inhibiting compilation
< of routines that use libc. */
<
< #if defined(CROSS_COMPILE) && !defined(inhibit_libc)
< #define inhibit_libc
< #endif
<
3033a3037
> #ifndef inhibit_libc
3034a3039
> #endif
gcc/frame.c (?) (added xcc -> inhibit stuff)
35a36,42
> /* In a cross-compilation situation, default to inhibiting compilation
> of routines that use libc. */
>
> #if defined(CROSS_COMPILE) && !defined(inhibit_libc)
> #define inhibit_libc
> #endif
>
I've compiled cross-binutils from binutils-2.9.1.0.23 (without patches) and
installed in /opt/arm:
In build dir:
../sourcedir/configure --prefix=/opt/arm --build=i686-linux --host=i686-linu
x --target=arm-linux
make
make install
Then:
#installing linux stuff (is in /opt/arm/linux, with include/asm ->
include/asm-arm)
# symlink /opt/arm/arm-linux/include/asm -> ../../linux/include/asm
# symlink /opt/arm/arm-linux/include/linux -> ../../linux/include/linux
mkdir build-gcc
cd build-gcc
../gcc-2.95.2-mine/configure --prefix=/opt/arm --build=i686-linux --host=i68
6-linux --target=arm-linux
make cross
(fails on building libio, because of lack of glibc header files)
cd gcc
make
make install
(this does actually build and install cross-compiler)
Questions:
- Should I apply patches to the binutils package or use binutils-2.9.5.x.x?
Did i compile the binutils right?
- I put everything in /opt/arm because the files of the binutils are
interfering with the ones installed for the native compiler. Is there an
elegant way to let them coexist? I saw a solution of using a wrapper script
for using dislocated binutils support files with the cross-tools, but that
was not nice...
- Is it right to use the kernel includes the way I do? Wouldn't it be better
to use a --local-include=/opt/arm/include to force using
/opt/arm/include/{asm,linux} for the kernel includes? In that case, I can
use /opt/arm/include for the glibc includes. Is glibc-2.1.2 a good choice?
- Is my patch OK? It is somewhat crippled because it was too late tonight
:-) I used LIBGCC2_CFLAGS="-Dinhibiti_libc" make before and that worked too!
- Do I need libio? Does it really need the glibc header files? How can I
avoid libio from building?
Bas.
unsubscribe: body of `unsubscribe linux-arm' to [EMAIL PROTECTED]
++ Please use [EMAIL PROTECTED] for ++
++ kernel-related discussions. ++