This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: darwin cross compiling breakage

I made the following changes
$ svn diff gcc/
Index: gcc/
--- gcc/ (revision 114540)
+++ gcc/ (working copy)
@@ -1720,21 +1720,6 @@
case "$host","$target" in
- # Darwin crosses can use the host system's libraries and headers,
- # because of the fat library support. Of course, it must be the
- # same version of Darwin on both sides. Allow the user to
- # just say --target=foo-darwin without a version number to mean
- # "the version on this system".
- *-*-darwin*,*-*-darwin*)
- hostos=`echo $host | sed 's/.*-darwin/darwin/'`
- targetos=`echo $target | sed 's/.*-darwin/darwin/'`
- if test $hostos = $targetos -o $targetos = darwin ; then
- with_headers=yes
- fi
- ;;
i?86-*-*,x86_64-*-* \
| powerpc*-*-*,powerpc64*-*-*)
$ autoconf
$ cd ..
$ mkdir gcc-cross
$ cd gcc-cross
$ mkdir target-bin
$ for prog in ar nm ranlib strip lipo as ld; do
> P=target-bin/i686-apple-darwin8-$prog
> echo '#!/bin/sh' > $P
> echo 'exec /usr/bin/'${prog}' $*' >> $P
> chmod a+x $P
> done
$ export PATH=$PWD/target-bin:$PATH
$ ../gcc.fsf/configure --disable-checking --enable-languages=c,c++ -- build=powerpc-apple-darwin8 --host=powerpc-apple-darwin8 --target=i686- apple-darwin8 --with-sysroot=/ --prefix=/opt/cross
$ make
$ make install

Results in a ppc -> i386 cross compiler that seems to work fine. So I don't see what the problem is.


On Jun 10, 2006, at 3:29 AM, Steven Bosscher wrote:

On 6/10/06, Geoffrey Keating <> wrote:
"OK" does not mean that we have perfect consensus and everyone
agrees.  It means that on balance it is better to have this patch
than not.

"OK" also does mean "appropriate for the FSF GCC" and the rule is pretty clear here: if HOST != BUILD you define CROSS_COMPILE.

Plus, in the patch as posted:
- There is no ChangeLog entry.
- There is no comment explaining the logic of the new checks
-  The check is not darwin specific (darwin.h defines __i386__, but so
does i386.h)
- The APPLE_LOCAL markers are even still there.

All in all, a very poor patch submission that should not have been approved.

It is not even clear why this hack is necessary for Darwin. Why is
just CROSS_COMPILE not enough, like it is for everyone else? You wrote
something vague in but that
doesn't clarify the situation either.

There should at the very least be comments in the two changed hunks
that explain why just #if{n,}def CROSS_COMPILE does not work for
Darwin, and why/how it helps to change these two checks.

IMHO, you approving this for the FSF GCC this is just  abuse of your
GWP rights, overruling another maintainer who rejected the patch.
Seems to me like you're having a bit of a conflict of interest here,
and you choose to approve the patch with an Apple hat on instead of an
FSF hat like you're supposed to if you approve patches for the FSF


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]