gcc 10 (#4641)
* scripts * change check version * disable inlining * all the spots * it's funny that this works with the wrong file extension * bootloader * hardware ci runs gcc 10
This commit is contained in:
parent
582cc4a10e
commit
ced5db5d53
|
@ -321,9 +321,9 @@ jobs:
|
||||||
env:
|
env:
|
||||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
|
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
|
||||||
run: | # Compiler hosted on our other git repo - avoids having to download from the nice folks at ARM every time
|
run: | # Compiler hosted on our other git repo - avoids having to download from the nice folks at ARM every time
|
||||||
wget 'https://github.com/rusefi/build_support/raw/master/gcc-arm-none-eabi-9-2020-q2-update-x86_64-linux.tar.xz' -O compiler.tar.xz
|
wget 'https://github.com/rusefi/build_support/raw/master/gcc-arm-none-eabi-10.3-2021.10-x86_64-linux.tar.bz2' -O compiler.tar.bz2
|
||||||
tar -xvf compiler.tar.xz
|
tar -xvf compiler.tar.bz2
|
||||||
echo "`pwd`/gcc-arm-none-eabi-9-2020-q2-update/bin" >> $GITHUB_PATH
|
echo "`pwd`/gcc-arm-none-eabi-10.3-2021.10/bin" >> $GITHUB_PATH
|
||||||
|
|
||||||
# Make sure the compiler we just downloaded works - just print out the version
|
# Make sure the compiler we just downloaded works - just print out the version
|
||||||
- name: Test Compiler
|
- name: Test Compiler
|
||||||
|
@ -443,9 +443,9 @@ jobs:
|
||||||
env:
|
env:
|
||||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
|
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
|
||||||
run: | # Compiler hosted on our other git repo - avoids having to download from the nice folks at ARM every time
|
run: | # Compiler hosted on our other git repo - avoids having to download from the nice folks at ARM every time
|
||||||
wget 'https://github.com/rusefi/build_support/raw/master/gcc-arm-none-eabi-9-2020-q2-update-x86_64-linux.tar.xz' -O compiler.tar.xz
|
wget 'https://github.com/rusefi/build_support/raw/master/gcc-arm-none-eabi-10.3-2021.10-x86_64-linux.tar.bz2' -O compiler.tar.bz2
|
||||||
tar -xvf compiler.tar.xz
|
tar -xvf compiler.tar.bz2
|
||||||
echo "::add-path::`pwd`/gcc-arm-none-eabi-9-2020-q2-update/bin"
|
echo "::add-path::`pwd`/gcc-arm-none-eabi-10.3-2021.10/bin"
|
||||||
|
|
||||||
# Make sure the compiler we just downloaded works - just print out the version
|
# Make sure the compiler we just downloaded works - just print out the version
|
||||||
- name: Test Compiler
|
- name: Test Compiler
|
||||||
|
|
|
@ -53,7 +53,7 @@ jobs:
|
||||||
run: ./gen_live_documentation.sh
|
run: ./gen_live_documentation.sh
|
||||||
|
|
||||||
- name: Add compiler to PATH
|
- name: Add compiler to PATH
|
||||||
run: echo "$HOME/.rusefi-tools/gcc-arm-none-eabi-9-2020-q2-update/bin" >> $GITHUB_PATH
|
run: echo "$HOME/.rusefi-tools/gcc-arm-none-eabi-10.3-2021.10/bin" >> $GITHUB_PATH
|
||||||
|
|
||||||
# Make sure the compiler works
|
# Make sure the compiler works
|
||||||
- name: Test/Identify Compiler
|
- name: Test/Identify Compiler
|
||||||
|
|
|
@ -73,8 +73,8 @@ endif
|
||||||
|
|
||||||
# C++ specific options here (added to USE_OPT).
|
# C++ specific options here (added to USE_OPT).
|
||||||
ifeq ($(USE_CPPOPT),)
|
ifeq ($(USE_CPPOPT),)
|
||||||
USE_CPPOPT = -std=c++2a -Wno-register -fno-rtti -fno-threadsafe-statics -fno-exceptions -fno-use-cxa-atexit
|
USE_CPPOPT = -std=c++20 -Wno-register -fno-rtti -fno-threadsafe-statics -fno-exceptions -fno-use-cxa-atexit
|
||||||
# gcc-10 c++ 2a depricated uses of volatile errors
|
# gcc-10 c++ 20 depricated uses of volatile errors
|
||||||
USE_CPPOPT += -Wno-deprecated
|
USE_CPPOPT += -Wno-deprecated
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,9 @@ endif
|
||||||
# C++ specific options here (added to USE_OPT).
|
# C++ specific options here (added to USE_OPT).
|
||||||
ifeq ($(USE_CPPOPT),)
|
ifeq ($(USE_CPPOPT),)
|
||||||
# constexpr float expf_taylor_impl probably needs just c++14 but why not go with 17?
|
# constexpr float expf_taylor_impl probably needs just c++14 but why not go with 17?
|
||||||
USE_CPPOPT = -std=c++2a -Wno-register -fno-rtti -fno-exceptions -fno-use-cxa-atexit -Werror=write-strings -Werror=type-limits -Winvalid-pch
|
USE_CPPOPT = -std=c++20 -Wno-register -fno-rtti -fno-exceptions -fno-use-cxa-atexit -Werror=write-strings -Werror=type-limits -Winvalid-pch
|
||||||
|
# gcc-10 c++ 20 depricated uses of volatile errors
|
||||||
|
USE_CPPOPT += -Wno-deprecated
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Enable this if you want the linker to remove unused code and data
|
# Enable this if you want the linker to remove unused code and data
|
||||||
|
|
|
@ -8,17 +8,11 @@
|
||||||
#define STR_HELPER(x) #x
|
#define STR_HELPER(x) #x
|
||||||
#define STR(x) STR_HELPER(x)
|
#define STR(x) STR_HELPER(x)
|
||||||
|
|
||||||
// Firmware builds require at least GCC 9.3.1
|
|
||||||
#if (GCC_VERSION < 931)
|
|
||||||
#pragma message("GCC is " STR(__GNUC__)"."STR(__GNUC_MINOR__)"."STR(__GNUC_PATCHLEVEL__))
|
#pragma message("GCC is " STR(__GNUC__)"."STR(__GNUC_MINOR__)"."STR(__GNUC_PATCHLEVEL__))
|
||||||
#error "GCC compiler >= 9.3.1 required"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Firmware builds but does not actually run on GCC10 :(
|
// Firmware builds require at least GCC 10.3.1
|
||||||
// todo: one day someone should fix it, do YOU want to help?
|
#if (GCC_VERSION < 1031)
|
||||||
#if (GCC_VERSION > 1000)
|
#error "GCC compiler >= 10.3.1 required"
|
||||||
#pragma message("GCC is " STR(__GNUC__)"."STR(__GNUC_MINOR__)"."STR(__GNUC_PATCHLEVEL__))
|
|
||||||
#error "GCC10 not supported see https://github.com/rusefi/rusefi/labels/Gcc10"
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -26,14 +26,14 @@ cd ~/.rusefi-tools
|
||||||
rm -rf arm-none-eabi-gcc.tar.bz2
|
rm -rf arm-none-eabi-gcc.tar.bz2
|
||||||
|
|
||||||
# Download and extract GCC compiler
|
# Download and extract GCC compiler
|
||||||
curl -L -o arm-none-eabi-gcc.tar.bz2 https://developer.arm.com/-/media/Files/downloads/gnu-rm/9-2020q2/gcc-arm-none-eabi-9-2020-q2-update-x86_64-linux.tar.bz2
|
curl -L -o arm-none-eabi-gcc.tar.bz2 https://developer.arm.com/-/media/Files/downloads/gnu-rm/10.3-2021.10/gcc-arm-none-eabi-10.3-2021.10-x86_64-linux.tar.bz2
|
||||||
tar -xjvf arm-none-eabi-gcc.tar.bz2
|
tar -xjvf arm-none-eabi-gcc.tar.bz2
|
||||||
|
|
||||||
# Delete downloaded image
|
# Delete downloaded image
|
||||||
rm arm-none-eabi-gcc.tar.bz2
|
rm arm-none-eabi-gcc.tar.bz2
|
||||||
|
|
||||||
# Add the compiler to your path
|
# Add the compiler to your path
|
||||||
echo 'export PATH=$PATH:$HOME/.rusefi-tools/gcc-arm-none-eabi-9-2020-q2-update/bin' >> ~/.profile
|
echo 'export PATH=$PATH:$HOME/.rusefi-tools/gcc-arm-none-eabi-10.3-2021.10/bin' >> ~/.profile
|
||||||
|
|
||||||
# Allow the current user to use serial ports
|
# Allow the current user to use serial ports
|
||||||
sudo usermod -a -G dialout $USER
|
sudo usermod -a -G dialout $USER
|
||||||
|
|
Loading…
Reference in New Issue