1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-24 16:55:36 +03:00

Bump clang version

This commit is contained in:
Mark Haslinghuis 2022-05-03 02:29:28 +02:00
parent ef9285239d
commit d9ac2ab3aa
5 changed files with 14 additions and 15 deletions

View file

@ -14,7 +14,7 @@ jobs:
release:
name: Release
needs: ci
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Code Checkout
uses: actions/checkout@v2

View file

@ -16,7 +16,7 @@ on:
jobs:
build:
name: Build
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Code Checkout
uses: actions/checkout@v2

View file

@ -16,7 +16,7 @@ variables:
owner: betaflight
repoName: betaflight-pull-requests
releaseNotes: This is a build of a community provided pull request. It may be unstable and result in corrupted configurations or data loss. **Use only for testing.**
vmImage: 'ubuntu-20.04'
vmImage: 'ubuntu-22.04'
name: $(Build.RequestedFor)_$(Build.SourceBranchName)_$(BuildID)

View file

@ -1,7 +1,7 @@
# Building in Ubuntu
Building for Ubuntu platform is remarkably easy.
This document is tested and based on the latest Ubuntu 20.04.03 LTS release and can also be used for WSL(2).
This document is tested and based on the latest Ubuntu 22.04 LTS release and can also be used for WSL(2).
### Clone betaflight repository and install toolchain
@ -16,8 +16,7 @@ This document is tested and based on the latest Ubuntu 20.04.03 LTS release and
Navigate to your local betaflight repository and use the following steps to pull the latest changes and rebuild your version of betaflight:
$ git pull
$ make clean TARGET=MATEKF405
$ make TARGET=MATEKF405 [OPTIONS=RANGEFINDER] [DEBUG=DBG]
$ make MATEKF405 [OPTIONS=RANGEFINDER] [DEBUG=DBG]
Using the optional OPTIONS parameters you can specify options like RANGEFINDER.
Using the optional DEBUG parameter you can specify the debugger.
@ -31,13 +30,13 @@ Make sure to remove `obj/` and `make clean`, before building again.
$ sudo apt update && apt upgrade
$ sudo apt install libatomic1 npm
$ sudo npm install -g gulp-cli yarn
$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh
$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
$ source ~/.bashrc
$ nvm install v14.18.2 (for exact version please check link below)
$ nvm install v16.15.1 (for exact version please check link below)
See [Betaflight Configurator Development](https://github.com/betaflight/betaflight-configurator#development) for how to build the Betaflight Configurator.
### Flashing a target with Betaflight Configurator on Ubuntu 20.04
### Flashing a target with Betaflight Configurator on Ubuntu 22.04
In most Linux distributions the user won't have access to serial interfaces by default. Flashing a target requires configuration of usb for dfu mode. To add this access right type the following command in a terminal:

View file

@ -461,8 +461,8 @@ GTEST_DIR = ../../lib/test/gtest
# Use clang/clang++ by default
CC := clang-10
CXX := clang++-10
CC := clang-12
CXX := clang++-12
ifeq ($(shell which $(CC) 2>/dev/null),)
$(info Falling back to 'clang'.)
CC := clang
@ -472,7 +472,7 @@ endif
#CC := gcc
#CXX := g++
# These flags are needed for clang 10 (linux / MacOS) to make test work:
# These flags are needed for clang > 10 (linux / MacOS) to make test work:
# -Wno-c99-extensions
# -Wno-reorder
@ -495,11 +495,11 @@ CXX_VERSION = $(shell $(CXX) -dumpversion)
ifeq ($(shell $(CC) -v 2>&1 | grep -q "clang version" && echo "clang"),clang)
# Please revisit versions when new clang version arrive. Supported versions: { Linux / OSX: 7 - 13 }
# Please revisit versions when new clang version arrive. Supported versions: { Linux / OSX: 7 - 14 }
# Travis reports CC_VERSION of 4.2.1
CC_VERSION_MAJOR := $(firstword $(subst ., ,$(CC_VERSION)))
CC_VERSION_CHECK_MIN := 7
CC_VERSION_CHECK_MAX := 13
CC_VERSION_CHECK_MAX := 14
# Added flags for clang 11 - 13 are not backwards compatible
ifeq ($(shell expr $(CC_VERSION_MAJOR) \> 10 \& $(CC_VERSION_MAJOR) \< 14), 1)
@ -509,7 +509,7 @@ COMMON_FLAGS += \
endif
ifeq ($(shell expr $(CC_VERSION_MAJOR) \< $(CC_VERSION_CHECK_MIN) \| $(CC_VERSION_MAJOR) \> $(CC_VERSION_CHECK_MAX)),1)
$(error $(CC) $(CC_VERSION) is not supported. The officially supported version of clang is 'clang-10'. If this is not found, 'clang' is used as a fallback. The version of the compiler must be between $(CC_VERSION_CHECK_MIN) and $(CC_VERSION_CHECK_MAX).)
$(error $(CC) $(CC_VERSION) is not supported. The officially supported version of clang is 'clang-12'. If this is not found, 'clang' is used as a fallback. The version of the compiler must be between $(CC_VERSION_CHECK_MIN) and $(CC_VERSION_CHECK_MAX).)
endif
COMMON_FLAGS += -fblocks