mirror of
https://github.com/commaai/panda.git
synced 2026-06-11 22:55:01 +08:00
macOS: use homebrew gcc using version suffix. update setup instructions (#1409)
* Add version suffix to gcc on Darwin * Update macos setup intructions * Delete unused SConscript at tests/ * Move gcc stuff to tests/libpanda/SConscript
This commit is contained in:
@@ -20,8 +20,8 @@ sudo apt-get install dfu-util gcc-arm-none-eabi python3-pip libffi-dev git
|
||||
```
|
||||
```bash
|
||||
# macOS
|
||||
brew tap ArmMbed/homebrew-formulae
|
||||
brew install python dfu-util arm-none-eabi-gcc gcc@12
|
||||
brew install --cask gcc-arm-embedded
|
||||
brew install python3 dfu-util gcc@12
|
||||
```
|
||||
|
||||
Clone panda repository:
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
import platform
|
||||
|
||||
CC = 'gcc'
|
||||
system = platform.system()
|
||||
if system == 'Darwin':
|
||||
# gcc installed by homebrew has version suffix (e.g. gcc-12) in order to be
|
||||
# distinguishable from system one - which acts as a symlink to clang
|
||||
CC += '-12'
|
||||
|
||||
env = Environment(
|
||||
CC='gcc',
|
||||
CC=CC,
|
||||
CFLAGS=[
|
||||
'-nostdlib',
|
||||
'-fno-builtin',
|
||||
@@ -8,7 +17,8 @@ env = Environment(
|
||||
],
|
||||
CPPPATH=[".", "../../board/"],
|
||||
)
|
||||
env.PrependENVPath('PATH', '/opt/homebrew/bin')
|
||||
if system == "Darwin":
|
||||
env.PrependENVPath('PATH', '/opt/homebrew/bin')
|
||||
|
||||
if GetOption('ubsan'):
|
||||
flags = [
|
||||
|
||||
Reference in New Issue
Block a user