Unfortunately, it seems like we've reached the point where our configs are complex enough that a configure script is probably necessary.
Here are some things we'd want to do:
flags to set target arch (fail for architectures that aren't supported yet)
check if we're on the target arch or cross-compiling
figure out which ld to use
if we're on the target arch, use system ld
if cross-compiling, look for the appropriate cross-compiled ld
currently, x86_64-elf-ld is hardcoded in the Makefile currently for building on Mac
check for mkisofs, xorriso, and grub-mkrescue
use whatever is available for building the ISO
once #1 is done
ensure that the appropriate Rust compiler and libstd is there.
if it isn't we could possibly check for https://github.com/brson/multirust and use it to select the appropriate Rust configuration for the selected target
Unfortunately, it seems like we've reached the point where our configs are complex enough that a
configure
script is probably necessary.Here are some things we'd want to do:
ld
to useld
ld
x86_64-elf-ld
is hardcoded in the Makefile currently for building on Macmkisofs
,xorriso
, andgrub-mkrescue