Rockbox mail archive
Subject: Re: Problems compiling under Linux
From: Paul Suade (paul.suade_at_laposte.net)
Jukebox has a SH1 mcu and not a x86 cpu, so you need to run a
cross-compiler. In fact, sh-elf-gcc and counterparts are indeed an x86 gcc
compiler for SH target, so we can compile programs for SH1 under an x86
platform (Windows or Linux). To avoid to be mangled with the normal gcc
compiler (x86 host compiler for x86 target) and the cross compiler (x86 host
compiler for SH target), we choose to keep the prefix "sh-elf-" to remind
that it a cross-compiler to generate an ELF object for SH1 target.
If you replace sh-elf-gcc with gcc, your rockbox software wouldn't be
runnable under jukebox because it has no x86 cpu to run it.
PS : for cross compilation, it is a convention to prefix with :
<target object>-<target cpu>-gcc
where <target object> is either :
- elf, aout, coff, etc.
and <target cpu> :
- arm,sh,mips,alpha, etc.
----- Original Message -----
From: "Uwe Freese" <mail_at_uwe-freese.de>
Sent: Saturday, July 27, 2002 2:18 AM
Subject: Problems compiling under Linux
> I unpacked the source files under SuSE Linux 7.2 and started
> The firmware/Makefile says:
> CC = sh-elf-gcc
> LD = sh-elf-ld
> AR = sh-elf-ar
> AS = sh-elf-as
> OC = sh-elf-objcopy
> Why these names? I'd never seen that someone starts his c-compiler with
> sh-elf-gcc! Why is is not just "cc" or "gcc"?
> Then I edited the Makefile into
> CC = gcc
> LD = ld
> AR = ar
> AS = as
> OC = objcopy
> and started 'make'. The output:
> Updating dependencies for [...]
> gcc -W -Wall -O -m1 -nostdlib -Wstrict-prototypes -Iinclude -I.
> -Icommon -Idrivers -DARCHOS_PLAYER=1 -fomit-frame-pointer
> -fschedule-insns -c drivers/adc.c -o drivers/adc.o
> cc1: Invalid option `1'
> make: *** [drivers/adc.o] Error 1
> Has somebody an idea what this error means? I don't see a '1' option in
> the parameter list above!? Do I have to install some special c-compiler?
> (If so, it should probably updated in the 'Readme').
> Thanks for any hints.
> Bye, Uwe.
Page was last modified "Jan 10 2012" The Rockbox Crew