Anyone know Linux?

Status
Not open for further replies.

pioneerford

Contributor
Messages
28
Role
  1. Diaper Lover
  2. Little
  3. Incontinent
Hey guys. I've run into a problem whilst writing a few things to my raspberry Pi kernel. I'm trying to cross compile using arm-linux-gnueabihf but every time I do it comes up with "gcc: error: unrecognized command line option '-mlittle-endian' and 4 other unrecognized command line options.

Please help me the land of diapers I have trust in you. :)


Sent from my iPhone using Tapatalk
 
I know a bit about GNU/Linux, but not much about compiler options, and nothing about the Raspberry Pi, but...

When compiling, you should have some kind of config file specifying the build options. Since you're cross-compiling, double check the architecture (e.g. arm, i386, etc.).

Oh, hang on -- this quick google search makes it sound like cross-compiling for a Pi can be tricky. I don't know if this helps:

https://www.google.co.uk/search?q=pi+cross-compile+gcc
 
Cross compiling for the pi is a huge pain in the ass, but so is actually compiling anything on the pi natively.

Obviously would need way more details on what exactly you're trying to do and how to be able to give you any advice. Off the cuff though, it sounds like you arn't actually using the right target compiler (that is, you're trying to compile with your regular (presumably x86) compiler rather than the appropriate ARM one. If you look at the GCC man page, the -mlittle-endian option is applicable for ARM (among others) but not x86 (see "Machine Dependent Options" section,:

Code:
ARM Options -mapcs-frame  -mno-apcs-frame -mabi=name
           -mapcs-stack-check  -mno-apcs-stack-check -mapcs-float
           -mno-apcs-float -mapcs-reentrant  -mno-apcs-reentrant
           -msched-prolog  -mno-sched-prolog [B]-mlittle-endian[/B]  -mbig-endian
           -mwords-little-endian -mfloat-abi=name -mfp16-format=name
           -mthumb-interwork  -mno-thumb-interwork -mcpu=name  -march=name
           -mfpu=name -mstructure-size-boundary=n -mabort-on-noreturn
           -mlong-calls  -mno-long-calls -msingle-pic-base
           -mno-single-pic-base -mpic-register=reg -mnop-fun-dllimport
           -mpoke-function-name -mthumb  -marm -mtpcs-frame  -mtpcs-leaf-frame
           -mcaller-super-interworking  -mcallee-super-interworking -mtp=name
           -mtls-dialect=dialect -mword-relocations -mfix-cortex-m3-ldrd
           -munaligned-access -mneon-for-64bits -mslow-flash-data
           -mrestrict-it 

i386 and x86-64 Options -mtune=cpu-type  -march=cpu-type
           -mtune-ctrl=feature-list -mdump-tune-features -mno-default
           -mfpmath=unit -masm=dialect  -mno-fancy-math-387 -mno-fp-ret-in-387
           -msoft-float -mno-wide-multiply  -mrtd  -malign-double
           -mpreferred-stack-boundary=num -mincoming-stack-boundary=num -mcld
           -mcx16 -msahf -mmovbe -mcrc32 -mrecip -mrecip=opt -mvzeroupper
           -mprefer-avx128 -mmmx  -msse  -msse2 -msse3 -mssse3 -msse4.1
           -msse4.2 -msse4 -mavx -mavx2 -mavx512f -mavx512pf -mavx512er
           -mavx512cd -msha -maes -mpclmul -mfsgsbase -mrdrnd -mf16c -mfma
           -mprefetchwt1 -msse4a -m3dnow -mpopcnt -mabm -mbmi -mtbm -mfma4
           -mxop -mlzcnt -mbmi2 -mfxsr -mxsave -mxsaveopt -mrtm -mlwp
           -mthreads -mno-align-stringops  -minline-all-stringops
           -minline-stringops-dynamically -mstringop-strategy=alg
           -mmemcpy-strategy=strategy -mmemset-strategy=strategy -mpush-args
           -maccumulate-outgoing-args  -m128bit-long-double
           -m96bit-long-double -mlong-double-64 -mlong-double-80
           -mlong-double-128 -mregparm=num  -msseregparm -mveclibabi=type
           -mvect8-ret-in-mem -mpc32 -mpc64 -mpc80 -mstackrealign
           -momit-leaf-frame-pointer  -mno-red-zone -mno-tls-direct-seg-refs
           -mcmodel=code-model -mabi=name -maddress-mode=mode -m32 -m64 -mx32
           -m16 -mlarge-data-threshold=num -msse2avx -mfentry -m8bit-idiv
           -mavx256-split-unaligned-load -mavx256-split-unaligned-store
           -mstack-protector-guard=guard
 
I'm trying to rewrite the kernel to enable display link so I can have my USB screen running, my native is a x86 I'm running it as a VM to try and get this sorted. My VM is running ubuntu 14.4 I believe. I've been following the instructions from a post on google that tells you step by step how to build the kernel, but when I come to cross compile I end up with problems and sadly I'm not finding much info on google to resolve the issues.


Sent from my iPhone using Tapatalk
 
-mlittle-endian would refer to the endianness. ie 0x1234 vs 0x3412
I'm not familiar with the Pi or ARM. I'm not sure if there is a difference in endianness. I won't think there would be. you could try removing the option.
 
Linux,
Lucy's little brother, Charley Browns friend, ?
 
Status
Not open for further replies.
Back
Top