2003-02-18 00:24:14

by Russell King

[permalink] [raw]
Subject: 2.5.62: Cross-building broken

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.

--
Russell King ([email protected]) The developer of ARM Linux
http://www.arm.linux.org.uk/personal/aboutme.html


2003-02-18 00:50:02

by Kai Germaschewski

[permalink] [raw]
Subject: Re: 2.5.62: Cross-building broken

On Tue, 18 Feb 2003, Russell King wrote:

> 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.

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


2003-02-18 13:41:43

by John Bradford

[permalink] [raw]
Subject: Re: 2.5.62: Cross-building broken

> 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.

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.

2003-02-18 16:30:43

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: 2.5.62: Cross-building broken

On Tue, 18 Feb 2003, John Bradford wrote:
> > 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.
>
> 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