diff --git a/qt/Dockerfile b/qt/Dockerfile index 96de25b..42b1b67 100644 --- a/qt/Dockerfile +++ b/qt/Dockerfile @@ -106,4 +106,6 @@ RUN --mount=target=/root/qt6,from=qt6base,src=/root/qt6 \ && rm -r qt6-build \ && apt-get autoremove -y \ && apt-get clean \ - && rm -rf /var/lib/apt/lists/* /var/log/dpkg.log /var/log/apt + && rm -rf /var/lib/apt/lists/* /var/log/dpkg.log /var/log/apt \ + && echo 'export QMAKESPEC=/usr/mkspecs/devices/linux-aarch64-remarkable-g++' >> /opt/x-tools/switch-aarch64.sh \ + && echo 'export QMAKESPEC=/usr/mkspecs/devices/linux-arm-remarkable-g++' >> /opt/x-tools/switch-arm.sh diff --git a/qt/linux-arm-remarkable-g++/qmake.conf b/qt/linux-arm-remarkable-g++/qmake.conf index f8bb3c8..2bee57a 100644 --- a/qt/linux-arm-remarkable-g++/qmake.conf +++ b/qt/linux-arm-remarkable-g++/qmake.conf @@ -6,3 +6,15 @@ include(../common/linux_device_pre.conf) DISTRO_OPTS += hard-float include(../common/linux_arm_device_post.conf) load(qt_config) + +QMAKE_CC="arm-linux-gnueabihf-gcc" +QMAKE_CXX="arm-linux-gnueabihf-g++" +QMAKE_LINK="arm-linux-gnueabihf-g++" +QMAKE_LINK_SHLIB="arm-linux-gnueabihf-g++" +QMAKE_AR="arm-linux-gnueabihf-ar" +QMAKE_OBJCOPY="arm-linux-gnueabihf-objcopy" +QMAKE_NM="arm-linux-gnueabihf-nm -P" +QMAKE_STRIP="arm-linux-gnueabihf-strip" +QMAKE_CFLAGS="-mfpu=neon -mfloat-abi=hard -mcpu=cortex-a9 -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64" +QMAKE_CXXFLAGS="-mfpu=neon -mfloat-abi=hard -mcpu=cortex-a9 -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64" +QMAKE_LFLAGS="-mfpu=neon -mfloat-abi=hard -mcpu=cortex-a9 -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64 -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed" diff --git a/toolchain/Dockerfile b/toolchain/Dockerfile index a2c5498..5f71b6d 100644 --- a/toolchain/Dockerfile +++ b/toolchain/Dockerfile @@ -143,24 +143,26 @@ RUN touch /opt/x-tools/switch-arm.sh && chmod +x /opt/x-tools/switch-arm.sh && c export ARCH=arm export CHOST="$CHOST" export CROSS_COMPILE="$CHOST-" -export PATH="\$PATH:/opt/x-tools/$NGCONFIG/bin" +export PATH="/opt/x-tools/$NGCONFIG/usr/bin:\$PATH" export PKG_CONFIG_LIBDIR="/opt/x-tools/$NGCONFIG/$NGCONFIG/sysroot/usr/lib/pkgconfig:/opt/x-tools/$NGCONFIG/$NGCONFIG/sysroot/lib/pkgconfig:/opt/x-tools/$NGCONFIG/$NGCONFIG/sysroot/opt/lib/pkgconfig" export PKG_CONFIG_SYSROOT_DIR="/opt/x-tools/$NGCONFIG/$NGCONFIG/sysroot" export SYSROOT="/opt/x-tools/$NGCONFIG/$NGCONFIG/sysroot" export NGCONFIG="$NGCONFIG" export TARGET_PREFIX="$CHOST" +export CMAKE_TOOLCHAIN_FILE="/usr/share/cmake/$CHOST.cmake" EOF RUN touch /opt/x-tools/switch-aarch64.sh && chmod +x /opt/x-tools/switch-aarch64.sh && cat < /opt/x-tools/switch-aarch64.sh export ARCH=aarch64 export CHOST="$CHOST_AARCH64" export CROSS_COMPILE="$CHOST_AARCH64-" -export PATH="\$PATH:/opt/x-tools/$NGCONFIG_AARCH64/bin" +export PATH="/opt/x-tools/$NGCONFIG_AARCH64/usr/bin:\$PATH" export PKG_CONFIG_LIBDIR="/opt/x-tools/$NGCONFIG_AARCH64/$NGCONFIG_AARCH64/sysroot/usr/lib/pkgconfig:/opt/x-tools/$NGCONFIG_AARCH64/$NGCONFIG_AARCH64/sysroot/lib/pkgconfig:/opt/x-tools/$NGCONFIG_AARCH64/$NGCONFIG_AARCH64/sysroot/opt/lib/pkgconfig" export PKG_CONFIG_SYSROOT_DIR="/opt/x-tools/$NGCONFIG_AARCH64/$NGCONFIG_AARCH64/sysroot" export SYSROOT="/opt/x-tools/$NGCONFIG_AARCH64/$NGCONFIG_AARCH64/sysroot" export NGCONFIG="$NGCONFIG_AARCH64" export TARGET_PREFIX="$CHOST_AARCH64" +export CMAKE_TOOLCHAIN_FILE="/usr/share/cmake/$CHOST_AARCH64.cmake" EOF # Configure Opkg