[HELP] Compile error with GCC 4.7

Search This thread
G

GuestK00248

Guest
Hi everybody.

I use Linaro toolchain 2012.05 GCC 4.7 on my Archlinux x86_64 and when I compile Nexus S stock kernel, I have some errors like these:

Code:
[matt@ArchLinux samsung]$ make
  CHK     include/linux/version.h
  CHK     include/generated/utsrelease.h
make[1]: «include/generated/mach-types.h» è aggiornato.
  CC      kernel/bounds.s
gcc: error: unrecognized command line option ‘-mlittle-endian’
gcc: error: unrecognized command line option ‘-mapcs’
gcc: error: unrecognized command line option ‘-mno-sched-prolog’
gcc: error: unrecognized argument in option ‘-mabi=aapcs-linux’
gcc: note: valid arguments to ‘-mabi=’ are: ms sysv
gcc: error: unrecognized command line option ‘-mno-thumb-interwork’
make[1]: *** [kernel/bounds.s] Errore 1
make: *** [prepare0] Errore 2

With GCC 4.6 I have another errors. I want to use GCC 4.7 like Thalamus.

Can you help me?

PS:
Code:
export ARCH=arm
export CROSS_COMPILE=
export PATH=$PATH:~/android-toolchain-eabi/arm-eabi/bin/
 
G

GuestK00248

Guest
Thank you! Now I have some errors.

LD vmlinux.o
MODPOST vmlinux.o
WARNING: vmlinux.o(.data+0x3c64): Section mismatch in reference from the variable s5pv210_driver to the function .init.text:s5pv210_cpu_init()
The variable s5pv210_driver references
the function __init s5pv210_cpu_init()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console

WARNING: vmlinux.o(.data+0x3c90): Section mismatch in reference from the variable s5pv210_cpufreq_drv to the function .init.text:s5pv210_cpufreq_probe()
The variable s5pv210_cpufreq_drv references
the function __init s5pv210_cpufreq_probe()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console

WARNING: vmlinux.o(.data+0x9118): Section mismatch in reference from the variable herring_device_rfkill to the function .init.text:herring_rfkill_probe()
The variable herring_device_rfkill references
the function __init herring_rfkill_probe()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console

WARNING: vmlinux.o(.data+0xcb98): Section mismatch in reference from the variable s5p_systimer to the function .init.text:s5p_timer_init()
The variable s5p_systimer references
the function __init s5p_timer_init()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console

GEN .version
CHK include/generated/compile.h
UPD include/generated/compile.h
CC init/version.o
LD init/built-in.o
LD .tmp_vmlinux1
KSYM .tmp_kallsyms1.S
AS .tmp_kallsyms1.o
LD .tmp_vmlinux2
KSYM .tmp_kallsyms2.S
AS .tmp_kallsyms2.o
LD vmlinux
SYSMAP System.map
SYSMAP .tmp_System.map
OBJCOPY arch/arm/boot/Image
Kernel: arch/arm/boot/Image is ready
LZMA arch/arm/boot/compressed/piggy.lzma
AS arch/arm/boot/compressed/piggy.lzma.o
CC arch/arm/boot/compressed/misc.o
In file included from arch/arm/plat-samsung/include/plat/uncompress.h:30:0,
from arch/arm/mach-s5pv210/include/mach/uncompress.h:17,
from arch/arm/boot/compressed/misc.c:33:
arch/arm/plat-samsung/include/plat/regs-serial.h:284:27: warning: 'struct uart_port' declared inside parameter list [enabled by default]
arch/arm/plat-samsung/include/plat/regs-serial.h:284:27: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]
CC arch/arm/boot/compressed/decompress.o
SHIPPED arch/arm/boot/compressed/lib1funcs.S
AS arch/arm/boot/compressed/lib1funcs.o
LD arch/arm/boot/compressed/vmlinux
arm-eabi-ld: error: DIV usage mismatch between arch/arm/boot/compressed/misc.o and output
arm-eabi-ld: error: DIV usage mismatch between arch/arm/boot/compressed/lib1funcs.o and output
make[2]: *** [arch/arm/boot/compressed/vmlinux] Errore 1
make[1]: *** [arch/arm/boot/compressed/vmlinux] Errore 2
make: *** [zImage] Errore 2

Can I risolve it?
 

tehgeekguy

Senior Member
Apr 9, 2010
511
139
You'll really get more help if you post this in the correct section. That's what the Q&A section is for - Questions and Answers.