Merge branch 'macos-compilation-fixes' into 'master'
A couple of MacOS build fixes See merge request redox-os/redox!1325
This commit is contained in:
		
						commit
						3098e30a04
					
				
					 3 changed files with 12 additions and 5 deletions
				
			
		|  | @ -106,6 +106,8 @@ osx_macports() | ||||||
|     install_macports_pkg "osxfuse" |     install_macports_pkg "osxfuse" | ||||||
|     install_macports_pkg "x86_64-elf-gcc" |     install_macports_pkg "x86_64-elf-gcc" | ||||||
|     install_macports_pkg "cmake" |     install_macports_pkg "cmake" | ||||||
|  |     install_macports_pkg "ninja" | ||||||
|  |     install_macports_pkg "po4a" | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| ############################################################################### | ############################################################################### | ||||||
|  | @ -137,6 +139,8 @@ osx_homebrew() | ||||||
|     install_brew_pkg "gcc@7" "gcc-7" |     install_brew_pkg "gcc@7" "gcc-7" | ||||||
|     install_brew_pkg "pkg-config" |     install_brew_pkg "pkg-config" | ||||||
|     install_brew_pkg "cmake" |     install_brew_pkg "cmake" | ||||||
|  |     install_brew_pkg "ninja" | ||||||
|  |     install_brew_pkg "po4a" | ||||||
|     install_brew_pkg "Caskroom/cask/osxfuse" |     install_brew_pkg "Caskroom/cask/osxfuse" | ||||||
| 
 | 
 | ||||||
|     install_brew_pkg "redox-os/gcc_cross_compilers/x86_64-elf-gcc" "x86_64-elf-gcc" |     install_brew_pkg "redox-os/gcc_cross_compilers/x86_64-elf-gcc" "x86_64-elf-gcc" | ||||||
|  |  | ||||||
|  | @ -23,16 +23,17 @@ CONTAINERFILE?=podman/redox-base-containerfile | ||||||
| # Per host variables
 | # Per host variables
 | ||||||
| # TODO: get host arch automatically
 | # TODO: get host arch automatically
 | ||||||
| HOST_ARCH=x86_64 | HOST_ARCH=x86_64 | ||||||
| HOST_CARGO=env --unset=RUSTUP_TOOLCHAIN cargo | HOST_CARGO=env -u RUSTUP_TOOLCHAIN cargo | ||||||
| UNAME := $(shell uname) | UNAME := $(shell uname) | ||||||
| ifeq ($(UNAME),Darwin) | ifeq ($(UNAME),Darwin) | ||||||
| 	FUMOUNT=sudo umount | 	FUMOUNT=umount | ||||||
| 	export NPROC=sysctl -n hw.ncpu | 	export NPROC=sysctl -n hw.ncpu | ||||||
| 	export REDOX_MAKE=make | 	export REDOX_MAKE=make | ||||||
| 	PREFIX_BINARY=0 | 	PREFIX_BINARY=0 | ||||||
| 	VB_AUDIO=coreaudio | 	VB_AUDIO=coreaudio | ||||||
| 	VBM=/Applications/VirtualBox.app/Contents/MacOS/VBoxManage | 	VBM=/Applications/VirtualBox.app/Contents/MacOS/VBoxManage | ||||||
| 	HOST_TARGET ?= $(HOST_ARCH)-apple-darwin | 	HOST_TARGET ?= $(HOST_ARCH)-apple-darwin | ||||||
|  | 	ALLOC_FILE=truncate -s "$(FILESYSTEM_SIZE)m" | ||||||
| else ifeq ($(UNAME),FreeBSD) | else ifeq ($(UNAME),FreeBSD) | ||||||
| 	FUMOUNT=sudo umount | 	FUMOUNT=sudo umount | ||||||
| 	export NPROC=sysctl -n hw.ncpu | 	export NPROC=sysctl -n hw.ncpu | ||||||
|  | @ -41,6 +42,7 @@ else ifeq ($(UNAME),FreeBSD) | ||||||
| 	VB_AUDIO=pulse # To check, will probaly be OSS on most setups | 	VB_AUDIO=pulse # To check, will probaly be OSS on most setups | ||||||
| 	VBM=VBoxManage | 	VBM=VBoxManage | ||||||
| 	HOST_TARGET ?= $(HOST_ARCH)-unknown-freebsd | 	HOST_TARGET ?= $(HOST_ARCH)-unknown-freebsd | ||||||
|  | 	ALLOC_FILE=fallocate --posix --length "$(FILESYSTEM_SIZE)MiB" | ||||||
| else | else | ||||||
| 	# Detect which version of the fusermount binary is available. | 	# Detect which version of the fusermount binary is available. | ||||||
| 	ifneq (, $(shell which fusermount3)) | 	ifneq (, $(shell which fusermount3)) | ||||||
|  | @ -54,6 +56,7 @@ else | ||||||
| 	VB_AUDIO=pulse | 	VB_AUDIO=pulse | ||||||
| 	VBM=VBoxManage | 	VBM=VBoxManage | ||||||
| 	HOST_TARGET ?= $(HOST_ARCH)-unknown-linux-gnu | 	HOST_TARGET ?= $(HOST_ARCH)-unknown-linux-gnu | ||||||
|  | 	ALLOC_FILE=fallocate --posix --length "$(FILESYSTEM_SIZE)MiB" | ||||||
| endif | endif | ||||||
| 
 | 
 | ||||||
| # Automatic variables
 | # Automatic variables
 | ||||||
|  |  | ||||||
|  | @ -2,7 +2,7 @@ $(BUILD)/harddrive.img: $(FSTOOLS_TAG) $(REPO_TAG) | ||||||
| 	mkdir -p $(BUILD) | 	mkdir -p $(BUILD) | ||||||
| 	rm -rf $@  $@.partial | 	rm -rf $@  $@.partial | ||||||
| 	-$(FUMOUNT) /tmp/redox_installer || true | 	-$(FUMOUNT) /tmp/redox_installer || true | ||||||
| 	fallocate --posix --length "$(FILESYSTEM_SIZE)MiB" $@.partial | 	${ALLOC_FILE} $@.partial | ||||||
| 	umask 002 && $(INSTALLER) -c $(FILESYSTEM_CONFIG) $@.partial | 	umask 002 && $(INSTALLER) -c $(FILESYSTEM_CONFIG) $@.partial | ||||||
| 	mv $@.partial $@ | 	mv $@.partial $@ | ||||||
| 
 | 
 | ||||||
|  | @ -10,7 +10,7 @@ $(BUILD)/livedisk.iso: $(FSTOOLS_TAG) $(REPO_TAG) | ||||||
| 	mkdir -p $(BUILD) | 	mkdir -p $(BUILD) | ||||||
| 	rm -rf $@  $@.partial | 	rm -rf $@  $@.partial | ||||||
| 	-$(FUMOUNT) /tmp/redox_installer || true | 	-$(FUMOUNT) /tmp/redox_installer || true | ||||||
| 	fallocate --posix --length "$(FILESYSTEM_SIZE)MiB" $@.partial | 	${ALLOC_FILE} $@.partial | ||||||
| 	umask 002 && $(INSTALLER) -c $(FILESYSTEM_CONFIG) --live $@.partial | 	umask 002 && $(INSTALLER) -c $(FILESYSTEM_CONFIG) --live $@.partial | ||||||
| 	mv $@.partial $@ | 	mv $@.partial $@ | ||||||
| 
 | 
 | ||||||
|  | @ -19,7 +19,7 @@ $(BUILD)/filesystem.img: $(FSTOOLS_TAG) $(REPO_TAG) | ||||||
| 	-$(FUMOUNT) $(BUILD)/filesystem/ || true | 	-$(FUMOUNT) $(BUILD)/filesystem/ || true | ||||||
| 	rm -rf $@  $@.partial $(BUILD)/filesystem/ | 	rm -rf $@  $@.partial $(BUILD)/filesystem/ | ||||||
| 	-$(FUMOUNT) /tmp/redox_installer || true | 	-$(FUMOUNT) /tmp/redox_installer || true | ||||||
| 	fallocate --posix --length "$(FILESYSTEM_SIZE)MiB" $@.partial | 	${ALLOC_FILE} $@.partial | ||||||
| 	redoxfs/target/release/redoxfs-mkfs $(REDOXFS_MKFS_FLAGS) $@.partial | 	redoxfs/target/release/redoxfs-mkfs $(REDOXFS_MKFS_FLAGS) $@.partial | ||||||
| 	mkdir -p $(BUILD)/filesystem/ | 	mkdir -p $(BUILD)/filesystem/ | ||||||
| 	redoxfs/target/release/redoxfs $@.partial $(BUILD)/filesystem/ | 	redoxfs/target/release/redoxfs $@.partial $(BUILD)/filesystem/ | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Jeremy Soller
						Jeremy Soller