Early Lollipop Ports for Micromax A116 and A117

It feels like it was only yesterday when Google announced the mysterious Android L.After … more

Now Gesture Tweaks Replaces Google Now with Custom Action

On most modern Android devices with software navigation keys, swiping up from the … more

ToqAN Fixes Android 5.0 Notification Bug on Qualcomm Toq

The Qualcomm Toq is probably one of the lesser known smartwatches on the market … more

How to Root and Unlock the Google Nexus 6 on a Mac – XDA TV

In the past, XDA Developer TV Producer droidmodd3rx has shown you how to … more

Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[HELP] Compile error with GCC 4.7

OP MattScherbatsky

10th June 2012, 08:54 PM   |  #1  
MattScherbatsky's Avatar
OP Senior Member
Flag Northern Italy
Thanks Meter: 100
 
191 posts
Join Date:Joined: Jun 2011
Donate to Me
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/
The Following User Says Thank You to MattScherbatsky For This Useful Post: [ View ]
11th June 2012, 02:21 AM   |  #2  
Senior Member
Thanks Meter: 142
 
508 posts
Join Date:Joined: Apr 2010
Q&A Section would be the right place for this.

http://forum.xda-developers.com/forumdisplay.php?f=927
14th June 2012, 11:01 AM   |  #3  
adridu59's Avatar
Recognized Contributor
Flag Paris, France
Thanks Meter: 2,285
 
879 posts
Join Date:Joined: May 2011
More
Quote:
Originally Posted by MattScherbatsky

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-
14th June 2012, 03:45 PM   |  #4  
MattScherbatsky's Avatar
OP Senior Member
Flag Northern Italy
Thanks Meter: 100
 
191 posts
Join Date:Joined: Jun 2011
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?
14th June 2012, 05:21 PM   |  #5  
Senior Member
Thanks Meter: 34
 
184 posts
Join Date:Joined: Sep 2010
More
Those are warnings, read up on building kernels more.
14th June 2012, 08:10 PM   |  #6  
MattScherbatsky's Avatar
OP Senior Member
Flag Northern Italy
Thanks Meter: 100
 
191 posts
Join Date:Joined: Jun 2011
Donate to Me
I use this guide: http://source.android.com/source/building-kernels.html
14th June 2012, 09:03 PM   |  #7  
Senior Member
Thanks Meter: 142
 
508 posts
Join Date:Joined: 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.
19th June 2012, 06:35 AM   |  #8  
Senior Member
Thanks Meter: 473
 
230 posts
Join Date:Joined: May 2012
Quote:
Originally Posted by MattScherbatsky

I use this guide: http://source.android.com/source/building-kernels.html

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 Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes