From 18288fcce6ef91da2431f2e29b777c6a72e0062c Mon Sep 17 00:00:00 2001 From: Solomon Peachy Date: Fri, 4 Jun 2021 08:38:35 -0400 Subject: [PATCH] toolchains: Fix gcc 4,9.4 compilation using GCC11. Basically it defaults to using C++17, which breaks the GCC compilation. Instead, explicitly specify -std=c++03, which should work everywhere. Change-Id: I821591dbbac4fab4b1d930702ed66c7c767b5c92 --- tools/rockboxdev.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/rockboxdev.sh b/tools/rockboxdev.sh index 667dad318d..071ecbc863 100755 --- a/tools/rockboxdev.sh +++ b/tools/rockboxdev.sh @@ -360,7 +360,7 @@ buildtool() { elif [ "$config_opt" != "NO_CONFIGURE" ]; then echo "ROCKBOXDEV: $toolname/configure" # NOTE glibc requires to be compiled with optimization - CFLAGS='-U_FORTIFY_SOURCE -fgnu89-inline -O2' run_cmd "$logfile" \ + CFLAGS='-U_FORTIFY_SOURCE -fgnu89-inline -O2' CXXFLAGS='-std=c++03' run_cmd "$logfile" \ "$cfg_dir/configure" "--prefix=$prefix" \ --disable-docs $config_opt fi @@ -470,7 +470,7 @@ build() { ./configure --prefix=$prefix $configure_params ;; *) - CFLAGS='-U_FORTIFY_SOURCE -fgnu89-inline -fcommon' ../$toolname-$version/configure --target=$target --prefix=$prefix --enable-languages=c --disable-libssp --disable-docs $configure_params + CFLAGS='-U_FORTIFY_SOURCE -fgnu89-inline -fcommon' CXXFLAGS='-std=c++03' ../$toolname-$version/configure --target=$target --prefix=$prefix --enable-languages=c --disable-libssp --disable-docs $configure_params ;; esac