Skip to content

Instantly share code, notes, and snippets.

@bigunclemax
Created May 3, 2024 15:23
Show Gist options
  • Save bigunclemax/7f431fad223232b9c9e59ce0fbef4760 to your computer and use it in GitHub Desktop.
Save bigunclemax/7f431fad223232b9c9e59ce0fbef4760 to your computer and use it in GitHub Desktop.
GCC toolchain for Ford SYNC3 QNX

GCC toolchain for Ford SYNC3 QNX

Preparation

  1. Download and unpack QNX sysroot
    https://disk.yandex.ru/d/E9TB3jIDFZ4WtQ
unzip qnx_6.5_sysroot_24.05.zip
  1. Setup envs
PREFIX=path/where/toolchain/will/be/installed
SYSROOT_PATH=/path/to/unpacked/sysroot
BINUTILS_PREFIX=$PREFIX/bin 

GNU Binary utilities

  1. 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/
  1. 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 ../../

GCC 11.2.0 port for SYNC3 QNX

Based on:

  1. Clone gcc repo
git clone --depth=1 https://github.com/bigunclemax/gcc.git
cd gcc/
  1. 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 ../../
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment