Attempt to fix builds on OS X
This commit is contained in:
parent
9e63156c09
commit
6205765d07
|
@ -5,6 +5,7 @@ rust:
|
||||||
cache: cargo
|
cache: cargo
|
||||||
os:
|
os:
|
||||||
- linux
|
- linux
|
||||||
|
- osx
|
||||||
dist: trusty
|
dist: trusty
|
||||||
before_install:
|
before_install:
|
||||||
- if [ `uname` = "Linux" ]; then
|
- if [ `uname` = "Linux" ]; then
|
||||||
|
@ -14,9 +15,7 @@ before_install:
|
||||||
sudo chown root:$USER /etc/fuse.conf;
|
sudo chown root:$USER /etc/fuse.conf;
|
||||||
fi
|
fi
|
||||||
- if [ `uname` = "Darwin" ]; then brew update &&
|
- if [ `uname` = "Darwin" ]; then brew update &&
|
||||||
brew install nasm gcc49 pkg-config Caskroom/cask/osxfuse &&
|
brew install nasm gcc49 pkg-config Caskroom/cask/osxfuse djphoenix/gcc_cross_compilers/x86_64-elf-gcc;
|
||||||
brew tap glendc/gcc_cross_compilers &&
|
|
||||||
brew install glendc/gcc_cross_compilers/x64-elf-binutils glendc/gcc_cross_compilers/x64-elf-gcc;
|
|
||||||
fi
|
fi
|
||||||
script:
|
script:
|
||||||
- make clean &&
|
- make clean &&
|
||||||
|
|
33
bootstrap.sh
33
bootstrap.sh
|
@ -4,7 +4,7 @@
|
||||||
# This function is simply a banner to introduce the script
|
# This function is simply a banner to introduce the script
|
||||||
##########################################################
|
##########################################################
|
||||||
banner()
|
banner()
|
||||||
{
|
{
|
||||||
echo "|------------------------------------------|"
|
echo "|------------------------------------------|"
|
||||||
echo "|----- Welcome to the redox bootstrap -----|"
|
echo "|----- Welcome to the redox bootstrap -----|"
|
||||||
echo "|------------------------------------------|"
|
echo "|------------------------------------------|"
|
||||||
|
@ -129,8 +129,7 @@ osx_homebrew()
|
||||||
install_brew_pkg "pkg-config"
|
install_brew_pkg "pkg-config"
|
||||||
install_brew_cask_pkg "osxfuse"
|
install_brew_cask_pkg "osxfuse"
|
||||||
|
|
||||||
install_brew_pkg "glendc/gcc_cross_compilers/x64-elf-binutils" "x86_64-elf-gcc"
|
install_brew_pkg "djphoenix/gcc_cross_compilers/x86_64-elf-gcc"
|
||||||
install_brew_pkg "glendc/gcc_cross_compilers/x64-elf-gcc" "x86_64-elf-gcc"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
@ -171,7 +170,7 @@ archLinux()
|
||||||
# This function takes care of installing all dependencies for building redox on
|
# This function takes care of installing all dependencies for building redox on
|
||||||
# debian based linux
|
# debian based linux
|
||||||
# @params: $1 the emulator to install, virtualbox or qemu
|
# @params: $1 the emulator to install, virtualbox or qemu
|
||||||
# $2 the package manager to use
|
# $2 the package manager to use
|
||||||
###############################################################################
|
###############################################################################
|
||||||
ubuntu()
|
ubuntu()
|
||||||
{
|
{
|
||||||
|
@ -348,7 +347,7 @@ usage()
|
||||||
echo " -e [emulator] Install specific emulator, virtualbox or qemu"
|
echo " -e [emulator] Install specific emulator, virtualbox or qemu"
|
||||||
echo " -p [package Choose an Ubuntu package manager, apt-fast or"
|
echo " -p [package Choose an Ubuntu package manager, apt-fast or"
|
||||||
echo " manager] aptitude"
|
echo " manager] aptitude"
|
||||||
echo " -d Only install the dependencies, skip boot step"
|
echo " -d Only install the dependencies, skip boot step"
|
||||||
echo "EXAMPLES:"
|
echo "EXAMPLES:"
|
||||||
echo
|
echo
|
||||||
echo "./bootstrap.sh -b buddy -e qemu"
|
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
|
# 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
|
# sure that the correct version of rustc is selected by rustup
|
||||||
####################################################################################
|
####################################################################################
|
||||||
rustInstall() {
|
rustInstall() {
|
||||||
|
@ -370,7 +369,7 @@ rustInstall() {
|
||||||
printf "Uninstall multirust (y/N):"
|
printf "Uninstall multirust (y/N):"
|
||||||
read multirust
|
read multirust
|
||||||
if echo "$multirust" | grep -iq "^y" ;then
|
if echo "$multirust" | grep -iq "^y" ;then
|
||||||
sudo /usr/local/lib/rustlib/uninstall.sh
|
sudo /usr/local/lib/rustlib/uninstall.sh
|
||||||
else
|
else
|
||||||
echo "Please manually uninstall multirust and any other versions of rust, then re-run bootstrap."
|
echo "Please manually uninstall multirust and any other versions of rust, then re-run bootstrap."
|
||||||
exit
|
exit
|
||||||
|
@ -378,7 +377,7 @@ rustInstall() {
|
||||||
else
|
else
|
||||||
echo "Old multirust not installed, you are good to go."
|
echo "Old multirust not installed, you are good to go."
|
||||||
fi
|
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
|
if [ -z "$(which rustup)" ]; then
|
||||||
echo "You do not have rustup installed."
|
echo "You do not have rustup installed."
|
||||||
echo "We HIGHLY reccomend using rustup."
|
echo "We HIGHLY reccomend using rustup."
|
||||||
|
@ -389,22 +388,22 @@ rustInstall() {
|
||||||
if echo "$rustup" | grep -iq "^y" ;then
|
if echo "$rustup" | grep -iq "^y" ;then
|
||||||
#install rustup
|
#install rustup
|
||||||
curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain nightly
|
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
|
echo "export PATH=\"\$HOME/.cargo/bin:\$PATH\"" >> ~/.bashrc
|
||||||
# source the variables so that we can execute rustup commands in the current shell
|
# source the variables so that we can execute rustup commands in the current shell
|
||||||
source ~/.cargo/env
|
source ~/.cargo/env
|
||||||
rustup default nightly
|
rustup default nightly
|
||||||
else
|
else
|
||||||
echo "Rustup will not be installed!"
|
echo "Rustup will not be installed!"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
#
|
#
|
||||||
if [ -z "$(which rustc)" ]; then
|
if [ -z "$(which rustc)" ]; then
|
||||||
echo "Rust is not installed"
|
echo "Rust is not installed"
|
||||||
echo "Please either run the script again, accepting rustup install"
|
echo "Please either run the script again, accepting rustup install"
|
||||||
echo "or install rustc nightly manually (not reccomended) via:"
|
echo "or install rustc nightly manually (not reccomended) via:"
|
||||||
echo "\#curl -sSf https://static.rust-lang.org/rustup.sh | sh -s -- --channel=nightly"
|
echo "\#curl -sSf https://static.rust-lang.org/rustup.sh | sh -s -- --channel=nightly"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
# If the system has rustup installed then update rustc to the latest nightly
|
# If the system has rustup installed then update rustc to the latest nightly
|
||||||
if hash 2>/dev/null rustup; then
|
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
|
# a message to the user
|
||||||
####################################################################
|
####################################################################
|
||||||
statusCheck() {
|
statusCheck() {
|
||||||
|
@ -440,7 +439,7 @@ statusCheck() {
|
||||||
echo "********************************************"
|
echo "********************************************"
|
||||||
elif echo "$i" | grep -iq "null" ;then
|
elif echo "$i" | grep -iq "null" ;then
|
||||||
echo
|
echo
|
||||||
echo "******************************************************************"
|
echo "******************************************************************"
|
||||||
echo "The Travis build did not finish, this is an error with its config."
|
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 "I cannot reliably determine whether the build is succeding or not."
|
||||||
echo "Consider checking for and maybe opening an issue on github"
|
echo "Consider checking for and maybe opening an issue on github"
|
||||||
|
@ -463,7 +462,7 @@ statusCheck() {
|
||||||
boot()
|
boot()
|
||||||
{
|
{
|
||||||
echo "Cloning github repo..."
|
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
|
rustInstall
|
||||||
echo "Cleaning up..."
|
echo "Cleaning up..."
|
||||||
rm bootstrap.sh
|
rm bootstrap.sh
|
||||||
|
@ -511,7 +510,7 @@ banner
|
||||||
if [ "Darwin" == "$(uname -s)" ]; then
|
if [ "Darwin" == "$(uname -s)" ]; then
|
||||||
osx "$emulator"
|
osx "$emulator"
|
||||||
else
|
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
|
# Arch linux
|
||||||
if hash 2>/dev/null pacman; then
|
if hash 2>/dev/null pacman; then
|
||||||
archLinux "$emulator"
|
archLinux "$emulator"
|
||||||
|
|
Loading…
Reference in a new issue