Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#8705 closed enhancement (fixed)

[PATCH] Fix Mac OS X 10.7 build platform

Reported by: xyzzy Owned by: bonefish
Priority: normal Milestone: R1
Component: Build System Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

Mac OS X 10.7 is currently broken as a build platform. The attached patch fixes all issues I have encountered with it and allows a GCC4 image to be built (I have not yet tested GCC2). The changes are as follows:

  • 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.
  • Conditionally disable an alias that is not supported on OS X.
  • 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.

Additionally, the prerequisite installation guide on haiku-os.org needs to be changed. The following command should install all the prerequisites from MacPorts:

sudo port install cdrtools gawk gnuregex wget yasm lesskey mpfr gmp libmpc libiconv

Attachments (1)

fix-os-x-build-platform.patch (2.7 KB ) - added by xyzzy 12 years ago.
Patch to fix Mac OS X build platform

Download all attachments as: .zip

Change History (6)

comment:1 by xyzzy, 12 years ago

patch: 01

comment:2 by bonefish, 12 years ago

Looks OK. A few suggestions for changes, though:

  • A comment on why gcc is hard-coded for Darwin.
  • As I see it the FS case sensitivity check is now platform independent and given that there are other case insensitive FSs, I'd do the check on all platforms.
  • If delete_driver_settings() isn't defined as alias, it should be defined as a function. I suppose it works just to omit it, because it isn't used in build platform code ATM.

I almost wrote: "Please commit." before recalling that you don't have commit access yet. I guess it's time to remedy that.

by xyzzy, 12 years ago

Patch to fix Mac OS X build platform

comment:3 by xyzzy, 12 years ago

OK, made those changes. I'd made that change for the alias while the host tools were being compiled with clang, turns out that GCC actually has no issue with it, so I've reverted that change. I also made some changes to the build instructions in ReadMe (there's a mistake in the package list I included above, lesskey should be just less - the less included with OS X doesn't have lesskey).

I tested a GCC 2 build, I'm running into this: http://www.freelists.org/post/haiku-development/gcc2953,18. It's really quite strange that this only happens with a GCC 2 built on OS X. I wondered if it was due to llvm-gcc miscompiling it, but I get the same problem if I compile GCC with both standard GCC and clang. Not sure what to do about it.

I'll commit if I get commit access :)

comment:4 by xyzzy, 12 years ago

Resolution: fixed
Status: newclosed

comment:5 by axeld, 12 years ago

Fixed in hrev44302. Please always mention the revision this way, so one can see the diff directly.

Note: See TracTickets for help on using tickets.