~/$ sw_vers
ProductName: macOS
ProductVersion: 12.2
BuildVersion: 21D49
1. GNU GCC
brew install gcc
ln -s /opt/homebrew/bin/gcc-11 /opt/homebrew/bin/gcc
ln -s /opt/homebrew/bin/g++-11 /opt/homebrew/bin/g++
export PATH=$HOME/bin:/usr/local/bin:/opt/homebrew/bin:$PATH
~/$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/opt/homebrew/Cellar/gcc/11.2.0_3/bin/../libexec/gcc/aarch64-apple-darwin21/11/lto-wrapper
Target: aarch64-apple-darwin21
Configured with: ../configure --prefix=/opt/homebrew/opt/gcc --libdir=/opt/homebrew/opt/gcc/lib/gcc/11 --disable-nls --enable-checking=release --with-gcc-major-version-only --enable-languages=c,c++,objc,obj-c++,fortran --program-suffix=-11 --with-gmp=/opt/homebrew/opt/gmp --with-mpfr=/opt/homebrew/opt/mpfr --with-mpc=/opt/homebrew/opt/libmpc --with-isl=/opt/homebrew/opt/isl --with-zstd=/opt/homebrew/opt/zstd --with-pkgversion='Homebrew GCC 11.2.0_3' --with-bugurl=https://github.com/Homebrew/homebrew-core/issues --build=aarch64-apple-darwin21 --with-system-zlib --with-native-system-header-dir=/usr/include --with-sysroot=/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.2.0 (Homebrew GCC 11.2.0_3)
2. Bear
brew install bear
bear -- make
'Mac M1' 카테고리의 다른 글
nvim 설정 (0) | 2023.03.11 |
---|---|
Apple M1 Mac에서 Arm(aarch64) 리눅스용 프로그램 빌드하기 (0) | 2022.01.23 |
Mac M1 개발환경 구성하기 (0) | 2022.01.23 |