Fixed Mac OS X 10.7 as a build platform (for GCC 4).

* Use gcc and g++ rather than cc and c++, as the latter now point to
  clang with recent Xcode versions and compilation of the host tools
  fail for various reasons with it.
* Replace the case-sensitive filesystem check with a more basic one,
  as diskutil no longer supports the behaviour of getting info for the
  volume that any path is on.
* Updated ReadMe with a correct list of prerequisites for OS X.
* GCC 2 builds are still broken due to a strange error that only
  occurs with a GCC 2 built on OS X 10.7
This commit is contained in:
Alex Smith 2012-07-10 19:33:39 +01:00
parent f4eb5cf7e1
commit 0962132cc6
3 changed files with 25 additions and 8 deletions

7
ReadMe
View File

@ -75,6 +75,13 @@ The following darwin ports need to be installed:
* libiconv
* gnuregex
* gsed
* cdrtools
* yasm
* wget
* less
* mpfr
* gmp
* libmpc
More information about individual distributions of Linux and BSD can be found
at http://haiku-os.org/guides/building/pre-reqs

View File

@ -609,6 +609,13 @@ if $(HOST_PLATFORM) = linux || $(HOST_PLATFORM) = freebsd
}
}
# On recent versions of OS X cc and c++ point to clang, which fails to
# compile some of the host tools. As a workaround, force use of GCC.
if $(HOST_PLATFORM) = darwin {
HOST_CC = gcc ;
HOST_C++ = g++ ;
}
if $(HOST_PLATFORM) = cygwin {
HOST_LINKFLAGS += -Xlinker --allow-multiple-definition -Xlinker
--enable-auto-import ;

19
configure vendored
View File

@ -471,15 +471,18 @@ for sfdiskDir in /sbin /usr/sbin /usr/local/sbin ; do
fi
done
# check for case-sensitive filesystem if on darwin
if [ $HOST_PLATFORM = "darwin" ]; then
diskutil info $(pwd)/.. | grep -i "case-sensitive" > /dev/null
if [ $? != 0 ]; then
echo "You need a case-sensitive file-system to build Haiku."
echo "Please see the following guide on how to set one up:"
echo "http://haiku-os.org/documents/dev/how_to_build_haiku_on_mac_os_x"
exit 1
# check for case-sensitive filesystem
mkdir haikuCaseTest 2>/dev/null
mkdir haikucasetest 2>/dev/null
caseInsensitive=$?
rm -df haikuCaseTest haikucasetest
if [ $caseInsensitive != 0 ]; then
echo "You need a case-sensitive file-system to build Haiku."
if [ $HOST_PLATFORM = "darwin" ]; then
echo "You can create a case-sensitive disk image using Disk Utility and use"
echo "it to store the Haiku sources on."
fi
exit 1
fi
# create output directory