Building on FreeBSD?
Created by: iori-yja
What I want to
I'm considering to build redox-os on FreeBSD and succeeded except fuse
stage.
However, I have some trouble to contribute with the modification. I have suggestions to make modification to be reflected.
Detail of the fix
The modification consists mainly two; one is changing shebangs to #!/usr/bin/env bash
from #!/bin/bash
because FreeBSD places bash on another place (/usr/local/bin/bash
) and the other is adding some pieces of script dealing with each OS in some script (the codes that change its behavior by such if [ "$(uname)" == blah ]...
.
Changing shebangs like that makes bash script works both MacOS, most (don't know exception) Linux distroes and FreeBSD. Also, adding more if
case for other uname
can't be thought to break build on other platforms. So these two changes can be considered safe change.
Problem with doing so and Considerable work-around
However, the submodule dependency is deep, some of depending submodule is not own by redox-os (for example, compiler-rt submodule in redox-os/rust
is of rust
community). Because of this, applying these change to all of submodules are relatively hard. So I have two idea to realize that.
- Make pull requests for all of the repositories that
redox
dealing with. Example: https://github.com/redox-os/libc-artifacts/pull/7/files - Change some codes if needed but except shebang, and add a line in
bootstrap.sh
to change shebangs of all offspring directories aftersubmodule update
1st idea is straight-forward, however, seems harder (due to communication costs), and 2nd one is easy to change but relatively uglier hack.
I think it's good to do 2nd one while 1st one is attempted, and after 1st one is done, then remove code of 2nd one. However, I might be natural that some people don't want such dirty hack is merged even for a while.
I'm glad if you would leave some responses. Thank you.