部分报错如下
CFG_HOST_ARCH="x86_64"
CFG_HOST_CPUFEATURES=" mmx sse sse2"
System architecture: 'arm'
Host architecture: 'x86_64'
arm-none-linux-gnueabi-g++ -c -fvisibility=hidden fvisibility.c
Symbol visibility control enabled.
collect2: fatal error: cannot find 'ld'
compilation terminated.
arm-none-linux-gnueabi-g++ -o libtest.so -shared -Wl,-Bsymbolic-functions -fPIC bsymbolic_functions.c
bsymbolic_functions.c:2:2: error: #error "Symbolic function binding on this architecture may be broken, disabling it (see QTBUG-36129)."
#error "Symbolic function binding on this architecture may be broken, disabling it (see QTBUG-36129)."
^
Symbolic function binding disabled.
checking for C++11...
arm-none-linux-gnueabi-g++ -c -pipe -O2-march=armv7-a -O2-march=armv7-a -O2 -std=gnu++11 -Wall -W -fPIC -I. -I/opt/tslib1.4/include -I../../../mkspecs/linux-arm-gnueabi-g++ -o c++11.o c++11.cpp
cc1plus: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
cc1plus: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
Makefile:180: recipe for target 'c++11.o' failed
make: *** [c++11.o] Error 1
C++11 disabled.
ERROR: Qt requires a C++11 compiler and yours does not seem to be that.
Please upgrade.
脚本如下:
#!/bin/sh
./configure \
-v \
-prefix /opt/qt5.7.0 \
-release \
-opensource \
-make libs \
-xplatform linux-arm-gnueabi-g++ \
-optimized-qmake \
-pch \
-qt-sql-sqlite \
-qt-libjpeg \
-qt-zlib \
-no-opengl \
-skip qt3d \
-skip qtcanvas3d \
-skip qtpurchasing \
-no-sse2 \
-no-openssl \
-no-nis \
-no-cups \
-no-glib \
-no-iconv \
-nomake examples \
-nomake tools \
-skip qtvirtualkeyboard \
-I/opt/tslib1.4/include \
-L/opt/tslib1.4/lib
exit
qmake.conf配置如下:
#
# qmake configuration for building with arm-linux-gnueabi-g++
#
MAKEFILE_GENERATOR = UNIX
CONFIG += incremental
QMAKE_INCREMENTAL_STYLE = sublib
QT_QPA_DEFAULT_PLATFORM = linux #eglfs
QMAKE_CFLAGS_RELEASE += -O2-march=armv7-a
QMAKE_CXXFLAGS_RELEASE += -O2-march=armv7-a
include(../common/linux.conf)
include(../common/gcc-base-unix.conf)
include(../common/g++-unix.conf)
# modifications to g++.conf
QMAKE_CC = arm-none-linux-gnueabi-gcc
QMAKE_CXX = arm-none-linux-gnueabi-g++
QMAKE_LINK = arm-none-linux-gnueabi-g++
QMAKE_LINK_SHLIB = arm-none-linux-gnueabi-g++
# modifications to linux.conf
QMAKE_AR = arm-none-linux-gnueabi-ar cqs
QMAKE_OBJCOPY = arm-none-linux-gnueabi-objcopy
QMAKE_NM = arm-none-linux-gnueabi-nm -P
QMAKE_STRIP = arm-none-linux-gnueabi-strip
load(qt_config)