View previous topic :: View next topic |
Author |
Message |
musv Advocate
Joined: 01 Dec 2002 Posts: 3337 Location: de
|
Posted: Wed Aug 03, 2016 4:35 pm Post subject: Cross Compiling - unrecognized command line option |
|
|
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
How do I convince the compiler to accept those flags? |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54237 Location: 56N 3W
|
Posted: Wed Aug 03, 2016 8:20 pm Post subject: |
|
|
musv,
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 |
|
|
musv Advocate
Joined: 01 Dec 2002 Posts: 3337 Location: de
|
Posted: Thu Aug 04, 2016 10:04 pm Post subject: |
|
|
Thanks, did help. |
|
Back to top |
|
|
|