[haiku-development] Re: GCC 2.95.x on Mac OS X Intel (10.5.x)
- From: Keven Tipping <bytelogix@xxxxxxx>
- To: haiku-development@xxxxxxxxxxxxx
- Date: Wed, 17 Sep 2008 01:37:25 -0600
Alright.
I've solved the makeinfo segfault issue. Everything appears to be
running just fine under OS X 10.5 Intel, using GCC2.
I would like to recommend the following changes to buildtools SVN:
1) Add the following lines to various files in buildtools/legacy/gcc/*
to allow for compiling on Mac OS X Intel.
+++ ./buildtools/legacy/gcc/config.guess 2008-09-16 22:17:01.000000000
-0600
@@ -519,6 +519,9 @@
i?86:BSD/386:*:* | *:BSD/OS:*:*)
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
exit 0 ;;
+ *:Darwin:*:*)
+ echo ${UNAME_MACHINE}-apple-darwin${UNAME_RELEASE}
+ exit 0 ;;
*:FreeBSD:*:*)
if test -x /usr/bin/objformat -a "elf" = "`/usr/bin/
objformat`"; then
echo ${UNAME_MACHINE}-unknown-freebsdelf
+++ ./buildtools/legacy/gcc/config.sub 2008-09-16 22:16:28.000000000
-0600
@@ -937,7 +937,7 @@
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
- | -interix* | -uwin* | -haiku* )
+ | -interix* | -uwin* | -haiku* | -darwin* )
# Remember, each alternative MUST END IN *, to match a version
number.
;;
# EGCS LOCAL
+++ ./buildtools/legacy/gcc/configure.in 2008-09-16 22:18:03.000000000
-0600
@@ -1206,6 +1206,12 @@
tmake_file=t-freebsd
;;
changequote(,)dnl
+ i[34567]86-*-darwin*)
+changequote([,])dnl
+ tm_file=i386/freebsd.h
+ tmake_file=t-freebsd
+ ;;
+changequote(,)dnl
i[34567]86-*-netbsd*)
changequote([,])dnl
tm_file=i386/netbsd.h
2) Remove the folder buildtools/legacy/gcc/texinfo
Makefile.in (under buildtools/legacy/gcc) is currently setup to check
for the presence of the texinfo folder under legacy/gcc. If it is
present, it attempts to compile and use the version of makeinfo found
under here. This version of makeinfo appears to be outdated and
immediately segfaults on Mac OS X.
Makefile.in, if it cannot find the texinfo folder, instructs the GCC2
build to use the makeinfo command as installed on the host system
(somewhere residing under $PATH). Since most build OS's have native
texinfo packages via their various package managers (Macports for OS
X)- Makefile.in will use the host system makeinfo binary instead of
attempting to compile the version in legacy/gcc/texinfo.
I have confirmed that removing the texinfo folder from legacy/gcc does
indeed cause Makefile.in to use the host system binary (in my case,
installed under /opt/local/bin- which is part of $PATH), and the GCC2
build continues normally and successfully generates the *.info files
when makeinfo is called.
Unless there's an important reason for including texinfo with legacy/
gcc, I think it would be better to just remove it and update any
relevant documents to include texinfo as a part of the pre-requisites
on the host for building Haiku's cross-tools.
Cheers.
-KT
On Sep 16, 2008, at 11:19 AM, Michael Pfeiffer wrote:
Am 16.09.2008 um 07:25 schrieb Keven Tipping:
First- add the following lines to buildtools/legacy/gcc/config.guess:
*:Darwin:*:*)
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e
's/[-_].*//'`
exit 0 ;;
Right before or after the *:FreeBSD:*:*) statement. Yes, I'm aware
this is effectively making GCC think we're building on a host
running FreeBSD, but Darwin is close enough- and it worked just fine.
Second- I had to clear out any content in buildtools/legacy/gcc/gcc/
*.texi.
This did not work for me, it still complained that it could not
build a .info file, after removing the info stuff from buildtools/
legacy/gcc/gcc/Makefile.in (see diff below) building the VMWare
image works too. Yippee! That way it is not necessary to delete the
*.texi files, BTW.
- Michael
Index: Makefile.in
===================================================================
--- Makefile.in (revision 27586)
+++ Makefile.in (working copy)
@@ -2266,7 +2266,8 @@
#
# Remake the info files.
-doc: info
+doc:
+
info: cpp.info gcc.info lang.info
cpp.info: $(srcdir)/cpp.texi
@@ -2435,7 +2436,7 @@
# Install the driver last so that the window when things are
# broken is small.
install-normal: install-common $(INSTALL_HEADERS) $(INSTALL_LIBGCC) \
- $(INSTALL_CPP) install-man install-info intl.install
lang.install-normal \
+ $(INSTALL_CPP) install-man intl.install lang.install-normal \
install-driver
- References:
- [haiku-development] GCC 2.95.x on Mac OS X Intel (10.5.x)
- From: Keven Tipping
- [haiku-development] Re: GCC 2.95.x on Mac OS X Intel (10.5.x)
- From: Michael Pfeiffer
Other related posts:
- » [haiku-development] GCC 2.95.x on Mac OS X Intel (10.5.x)
- » [haiku-development] Re: GCC 2.95.x on Mac OS X Intel (10.5.x)
- » [haiku-development] Re: GCC 2.95.x on Mac OS X Intel (10.5.x)
- » [haiku-development] Re: GCC 2.95.x on Mac OS X Intel (10.5.x)
- » [haiku-development] Re: GCC 2.95.x on Mac OS X Intel (10.5.x)
- » [haiku-development] Re: GCC 2.95.x on Mac OS X Intel (10.5.x)
- » [haiku-development] Re: GCC 2.95.x on Mac OS X Intel (10.5.x)
Am 16.09.2008 um 07:25 schrieb Keven Tipping:
First- add the following lines to buildtools/legacy/gcc/config.guess: *:Darwin:*:*)echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*//'`exit 0 ;;Right before or after the *:FreeBSD:*:*) statement. Yes, I'm aware this is effectively making GCC think we're building on a host running FreeBSD, but Darwin is close enough- and it worked just fine.Second- I had to clear out any content in buildtools/legacy/gcc/gcc/ *.texi.
This did not work for me, it still complained that it could not build a .info file, after removing the info stuff from buildtools/ legacy/gcc/gcc/Makefile.in (see diff below) building the VMWare image works too. Yippee! That way it is not necessary to delete the *.texi files, BTW.
- Michael Index: Makefile.in =================================================================== --- Makefile.in (revision 27586) +++ Makefile.in (working copy) @@ -2266,7 +2266,8 @@ # # Remake the info files. -doc: info +doc: + info: cpp.info gcc.info lang.info cpp.info: $(srcdir)/cpp.texi @@ -2435,7 +2436,7 @@ # Install the driver last so that the window when things are # broken is small. install-normal: install-common $(INSTALL_HEADERS) $(INSTALL_LIBGCC) \- $(INSTALL_CPP) install-man install-info intl.install lang.install-normal \
+ $(INSTALL_CPP) install-man intl.install lang.install-normal \
install-driver
- [haiku-development] GCC 2.95.x on Mac OS X Intel (10.5.x)
- From: Keven Tipping
- [haiku-development] Re: GCC 2.95.x on Mac OS X Intel (10.5.x)
- From: Michael Pfeiffer