Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
MattScherbatsky
Old
#1  
MattScherbatsky's Avatar
Senior Member - OP
Thanks Meter 93
Posts: 176
Join Date: Jun 2011
Location: Northern Italy

 
DONATE TO ME
Default [HELP] Compile error with GCC 4.7

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/
Follow me on Twitter

If you would, you can "Donate to me" (:

Nexus S i9023
The Following User Says Thank You to MattScherbatsky For This Useful Post: [ Click to Expand ]
 
tehgeekguy
Old
#2  
Senior Member
Thanks Meter 141
Posts: 507
Join Date: Apr 2010
Q&A Section would be the right place for this.

http://forum.xda-developers.com/forumdisplay.php?f=927
 
adridu59
Old
#3  
adridu59's Avatar
Recognized Contributor
Thanks Meter 2238
Posts: 866
Join Date: May 2011
Location: Paris, France
Quote:
Originally Posted by MattScherbatsky View Post
PS:
Code:
export ARCH=arm
export CROSS_COMPILE=
export PATH=$PATH:~/android-toolchain-eabi/arm-eabi/bin/
Code:
export ARCH=arm
export CROSS_COMPILE=:~/android-toolchain-eabi/arm-eabi/bin/arm-linux-gnueabihf-
Follow me on Github.

Prehistoric phones > Nokia 5230 > Xperia Neo (MT15i) [4.1.B.0.587]
 
MattScherbatsky
Old
#4  
MattScherbatsky's Avatar
Senior Member - OP
Thanks Meter 93
Posts: 176
Join Date: Jun 2011
Location: Northern Italy

 
DONATE TO ME
Thank you! Now I have some errors.

Quote:
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?
Follow me on Twitter

If you would, you can "Donate to me" (:

Nexus S i9023
 
weedy2887
Old
#5  
Senior Member
Thanks Meter 26
Posts: 134
Join Date: Sep 2010
Those are warnings, read up on building kernels more.
 
MattScherbatsky
Old
#6  
MattScherbatsky's Avatar
Senior Member - OP
Thanks Meter 93
Posts: 176
Join Date: Jun 2011
Location: Northern Italy

 
DONATE TO ME
I use this guide: http://source.android.com/source/building-kernels.html
Follow me on Twitter

If you would, you can "Donate to me" (:

Nexus S i9023
 
tehgeekguy
Old
#7  
Senior Member
Thanks Meter 141
Posts: 507
Join Date: Apr 2010
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.
 
Quallenauge
Old
#8  
Senior Member
Thanks Meter 125
Posts: 109
Join Date: May 2012
Quote:
Originally Posted by MattScherbatsky View Post
Try to use the bfd linker, which is also provided at the linaro prebuild toolchain package. For details look at:
http://forum.xda-developers.com/show...05&postcount=8

 
Post Reply+
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

report this ad
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...

XDA PORTAL POSTS

Forums Added for the LG Optimus G Pro and Sony Xperia Tablet Z

Not too long ago, we talked about how Sony was continuing its AOSP efforts on … more

Permanent Screen Off for the Visually Impaired

Most of us take the simple act of waking up our devices and having a quick glance at the … more

App Analytics, or the Death of the Independent App Developer

This is entry number one in a series of articles about tools for app developers, … more

Serajr Power Toggles Brings Settings to the Small App World

Ever since the introduction of multi-window with things like Cornerstone and … more