Comments (2)
Hi Eddie! Glad to hear you've been using the ports successfully!
My raw, personal notes are below. I've updated them on every successful and unsuccessful attempt to build a macOS-hosted cross-compiler. I will note, however, that unsuccessful attempts are much more common than the inverse. If you manage to build a more recent version, I'd love to update the binaries in this repository!
Installation & Build
-
Install required dependencies:
brew install gawk help2man bash gcc
brew reinstall --universal --with-examples gettext
brew link --force gawk gettext -
Build crosstool-ng from source.
git clone https://github.com/crosstool-ng/crosstool-ng.git
cd crosstool-ng
./bootstrap-
This will inform you of any missing dependencies.
-
You may need to modify the first line of this file to read:
/usr/local/bin/bash
./configure --prefix=$SOME_LOCAL_PATH
- I used SOME_LOCAL_PATH=/Users/$user/Local/xtools-ng
make
make install
alias ct-ng=$SOME_LOCAL_PATH/bin/ct-ng -
-
Create two case-sensitive images.
The large volume will be the build directory. The small volume will contain
the finished binaries.A few configuration parameters:
- $large-volume: name to be used for large image (e.g: arch-build)
- $small-volume: name to be used for small image (e.g: arch-tools)
- $large-location: where to store the large image (e.g: arch-build.dmg)
- $small-location: where to store the small image (e.g: arch-tools.dmg)
hdiutil create -type SPARSE -fs 'Case-sensitive Journaled HFS+' -size 16g -volname $large-volume $large-location
hdiutil create -type SPARSE -fs 'Case-sensitive Journaled HFS+' -size 1g -volname $small-volume $small-location
-
Mount the images.
option 1) just
open
the imagesoption 2) hdiutil attach $LOCATION
-
Create the config (in small volume).
This is the hardest part.
Idea is to start with a known working config (see ct-ng list-samples) and
then modify it as desired. For example, for the Raspberry Pi 3:ct-ng aarch64-rpi3-linux-gnueabi
Then use
ct-ng menuconfig
to change things around. In particular, modify
the "Paths" to point to the two volumes that were created.* Local tarballs directory: /Volumes/${large-volume}/src * Working directory: /Volumes/${large-volume}/.build * Prefix directory: /Volumes/${small-volume}/${CT_TARGET}
- Uncheck "render toolchain read-only"
- Ensure
curl
is used for downloads.wget
fails strangely. - Uncheck "add crosstool-ng version to --version output"
-
Create the
src
directory.mkdir /Volumes/${large-volume}/src
-
Build.
ct-ng build
Troubleshooting
Bad Digests
This happens sometimes, for some reason. Just try building again. If that
doesn't work, ct-ng clean
, then try again.
You'll need to have the GNU sha512sum
coreutil installed. This can come from
brew install coreutils
. You'll need to symlink it manually:
sudo ln -s sudo ln -s /usr/local/bin/gsha512sum /usr/local/bin/sha512sum
from homebrew-osxct.
Closing this out, but do let me know if I can be of further help!
from homebrew-osxct.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from homebrew-osxct.