mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-15 20:35:33 +03:00
Merge pull request #11581 from haslinghuis/bump_clang_version
Bump clang version
This commit is contained in:
commit
c8a75bf6d8
5 changed files with 17 additions and 18 deletions
2
.github/workflows/build-release.yml
vendored
2
.github/workflows/build-release.yml
vendored
|
@ -14,7 +14,7 @@ jobs:
|
||||||
release:
|
release:
|
||||||
name: Release
|
name: Release
|
||||||
needs: ci
|
needs: ci
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- name: Code Checkout
|
- name: Code Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
8
.github/workflows/ci.yml
vendored
8
.github/workflows/ci.yml
vendored
|
@ -15,7 +15,7 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
setup:
|
setup:
|
||||||
name: Setup
|
name: Setup
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-22.04
|
||||||
outputs:
|
outputs:
|
||||||
targets: ${{ steps.get-targets.outputs.targets }}
|
targets: ${{ steps.get-targets.outputs.targets }}
|
||||||
steps:
|
steps:
|
||||||
|
@ -39,7 +39,7 @@ jobs:
|
||||||
build:
|
build:
|
||||||
name: Build
|
name: Build
|
||||||
needs: setup
|
needs: setup
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-22.04
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
target: ${{ fromJson(needs.setup.outputs.targets) }}
|
target: ${{ fromJson(needs.setup.outputs.targets) }}
|
||||||
|
@ -71,7 +71,7 @@ jobs:
|
||||||
|
|
||||||
test:
|
test:
|
||||||
name: Test
|
name: Test
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@ jobs:
|
||||||
name: Complete
|
name: Complete
|
||||||
needs: [build, test]
|
needs: [build, test]
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- name: Check build matrix result
|
- name: Check build matrix result
|
||||||
if: ${{ needs.build.result != 'success' }}
|
if: ${{ needs.build.result != 'success' }}
|
||||||
|
|
|
@ -16,7 +16,7 @@ variables:
|
||||||
owner: betaflight
|
owner: betaflight
|
||||||
repoName: betaflight-pull-requests
|
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.**
|
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)
|
name: $(Build.RequestedFor)_$(Build.SourceBranchName)_$(BuildID)
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Building in Ubuntu
|
# Building in Ubuntu
|
||||||
|
|
||||||
Building for Ubuntu platform is remarkably easy.
|
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
|
### 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:
|
Navigate to your local betaflight repository and use the following steps to pull the latest changes and rebuild your version of betaflight:
|
||||||
|
|
||||||
$ git pull
|
$ git pull
|
||||||
$ make clean TARGET=MATEKF405
|
$ make MATEKF405 [OPTIONS=RANGEFINDER] [DEBUG=DBG]
|
||||||
$ make TARGET=MATEKF405 [OPTIONS=RANGEFINDER] [DEBUG=DBG]
|
|
||||||
|
|
||||||
Using the optional OPTIONS parameters you can specify options like RANGEFINDER.
|
Using the optional OPTIONS parameters you can specify options like RANGEFINDER.
|
||||||
Using the optional DEBUG parameter you can specify the debugger.
|
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 update && apt upgrade
|
||||||
$ sudo apt install libatomic1 npm
|
$ sudo apt install libatomic1 npm
|
||||||
$ sudo npm install -g gulp-cli yarn
|
$ 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
|
$ 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.
|
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:
|
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:
|
||||||
|
|
||||||
|
|
|
@ -472,8 +472,8 @@ GTEST_DIR = ../../lib/test/gtest
|
||||||
|
|
||||||
# Use clang/clang++ by default
|
# Use clang/clang++ by default
|
||||||
|
|
||||||
CC := clang-10
|
CC := clang-12
|
||||||
CXX := clang++-10
|
CXX := clang++-12
|
||||||
ifeq ($(shell which $(CC) 2>/dev/null),)
|
ifeq ($(shell which $(CC) 2>/dev/null),)
|
||||||
$(info Falling back to 'clang'.)
|
$(info Falling back to 'clang'.)
|
||||||
CC := clang
|
CC := clang
|
||||||
|
@ -483,7 +483,7 @@ endif
|
||||||
#CC := gcc
|
#CC := gcc
|
||||||
#CXX := g++
|
#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-c99-extensions
|
||||||
# -Wno-reorder
|
# -Wno-reorder
|
||||||
|
|
||||||
|
@ -507,11 +507,11 @@ CXX_VERSION = $(shell $(CXX) -dumpversion)
|
||||||
|
|
||||||
ifeq ($(shell $(CC) -v 2>&1 | grep -q "clang version" && echo "clang"),clang)
|
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
|
# Travis reports CC_VERSION of 4.2.1
|
||||||
CC_VERSION_MAJOR := $(firstword $(subst ., ,$(CC_VERSION)))
|
CC_VERSION_MAJOR := $(firstword $(subst ., ,$(CC_VERSION)))
|
||||||
CC_VERSION_CHECK_MIN := 7
|
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
|
# Added flags for clang 11 - 13 are not backwards compatible
|
||||||
ifeq ($(shell expr $(CC_VERSION_MAJOR) \> 10 \& $(CC_VERSION_MAJOR) \< 14), 1)
|
ifeq ($(shell expr $(CC_VERSION_MAJOR) \> 10 \& $(CC_VERSION_MAJOR) \< 14), 1)
|
||||||
|
@ -521,7 +521,7 @@ COMMON_FLAGS += \
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(shell expr $(CC_VERSION_MAJOR) \< $(CC_VERSION_CHECK_MIN) \| $(CC_VERSION_MAJOR) \> $(CC_VERSION_CHECK_MAX)),1)
|
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
|
endif
|
||||||
|
|
||||||
COMMON_FLAGS += -fblocks
|
COMMON_FLAGS += -fblocks
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue