[Top][All Lists]

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

Re: document how to create universal binaries

From: Eric Blake
Subject: Re: document how to create universal binaries
Date: Tue, 19 Aug 2008 22:22:52 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20080708 Thunderbird/ Mnenhy/

Hash: SHA1

According to Peter O'Gorman on 8/17/2008 4:31 PM:
> In the majority of cases there are no problems building universal
> binaries in this manner. But there are enough cases where it does not
> build, or where it builds but has problems for some architectures at
> runtime, that I still think if the instruction is added to install.texi,
> a warning be added in the same spot.
> Would you agree to something like this?

I went ahead and fixed up some texinfo markup flaws, adjusted the
ChangeLog, then committed Peter's wording.  As I don't currently have
access to MacOS, you'll need to double check that it looks correct.  I'm
not sure if Karl's cron jobs will automatically update gnulib's copy of
INSTALL, but if that hasn't happened in another day or two, I'll ping him.

I also know that a while ago, Bruno proposed some other changes to INSTALL
wording; I'll dig through my inbox and see if I can revive that patch.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at
Comment: Using GnuPG with Mozilla -

>From 0b0c80f560884b9d4c0faafb15ec28d810d25f70 Mon Sep 17 00:00:00 2001
From: Bruno Haible <address@hidden>
Date: Tue, 19 Aug 2008 22:16:40 -0600
Subject: [PATCH] Mention universal binaries in INSTALL.

* doc/install.texi (Compiling For Multiple Architectures): Explain
how to create universal binaries on MacOS X.

Signed-off-by: Eric Blake <address@hidden>
 ChangeLog        |    7 +++++++
 doc/install.texi |   18 +++++++++++++++++-
 2 files changed, 24 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b9c14bc..1a892f9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-08-19  Bruno Haible  <address@hidden>
+       and Peter O'Gorman  <address@hidden>
+       Mention universal binaries in INSTALL.
+       * doc/install.texi (Compiling For Multiple Architectures): Explain
+       how to create universal binaries on MacOS X.
 2008-08-19  Jim Meyering  <address@hidden>
            Eric Blake  <address@hidden>
            Ralf Wildenhues  <address@hidden>
diff --git a/doc/install.texi b/doc/install.texi
index e087629..362be59 100644
--- a/doc/install.texi
+++ b/doc/install.texi
@@ -6,7 +6,7 @@
 @unnumbered Installation Instructions
 Copyright @copyright{} 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004,
-2005, 2006, 2007 Free Software Foundation, Inc.
+2005, 2006, 2007, 2008 Free Software Foundation, Inc.
 This file is free documentation; the Free Software Foundation gives
 unlimited permission to copy, distribute and modify it.
@@ -120,6 +120,22 @@ Multiple Architectures
 installed the package for one architecture, use @samp{make distclean}
 before reconfiguring for another architecture.
+On MacOS X 10.5 and later systems, you can create libraries and
+executables that work on multiple system types---known as @dfn{fat} or
address@hidden binaries---by specifying multiple @option{-arch} options
+to the compiler but only a single @option{-arch} option to the
+preprocessor.  Like this:
+./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+            CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+            CPP="gcc -E" CXXCPP="g++ -E"
address@hidden example
+This is not guaranteed to produce working output in all cases, you may
+have to build one architecture at a time and combine the results
+using the @command{lipo} tool if you have problems.
 @node Installation Names
 @section Installation Names

reply via email to

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