Skip to contentSkip to conversation

2.5.62: Cross-building broken

DISCUSSION Russell King 4 participants 4 messages Feb 18, 2003

lore
Share & tools
lore
#0 lore raw

Cross-building ARM from HPPA:

$ make config CROSS_COMPILE=/home/rmk/bin/arm-linux- ARCH=arm
make: Entering directory `/home/rmk/v2.5/linux-rpc'
make -f scripts/Makefile.build obj=scripts
  gcc -Wp,-MD,scripts/.empty.o.d -D__KERNEL__ -Iinclude -Wall
 -Wstrict-prototypes -Wno-trigraphs -Os -fno-strict-aliasing -fno-common
 -mshort-load-bytes -msoft-float -Wa,-mno-fpu -Uarm -nostdinc -iwithprefix
 include    -DKBUILD_BASENAME=empty -DKBUILD_MODNAME=empty -c -o
 scripts/empty.o scripts/empty.c
make: Leaving directory `/home/rmk/v2.5/linux-rpc'
cc1: Invalid option `short-load-bytes'
make[1]: *** [scripts/empty.o] Error 1
make: *** [scripts] Error 2

We seem to be using the wrong compiler here, or the wrong CFLAGS.

Signature · 2 lines
Russell King ([email protected])                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html
#1 lore raw
Quoted 15 lines · Russell King

Cross-building ARM from HPPA:

$ make config CROSS_COMPILE=/home/rmk/bin/arm-linux- ARCH=arm
make: Entering directory `/home/rmk/v2.5/linux-rpc'
make -f scripts/Makefile.build obj=scripts
  gcc -Wp,-MD,scripts/.empty.o.d -D__KERNEL__ -Iinclude -Wall
 -Wstrict-prototypes -Wno-trigraphs -Os -fno-strict-aliasing -fno-common
 -mshort-load-bytes -msoft-float -Wa,-mno-fpu -Uarm -nostdinc -iwithprefix
 include    -DKBUILD_BASENAME=empty -DKBUILD_MODNAME=empty -c -o
 scripts/empty.o scripts/empty.c
make: Leaving directory `/home/rmk/v2.5/linux-rpc'
cc1: Invalid option `short-load-bytes'
make[1]: *** [scripts/empty.o] Error 1
make: *** [scripts] Error 2
Quoted 1 line

We seem to be using the wrong compiler here, or the wrong CFLAGS.

That's indeed really weird, it's using the wrong compiler.

[kai@vaio linux-2.5.make]$ make config CROSS_COMPILE="ccache " arch=ARM make -f scripts/Makefile.build obj=scripts
ccache gcc -Wp,-MD,scripts/.empty.o.d -D__KERNEL__ -Iinclude -Wall
-Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -Iinclude/asm-i386/mach-default -nostdinc -iwithprefix include
-DKBUILD_BASENAME=empty -DKBUILD_MODNAME=empty -c -o scripts/empty.o
scripts/empty.c
scripts/mk_elfconfig < scripts/empty.o > scripts/elfconfig.h gcc -Wp,-MD,scripts/.file2alias.o.d -Wall -Wstrict-prototypes -O2
-fomit-frame-pointer -c -o scripts/file2alias.o scripts/file2alias.c

That's not a true cross compiler, but as you can see, it uses "ccache gcc" for empty.o, i.e. the target compiler, and "gcc" for the host program file2alias.o, and the right flags, respectively. So I'm lost - does it work if you explicitly set make CC=/home/rmk/bin/arm-linux-gcc ...?

--Kai

#2 lore raw
In reply to Russell King
Quoted 15 lines

Cross-building ARM from HPPA:

$ make config CROSS_COMPILE=/home/rmk/bin/arm-linux- ARCH=arm
make: Entering directory `/home/rmk/v2.5/linux-rpc'
make -f scripts/Makefile.build obj=scripts
  gcc -Wp,-MD,scripts/.empty.o.d -D__KERNEL__ -Iinclude -Wall
 -Wstrict-prototypes -Wno-trigraphs -Os -fno-strict-aliasing -fno-common
 -mshort-load-bytes -msoft-float -Wa,-mno-fpu -Uarm -nostdinc -iwithprefix
 include    -DKBUILD_BASENAME=empty -DKBUILD_MODNAME=empty -c -o
 scripts/empty.o scripts/empty.c
make: Leaving directory `/home/rmk/v2.5/linux-rpc'
cc1: Invalid option `short-load-bytes'
make[1]: *** [scripts/empty.o] Error 1
make: *** [scripts] Error 2
Quoted 1 line

We seem to be using the wrong compiler here, or the wrong CFLAGS.

Hmmm, cross compiling for Sparc works:

make config CROSS_COMPILE=/usr/local/bin/sparc-linux- ARCH=sparc make -f scripts/Makefile.build obj=scripts
make -f scripts/Makefile.build obj=scripts/kconfig scripts/kconfig/conf make[1]: `scripts/kconfig/conf' is up to date. ./scripts/kconfig/conf arch/sparc/Kconfig
#

# using defaults found in arch/sparc/defconfig
#
*
* Linux Kernel Configuration
*
*
* Code maturity level options
*
Prompt for development and/or incomplete code/drivers (EXPERIMENTAL) [Y/n/?] 

John.

#3 lore raw
Quoted 15 lines · John Bradford
Quoted 15 lines

Cross-building ARM from HPPA:

$ make config CROSS_COMPILE=/home/rmk/bin/arm-linux- ARCH=arm
make: Entering directory `/home/rmk/v2.5/linux-rpc'
make -f scripts/Makefile.build obj=scripts
  gcc -Wp,-MD,scripts/.empty.o.d -D__KERNEL__ -Iinclude -Wall
 -Wstrict-prototypes -Wno-trigraphs -Os -fno-strict-aliasing -fno-common
 -mshort-load-bytes -msoft-float -Wa,-mno-fpu -Uarm -nostdinc -iwithprefix
 include    -DKBUILD_BASENAME=empty -DKBUILD_MODNAME=empty -c -o
 scripts/empty.o scripts/empty.c
make: Leaving directory `/home/rmk/v2.5/linux-rpc'
cc1: Invalid option `short-load-bytes'
make[1]: *** [scripts/empty.o] Error 1
make: *** [scripts] Error 2
Quoted 3 lines
Quoted 1 line

We seem to be using the wrong compiler here, or the wrong CFLAGS.

Hmmm, cross compiling for Sparc works:

And for m68k works, too.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds