Small fixes to Makefiles to be able to build the kernel on
macOS again. Details - We are using the toolchain compiler and archiver in order to generate a proper ELF file when building the 'raw-cpuid' crate C code which is currently being compiled by the macOS toolchain. - I added the 'findutils' and 'coreutils' Homebrew/MacPorts packages to the bootstrap script in order to setup the proper environment for the cookbook scripts (as the assume GNU tools). This should be temporary until the cookbook scripts get migrated to Rust.
This commit is contained in:
parent
18c2211db4
commit
8a43b5a3e5
|
@ -93,6 +93,8 @@ osx_macports()
|
||||||
install_macports_pkg "virtualbox"
|
install_macports_pkg "virtualbox"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
install_macports_pkg "coreutils"
|
||||||
|
install_macports_pkg "findutils"
|
||||||
install_macports_pkg "gcc49" "gcc-4.9"
|
install_macports_pkg "gcc49" "gcc-4.9"
|
||||||
install_macports_pkg "nasm"
|
install_macports_pkg "nasm"
|
||||||
install_macports_pkg "pkgconfig"
|
install_macports_pkg "pkgconfig"
|
||||||
|
@ -120,6 +122,8 @@ osx_homebrew()
|
||||||
install_brew_pkg "virtualbox"
|
install_brew_pkg "virtualbox"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
install_macports_pkg "coreutils"
|
||||||
|
install_macports_pkg "findutils"
|
||||||
install_brew_pkg "gcc49" "gcc-4.9"
|
install_brew_pkg "gcc49" "gcc-4.9"
|
||||||
install_brew_pkg "nasm"
|
install_brew_pkg "nasm"
|
||||||
install_brew_pkg "pkg-config"
|
install_brew_pkg "pkg-config"
|
||||||
|
@ -298,7 +302,7 @@ gentoo()
|
||||||
solus()
|
solus()
|
||||||
{
|
{
|
||||||
echo "Detected SolusOS"
|
echo "Detected SolusOS"
|
||||||
|
|
||||||
if [ "$1" == "qemu" ]; then
|
if [ "$1" == "qemu" ]; then
|
||||||
if [ -z "$(which qemu-system-x86_64)" ]; then
|
if [ -z "$(which qemu-system-x86_64)" ]; then
|
||||||
sudo eopkg it qemu
|
sudo eopkg it qemu
|
||||||
|
@ -314,7 +318,7 @@ solus()
|
||||||
echo "Virtualbox already installed!"
|
echo "Virtualbox already installed!"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Installing necessary build tools..."
|
echo "Installing necessary build tools..."
|
||||||
#if guards are not necessary with eopkg since it does nothing if latest version is already installed
|
#if guards are not necessary with eopkg since it does nothing if latest version is already installed
|
||||||
sudo eopkg it fuse-devel git gcc g++ libgcc-32bit libstdc++-32bit nasm make
|
sudo eopkg it fuse-devel git gcc g++ libgcc-32bit libstdc++-32bit nasm make
|
||||||
|
|
|
@ -1,5 +1,10 @@
|
||||||
build/libkernel.a: kernel/Cargo.toml kernel/src/* kernel/src/*/* kernel/src/*/*/* build/initfs.tag
|
build/libkernel.a: kernel/Cargo.toml kernel/src/* kernel/src/*/* kernel/src/*/*/* build/initfs.tag
|
||||||
|
# Temporary fix for https://github.com/redox-os/redox/issues/963 allowing to build on macOS
|
||||||
|
ifeq ($(UNAME),Darwin)
|
||||||
|
cd kernel && CC=$(ARCH)-elf-gcc AR=$(ARCH)-elf-ar CFLAGS=-ffreestanding xargo rustc --lib --target $(KTARGET) --release -- -C soft-float --emit link=../$@
|
||||||
|
else
|
||||||
cd kernel && xargo rustc --lib --target $(KTARGET) --release -- -C soft-float --emit link=../$@
|
cd kernel && xargo rustc --lib --target $(KTARGET) --release -- -C soft-float --emit link=../$@
|
||||||
|
endif
|
||||||
|
|
||||||
build/libkernel_live.a: kernel/Cargo.toml kernel/src/* kernel/src/*/* kernel/src/*/*/* build/initfs.tag build/filesystem.bin
|
build/libkernel_live.a: kernel/Cargo.toml kernel/src/* kernel/src/*/* kernel/src/*/*/* build/initfs.tag build/filesystem.bin
|
||||||
cd kernel && FILESYSTEM="$(PWD)/build/filesystem.bin" xargo rustc --lib --features live --target $(KTARGET) --release -- -C soft-float --emit link=../$@
|
cd kernel && FILESYSTEM="$(PWD)/build/filesystem.bin" xargo rustc --lib --features live --target $(KTARGET) --release -- -C soft-float --emit link=../$@
|
||||||
|
|
Loading…
Reference in a new issue