Attempt to fix builds on OS X

This commit is contained in:
Jeremy Soller 2017-01-02 14:46:23 -07:00
parent 9e63156c09
commit 6205765d07
2 changed files with 18 additions and 20 deletions

View file

@ -5,6 +5,7 @@ rust:
cache: cargo
os:
- linux
- osx
dist: trusty
before_install:
- if [ `uname` = "Linux" ]; then
@ -14,9 +15,7 @@ before_install:
sudo chown root:$USER /etc/fuse.conf;
fi
- if [ `uname` = "Darwin" ]; then brew update &&
brew install nasm gcc49 pkg-config Caskroom/cask/osxfuse &&
brew tap glendc/gcc_cross_compilers &&
brew install glendc/gcc_cross_compilers/x64-elf-binutils glendc/gcc_cross_compilers/x64-elf-gcc;
brew install nasm gcc49 pkg-config Caskroom/cask/osxfuse djphoenix/gcc_cross_compilers/x86_64-elf-gcc;
fi
script:
- make clean &&

View file

@ -4,7 +4,7 @@
# This function is simply a banner to introduce the script
##########################################################
banner()
{
{
echo "|------------------------------------------|"
echo "|----- Welcome to the redox bootstrap -----|"
echo "|------------------------------------------|"
@ -129,8 +129,7 @@ osx_homebrew()
install_brew_pkg "pkg-config"
install_brew_cask_pkg "osxfuse"
install_brew_pkg "glendc/gcc_cross_compilers/x64-elf-binutils" "x86_64-elf-gcc"
install_brew_pkg "glendc/gcc_cross_compilers/x64-elf-gcc" "x86_64-elf-gcc"
install_brew_pkg "djphoenix/gcc_cross_compilers/x86_64-elf-gcc"
}
###############################################################################
@ -171,7 +170,7 @@ archLinux()
# This function takes care of installing all dependencies for building redox on
# debian based linux
# @params: $1 the emulator to install, virtualbox or qemu
# $2 the package manager to use
# $2 the package manager to use
###############################################################################
ubuntu()
{
@ -348,7 +347,7 @@ usage()
echo " -e [emulator] Install specific emulator, virtualbox or qemu"
echo " -p [package Choose an Ubuntu package manager, apt-fast or"
echo " manager] aptitude"
echo " -d Only install the dependencies, skip boot step"
echo " -d Only install the dependencies, skip boot step"
echo "EXAMPLES:"
echo
echo "./bootstrap.sh -b buddy -e qemu"
@ -357,7 +356,7 @@ usage()
####################################################################################
# This function takes care of everything associated to rust, and the version manager
# That controls it, it can install rustup and uninstall multirust as well as making
# That controls it, it can install rustup and uninstall multirust as well as making
# sure that the correct version of rustc is selected by rustup
####################################################################################
rustInstall() {
@ -370,7 +369,7 @@ rustInstall() {
printf "Uninstall multirust (y/N):"
read multirust
if echo "$multirust" | grep -iq "^y" ;then
sudo /usr/local/lib/rustlib/uninstall.sh
sudo /usr/local/lib/rustlib/uninstall.sh
else
echo "Please manually uninstall multirust and any other versions of rust, then re-run bootstrap."
exit
@ -378,7 +377,7 @@ rustInstall() {
else
echo "Old multirust not installed, you are good to go."
fi
# If rustup is not installed we should offer to install it for them
# If rustup is not installed we should offer to install it for them
if [ -z "$(which rustup)" ]; then
echo "You do not have rustup installed."
echo "We HIGHLY reccomend using rustup."
@ -389,22 +388,22 @@ rustInstall() {
if echo "$rustup" | grep -iq "^y" ;then
#install rustup
curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain nightly
# You have to add the rustup variables to the $PATH
# You have to add the rustup variables to the $PATH
echo "export PATH=\"\$HOME/.cargo/bin:\$PATH\"" >> ~/.bashrc
# source the variables so that we can execute rustup commands in the current shell
source ~/.cargo/env
source ~/.cargo/env
rustup default nightly
else
echo "Rustup will not be installed!"
fi
fi
#
fi
#
if [ -z "$(which rustc)" ]; then
echo "Rust is not installed"
echo "Please either run the script again, accepting rustup install"
echo "or install rustc nightly manually (not reccomended) via:"
echo "\#curl -sSf https://static.rust-lang.org/rustup.sh | sh -s -- --channel=nightly"
exit
exit
fi
# If the system has rustup installed then update rustc to the latest nightly
if hash 2>/dev/null rustup; then
@ -425,7 +424,7 @@ rustInstall() {
}
####################################################################
# This function gets the current build status from travis and prints
# This function gets the current build status from travis and prints
# a message to the user
####################################################################
statusCheck() {
@ -440,7 +439,7 @@ statusCheck() {
echo "********************************************"
elif echo "$i" | grep -iq "null" ;then
echo
echo "******************************************************************"
echo "******************************************************************"
echo "The Travis build did not finish, this is an error with its config."
echo "I cannot reliably determine whether the build is succeding or not."
echo "Consider checking for and maybe opening an issue on github"
@ -463,7 +462,7 @@ statusCheck() {
boot()
{
echo "Cloning github repo..."
git clone https://github.com/redox-os/redox.git --origin upstream --recursive
git clone https://github.com/redox-os/redox.git --origin upstream --recursive
rustInstall
echo "Cleaning up..."
rm bootstrap.sh
@ -511,7 +510,7 @@ banner
if [ "Darwin" == "$(uname -s)" ]; then
osx "$emulator"
else
# Here we will user package managers to determine which operating system the user is using
# Here we will user package managers to determine which operating system the user is using
# Arch linux
if hash 2>/dev/null pacman; then
archLinux "$emulator"