bug-autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tweak for documentation of how to create universal binaries


From: Bruno Haible
Subject: Re: tweak for documentation of how to create universal binaries
Date: Sat, 11 Apr 2009 01:21:57 +0200
User-agent: KMail/1.9.9

Ralf Wildenhues wrote:
> I would like to veto this patch, and in general the mentality of hacking
> around further away from the root of the problem than is necessary.
> 
> How about trying to fix it instead of this?

You want to know the "root of the problem"? Here it is: The automake generated
Makefile executed the command

source='unictype/test-categ_Nl.c' object='unictype/test-categ_Nl.o' libtool=no \
        DEPDIR=.deps depmode=gcc /bin/sh ../build-aux/depcomp \
        gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64 -DHAVE_CONFIG_H \
        -I. -I..  -I. -I. -I.. -I./.. -I../lib -I./../lib   -g -O2 -c \
        -o unictype/test-categ_Nl.o unictype/test-categ_Nl.c

which invokes the command

gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64 -DHAVE_CONFIG_H \
-I. -I.. -I. -I. -I.. -I./.. -I../lib -I./../lib -g -O2 -c \
-o unictype/test-categ_Nl.o unictype/test-categ_Nl.c \
-Wp,-MD,unictype/.deps/test-categ_Nl.TPo

This command produces the file unictype/.deps/test-categ_Nl.TPo. Ususally
the result is the attached file marked "good", but sometimes the result
is the attached file marked "bad".

I ran this command 1000 times, and got
  - 668 times a valid result that refers to system include files in
        /usr/lib/gcc/powerpc-apple-darwin9/,
  - 329 times a valid result that refers to system include files in
        /usr/lib/gcc/i686-apple-darwin9/,
  - 3 times the bad result.

The bad result has the same file size as the i686 result but its
contents is the powerpc result, filled up with the "tail" of the
i686 result. See:
  $ ls -l test-categ_Nl.TPo-*   
  -rw-r--r-- 1 bruno staff 1627 Apr 11 01:05 test-categ_Nl.TPo-bad
  -rw-r--r-- 1 bruno staff 1627 Apr 11 01:07 test-categ_Nl.TPo-i686
  -rw-r--r-- 1 bruno staff 1556 Apr 11 01:07 test-categ_Nl.TPo-powerpc
  $ diff -u test-categ_Nl.TPo-powerpc test-categ_Nl.TPo-bad 
  --- test-categ_Nl.TPo-powerpc   2009-04-11 01:07:16.000000000 +0200
  +++ test-categ_Nl.TPo-bad       2009-04-11 01:05:12.000000000 +0200
  @@ -25,3 +25,5 @@
     /usr/include/machine/_structs.h /usr/include/mach/ppc/_structs.h \
     /usr/include/sys/resource.h ../lib/alloca.h ../lib/string.h \
     /usr/include/string.h unictype/test-predicate-part2.h
  +lib/string.h \
  +  /usr/include/string.h unictype/test-predicate-part2.h

gcc is /usr/bin/gcc, which identifies itself as
"gcc version 4.0.1 (Apple Inc. build 5465)".

How do you want to fix this bug?

When a fix is clearly out of reach, documenting a workaround is not only
adequate; it is even our duty towards the users.

Bruno


Attachment: test-categ_Nl.TPo-bad
Description: Text document

Attachment: test-categ_Nl.TPo-good
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]