mirror of
https://github.com/cfenollosa/os-tutorial.git
synced 2024-10-27 20:34:19 +00:00
Merge 96d458cdd2
into ce8e050d24
This commit is contained in:
commit
92be7ba4b7
@ -19,6 +19,7 @@ you didn't do it on lesson 00, and get those packages with `brew install`
|
|||||||
- mpfr
|
- mpfr
|
||||||
- libmpc
|
- libmpc
|
||||||
- gcc
|
- gcc
|
||||||
|
- wget
|
||||||
|
|
||||||
Yes, we will need `gcc` to build our cross-compiled `gcc`, especially on a Mac where gcc has been deprecated for `clang`
|
Yes, we will need `gcc` to build our cross-compiled `gcc`, especially on a Mac where gcc has been deprecated for `clang`
|
||||||
|
|
||||||
@ -54,15 +55,21 @@ cd binutils-build
|
|||||||
make all install 2>&1 | tee make.log
|
make all install 2>&1 | tee make.log
|
||||||
```
|
```
|
||||||
|
|
||||||
|
NOTE: Run this if on mac to substitiute the /usr/include directory
|
||||||
|
```
|
||||||
|
export CPATH="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/"
|
||||||
|
```
|
||||||
|
|
||||||
gcc
|
gcc
|
||||||
---
|
---
|
||||||
```sh
|
```sh
|
||||||
cd /tmp/src
|
cd /tmp/src
|
||||||
curl -O https://ftp.gnu.org/gnu/gcc/gcc-4.9.1/gcc-4.9.1.tar.bz2
|
curl -O https://ftp.gnu.org/gnu/gcc/gcc-12.2.0/gcc-12.2.0.tar.gz
|
||||||
tar xf gcc-4.9.1.tar.bz2
|
tar xf gcc-4.9.1.tar.bz2
|
||||||
mkdir gcc-build
|
mkdir gcc-build
|
||||||
cd gcc-build
|
cd gcc-build
|
||||||
../gcc-4.9.1/configure --target=$TARGET --prefix="$PREFIX" --disable-nls --disable-libssp --enable-languages=c --without-headers
|
../gcc-12.2.0/contrib/download_prerequisites
|
||||||
|
../gcc-12.2.0/configure --target=$TARGET --prefix="$PREFIX" --disable-nls --disable-libssp --enable-languages=c --without-headers
|
||||||
make all-gcc
|
make all-gcc
|
||||||
make all-target-libgcc
|
make all-target-libgcc
|
||||||
make install-gcc
|
make install-gcc
|
||||||
|
Loading…
Reference in New Issue
Block a user