Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Cross Compiling - unrecognized command line option
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
musv
Advocate
Advocate


Joined: 01 Dec 2002
Posts: 3259
Location: de

PostPosted: Wed Aug 03, 2016 4:35 pm    Post subject: Cross Compiling - unrecognized command line option Reply with quote

Hi there,

I'm trying to build Gentoo for my NSA326. For this reason I've set up a cross-build environment.

A lot of reading resulted in the Compiler-Flags
Code:
CFLAGS="-Ofast -march=armv7-a -mtune=cortex-a9 -mfpu=neon-fp16 -mfloat-abi=hard -pipe -fomit-frame-pointer"

for my Marvel Armada 380 - 88F6810.

Compiling the first packages worked, but in readline and in ncurses I get:
Code:
/usr/bin/g++ -I../c++ -I../include -I/usr/armv7a-hardfloat-linux-gnueabi/tmp/portage/sys-libs/ncurses-5.9-r5/work/ncurses-5.9/c++ -DHAVE_CONFIG_H  -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64  -DXTSTRINGDEFINES -DNDEBUG -I. -I../include -I/usr/armv7a-hardfloat-linux-gnueabi/tmp/portage/sys-libs/ncurses-5.9-r5/work/ncurses-5.9/c++/../include -Ofast -march=armv7-a -mtune=cortex-a9 -mfpu=neon-fp16 -mfloat-abi=hard -pipe -fomit-frame-pointer  -fPIC -c /usr/armv7a-hardfloat-linux-gnueabi/tmp/portage/sys-libs/ncurses-5.9-r5/work/ncurses-5.9/c++/demo.cc -o ../obj_s/demo.o
g++: error: unrecognized command line option ‘-mfpu=neon-fp16’
g++: error: unrecognized command line option ‘-mfloat-abi=hard’
g++: error: unrecognized command line option ‘-mfpu=neon-fp16’
g++: error: unrecognized command line option ‘-mfloat-abi=hard’


If I remove the flag, than ncurses complains about
Code:
mtune=cortex-a9

How do I convince the compiler to accept those flags?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 44904
Location: 56N 3W

PostPosted: Wed Aug 03, 2016 8:20 pm    Post subject: Reply with quote

musv,

Code:
/usr/bin/g++ ...
On my install, that's the build host's C++ compiler.
Code:
# /usr/bin/g++ -v
Using built-in specs.
COLLECT_GCC=/usr/x86_64-pc-linux-gnu/gcc-bin/5.4.0/g++
That won't understand arm things.

To make C++ work for cross compiling I had to add
Code:
# where to find C++
CXX="/usr/x86_64-pc-linux-gnu/aarch64-unknown-linux-gnu/gcc-bin/5.3.0/aarch64-unknown-linux-gnu-g++"

to my /usr/aarch64-unknown-linux-gnu/etc/portage/make.conf

That's for my arm64 cross environment. I expects that arm needs something similar.
Hmm. I have gcc-5.4.0 now, so I need to update that.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
musv
Advocate
Advocate


Joined: 01 Dec 2002
Posts: 3259
Location: de

PostPosted: Thu Aug 04, 2016 10:04 pm    Post subject: Reply with quote

Thanks, did help.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum