- Download and unpack QNX sysroot
https://disk.yandex.ru/d/E9TB3jIDFZ4WtQ
unzip qnx_6.5_sysroot_24.05.zip
- Setup envs
PREFIX=path/where/toolchain/will/be/installed
SYSROOT_PATH=/path/to/unpacked/sysroot
BINUTILS_PREFIX=$PREFIX/bin
- Download and unpack
binutils-2.42
wget https://ftp.gnu.org/gnu/binutils/binutils-2.42.tar.gz
tar -xzvf binutils-2.42.tar.gz
cd binutils-2.42/
- Build and install
mkdir objdir && cd objdir
../configure \
LDFLAGS="--static" \
--target=arm-fmods-nto-qnx6.5.0eabi \
--disable-nls \
--enable-lto \
--prefix=$PREFIX
make -j$(nproc) && make install
cd ../../
Based on:
- https://community.qnx.com/sf/scm/do/listRepositories/projects.toolchain/scm
- http://community.qnx.com/viewvc/?root=core-dev-tools&root=core-dev-tools&system=exsy1011
- Clone
gcc
repo
git clone --depth=1 https://github.com/bigunclemax/gcc.git
cd gcc/
- Build and install
mkdir -p objdir && cd objdir
../configure \
--srcdir=.. \
--with-default-libstdcxx-abi=gcc4-compatible \
--enable-libmudflap \
--enable-gnu-indirect-function=no \
--with-as=$BINUTILS_PREFIX/arm-fmods-nto-qnx6.5.0eabi-as \
--with-ld=$BINUTILS_PREFIX/arm-fmods-nto-qnx6.5.0eabi-ld \
--with-system-zlib \
--with-float=softfp \
--with-arch=armv7-a \
--with-fpu=vfpv3 \
--prefix=$PREFIX \
--enable-threads=posix \
--enable-__cxa_atexit \
--enable-languages=c++ \
--disable-werror \
--with-sysroot=$SYSROOT_PATH \
--target=arm-fmods-nto-qnx6.5.0eabi \
--disable-nls \
--disable-tls \
--disable-libssp \
--disable-libstdcxx-pch \
--enable-libgomp \
--enable-shared \
--enable-static \
--enable-multilib \
--disable-libsanitizer
make -j$(nproc) && make install
cd ../../