Opened 11 years ago

Closed 9 years ago

#3298 closed enhancement (fixed)

[patch] Make gcc2 and gcc4 build correctly on Mac OS X/Darwin

Reported by: VinDuv Owned by: zooey
Priority: normal Milestone: R1
Component: Build System Version: R1/pre-alpha1
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: yes Platform: All

Description

The attached patch allow gcc2 to be built on Mac OS X.

  • The config.guess patch makes Mac OS X recognized (as FreeBSD) by the configure script.
  • With the Makefile.in patch, the system's makeinfo tool will be used instead of the bundled one (buildtools/gcc/texinfo/makeinfo), which does not work in Mac OS X (segfaults).

Tested on Mac OS X and Linux, should be harmless on systems which don't have makeinfo in /usr/bin.

Attachments (6)

haiku_gcc2_osx.patch (1.3 KB ) - added by VinDuv 11 years ago.
haiku_gcc2_osx_2.patch (94.1 KB ) - added by VinDuv 11 years ago.
buildtools_macosx.patch (94.9 KB ) - added by VinDuv 10 years ago.
Buildtools patch
buildtools_gcc2_config.patch (92.4 KB ) - added by VinDuv 9 years ago.
buildtools patch — gcc2 config.{sub,guess} update
buildtools_gcc2_misc.patch (2.0 KB ) - added by VinDuv 9 years ago.
buildtools patch — gcc2 configuration/build fixes
haiku_macox.patch (661 bytes ) - added by VinDuv 9 years ago.
Haiku configure patch — alternative for missing realpath/readlink -e

Download all attachments as: .zip

Change History (16)

by VinDuv, 11 years ago

Attachment: haiku_gcc2_osx.patch added

comment:1 by scottmc, 11 years ago

Rather than patching config.guess, these should just be replaced with fresh copies from gnulib.

by VinDuv, 11 years ago

Attachment: haiku_gcc2_osx_2.patch added

in reply to:  1 comment:2 by VinDuv, 11 years ago

New patch attached. I used both config.guess and config.sub from gnulib (big jump, 1999 => 2008). I also had to edit buildtools/legacy/gcc/gcc/configure (and configure.in) to make it recognize i386-darwin-gcc.

by VinDuv, 10 years ago

Attachment: buildtools_macosx.patch added

Buildtools patch

comment:3 by VinDuv, 10 years ago

Summary: [patch] Make gcc2 builds correctly on Mac OS X/Darwin[patch] Make gcc2 and gcc4 build correctly on Mac OS X/Darwin

Here is a new patch that fixes building both gcc2 and gcc4 on Snow Leopard. Not yet tested on other platforms though...

comment:4 by nielx, 9 years ago

Has a Patch: unset

comment:5 by nielx, 9 years ago

Has a Patch: set

comment:6 by VinDuv, 9 years ago

Has a Patch: unset

by VinDuv, 9 years ago

buildtools patch — gcc2 config.{sub,guess} update

comment:7 by VinDuv, 9 years ago

Has a Patch: set

by VinDuv, 9 years ago

Attachment: buildtools_gcc2_misc.patch added

buildtools patch — gcc2 configuration/build fixes

by VinDuv, 9 years ago

Attachment: haiku_macox.patch added

Haiku configure patch — alternative for missing realpath/readlink -e

comment:8 by VinDuv, 9 years ago

Here is a new patch made against current Haiku and Mac OS X/Xcode versions.

It was tested on Mac OS X and Linux (and I really don’t expect it to cause any issues on other platforms).

  • buildtools_gcc2_config.patch updates gcc2’s config.{sub,guess} to the 2008-12-19 version. I didn’t use the current version as it detects Mac OS X 10.6 as a 64 bits OS (which causes other configuration problems).
  • buildtools_gcc2_misc.patch adds support for the -darwin targets and fixes some build problems.
  • haiku_macox.patch adds a Perl based realpath support in the configure script. (Mac OS X does not have readlink -e nor realpath commands)

comment:9 by zooey, 9 years ago

Owner: changed from bonefish to zooey
Status: newin-progress

comment:10 by zooey, 9 years ago

Resolution: fixed
Status: in-progressclosed

Applied in hrev38454 - thanks for the patches!

Since I have done a couple of small adjustments, please re-test and give me a shout if I have messed anything up.

Note: See TracTickets for help on using tickets.