[Solved] Qt 5.4.1 for AM335x
-
Hello!
Thanks the reply and the welcome, I'm fairly new to Qt development (around 1 year).
I am cross compiling using arm-linux-gnueabi, specificially gcc and g++.
Mkspec is linux-am335x-g++
Here's a copy of my mkspec:
MAKEFILE_GENERATOR = UNIX
CONFIG += incremental gdb_dwarf_index
QMAKE_INCREMENTAL_STYLE = sublibinclude(../common/linux.conf)
include(../common/gcc-base-unix.conf)
include(../common/g++-unix.conf)#clearly define which compiler we are using
QMAKE_CC = $TARGET-gcc
QMAKE_CXX = $TARGET-g++
QMAKE_LINK = $TARGET-g++
QMAKE_LINK_SHLIB = $TARGET-g++
QMAKE_AR = $ARM_TOOLS_PATH/$TARGET-ar cqs
QMAKE_OBJCOPY = $ARM_TOOLS_PATH/$TARGET-objcopy
QMAKE_STRIP = $ARM_TOOLS_PATH/$TARGET-strip#tunes the application for this architecture and floating point unit
QMAKE_CFLAGS_RELEASE = -O3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp
QMAKE_CXXFLAGS_RELEASE = -O3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp#points the QT cross-compile to the correct libraries
QMAKE_INCDIR = $ROOTFS_PATH/usr/include
QMAKE_LIBDIR = $ROOTFS_PATH/usr/lib#to make AT projects compile correctly by dereferencing this project
QMAKE_INCDIR_QT = $ROOTFS_PATH/usr/include
QMAKE_LIBDIR_QT = $ROOTFS_PATH/usr/lib
QMAKE_LFLAGS += -Wl,--rpath=$ROOTFS_PATH/usr/lib -Wl,--rpath=$ROOTFS_PATH/lib -lgthread-2.0 -lglib-2.0 -lz#QMAKE_LFLAGS += --verbose -Wl,--verbose=10
load(qt_config)
Sorry if I misunderstood any of your questions, if I did just let me know and I'll do my best to get the correct information.
Thanks again!
-
What is the value of $TARGET ?
-
And the value of $QTMKSPECDIR ?
-
IIRC, you should rather set the common C and CXX flags in QMAKE_CFLAGS and QMAKE_CXXFLAGS rather than in the release configuration only.
Something like:
COMPILER_FLAGS = -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp QMAKE_CFLAGS += $${COMPILER_FLAGS} QMAKE_CXXFLAGS += $${COMPILER_FLAGS} QMAKE_CFLAGS_RELEASE += -O3
-
@SGaist said:
IIRC, you should rather set the common C and CXX flags in QMAKE_CFLAGS and QMAKE_CXXFLAGS rather than in the release configuration only.
Something like:
COMPILER_FLAGS = -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp QMAKE_CFLAGS += $${COMPILER_FLAGS} QMAKE_CXXFLAGS += $${COMPILER_FLAGS} QMAKE_CFLAGS_RELEASE += -O3
This worked!
Thank you very much!!
-
You're welcome !
Don't forget to mark the thread as solved (in the Topic Tools Button)
Happy coding !
-
Figured it out.
The 'mark as solved' option is there for people with admin rights, as the functionality relies on the admin 'rename post' function.For a thread OP to mark a post, he/she needs to add [solved] to the title.
I'll take a look at the plugin that adds the thread tool option to see if it could work with normal OP rights too.