public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "howarth at nitro dot med dot uc dot edu" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug bootstrap/41180] can not build gcc 4.4.1 on Snow Leopard Mac OS X 10.6
Date: Thu, 03 Sep 2009 00:56:00 -0000	[thread overview]
Message-ID: <20090903005641.22683.qmail@sourceware.org> (raw)
In-Reply-To: <bug-41180-13994@http.gcc.gnu.org/bugzilla/>



------- Comment #27 from howarth at nitro dot med dot uc dot edu  2009-09-03 00:56 -------
Mike,
     Regarding passing -m32 within the x86_64 host case, I was considering the
case of trying to cross compile the i686-apple-darwin10 target on the
x86_64-apple-darwin10 host.  While this sounds odd, we currently do this on
i386 fink for 10.6 (but we cheat by using wrappers for the compilers that pass
-m32 and explicitly pass --build=i686-apple-darwin10 --host=i686-apple-darwin10
 --target=i686-apple-darwin10 to gcc's configure). Without my proposed patch in
comment 10, if the user passed...

--host=x86_64-apple-darwin10 --target=i686-apple-darwin10

the i[[3456789]]86-*-darwin* host case won't be triggered but rather the absent
x86_64-*-darwin* host case. Without the patch, no -m32 will be added to CC
and the compiler will attempt to build the i686-apple-darwin10 compiler with
the default m64 code generation. 

If I remove the change from comment 20 and use the stock configure from gcc
trunk with...

../gcc/configure --prefix=/Users/howarth/dist
--enable-languages=c,c++,fortran,objc,java --with-arch=nocona
--with-tune=generic --host=x86_64-apple-darwin10 --target=i686-apple-darwin9
--with-gmp=/sw --with-libiconv-prefix=/sw --with-system-zlib
--x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib

where /sw is a i386 fink installation containing i386 binaries for gmp/mpfr, I
get the configure failure...

checking for correct version of gmp.h... yes
checking for correct version of mpfr.h... yes
checking for the correct version of mpc.h... no
checking for the correct version of the gmp/mpfr libraries... no
configure: error: Building GCC requires GMP 4.2+ and MPFR 2.3.2+.
Try the --with-gmp and/or --with-mpfr options to specify their locations.
Copies of these libraries' source code can be found at their respective
hosting sites as well as at ftp://gcc.gnu.org/pub/gcc/infrastructure/.
See also http://gcc.gnu.org/install/prerequisites.html for additional info.
If you obtained GMP and/or MPFR from a vendor distribution package, make
sure that you have installed both the libraries and the header files.
They may be located in separate packages.

Adding Apple's patch as...

@@ -3645,6 +3653,12 @@
   powerpc-*-darwin*)
     host_makefile_frag="config/mh-ppc-darwin"
     ;;
+  i[3456789]86-*-darwin*)
+    # gcc can default to x86_64 code generation, avoid that
+    if test "${build}" = "${host}"; then
+         CC="${CC-gcc} -m32"
+    fi
+    ;;
   powerpc-*-aix*)
     host_makefile_frag="config/mh-ppc-aix"
     ;;

won't help in this case because 1) the host is set to x86_64-apple-darwin10 so
this case never
executes and 2) the target and host don't match anyway to set CC to have -m32.
I would also remind
you that the Apple system compiler in SL shows...

Using built-in specs.
Target: i686-apple-darwin10
Configured with: /var/tmp/gcc/gcc-5646~6/src/configure --disable-checking
--enable-werror --prefix=/usr --mandir=/share/man
--enable-languages=c,objc,c++,obj-c++
--program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib
--build=i686-apple-darwin10 --with-gxx-include-dir=/include/c++/4.2.1
--program-prefix=i686-apple-darwin10- --host=x86_64-apple-darwin10
--target=i686-apple-darwin10
Thread model: posix
gcc version 4.2.1 (Apple Inc. build 5646)

which is exactly the triplet combination for --host and --target that I am
looking at. Only if I add my proposed patch in Comment 20 does configure
complete properly for the --host=x86_64-apple-darwin10
--target=i686-apple-darwin10 combination producing 32-bit binaries.

[Macintosh-2:~/work] howarth% ../gcc/configure --prefix=/Users/howarth/dist
--enable-languages=c,c++,fortran,objc,java --with-arch=nocona
--with-tune=generic --host=x86_64-apple-darwin10 --target=i686-apple-darwin9
--with-gmp=/sw --with-libiconv-prefix=/sw --with-system-zlib
--x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib
configure: WARNING: If you wanted to set the --build type, don't use --host.
    If a cross compiler is detected then cross compile mode will be used.
checking build system type... x86_64-apple-darwin10.0.0
checking host system type... x86_64-apple-darwin10
checking target system type... i686-apple-darwin9
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for a sed that does not truncate output... /usr/bin/sed
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking for x86_64-apple-darwin10-gcc... gcc -m32
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc -m32 accepts -g... yes
checking for gcc -m32 option to accept ISO C89... none needed
checking for x86_64-apple-darwin10-g++... no
checking for x86_64-apple-darwin10-c++... no
checking for x86_64-apple-darwin10-gpp... no
checking for x86_64-apple-darwin10-aCC... no
checking for x86_64-apple-darwin10-CC... no
checking for x86_64-apple-darwin10-cxx... no
checking for x86_64-apple-darwin10-cc++... no
checking for x86_64-apple-darwin10-cl.exe... no
checking for x86_64-apple-darwin10-FCC... no
checking for x86_64-apple-darwin10-KCC... no
checking for x86_64-apple-darwin10-RCC... no
checking for x86_64-apple-darwin10-xlC_r... no
checking for x86_64-apple-darwin10-xlC... no
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for x86_64-apple-darwin10-gnatbind... no
checking for gnatbind... no
checking for x86_64-apple-darwin10-gnatmake... no
checking for gnatmake... no
checking whether compiler driver understands Ada... no
checking how to compare bootstrapped objects... cmp --ignore-initial=16 $$f1
$$f2
checking for correct version of gmp.h... yes
checking for correct version of mpfr.h... yes
checking for the correct version of mpc.h... no
checking for the correct version of the gmp/mpfr libraries... yes
checking for version 0.10 of PPL... yes
checking for correct version of CLooG... yes
The following languages will be built: c,c++,fortran,java,objc
*** This configuration is not supported in the following subdirectories:
     target-libmudflap target-libada gnattools
    (Any other directories should still work fine.)
rm: conftest.dSYM: is a directory
checking for bison... bison -y
checking for bison... bison
checking for gm4... gm4
checking for flex... flex
checking for flex... flex
checking for makeinfo... makeinfo
checking for expect... expect
checking for runtest... no
checking for x86_64-apple-darwin10-ar... no
checking for x86_64-apple-darwin10-as... no
checking for x86_64-apple-darwin10-dlltool... no
checking for ld... (cached) /usr/libexec/gcc/i686-apple-darwin10/4.2.1/ld
checking for x86_64-apple-darwin10-ld... (cached)
/usr/libexec/gcc/i686-apple-darwin10/4.2.1/ld
checking for x86_64-apple-darwin10-lipo... no
checking for x86_64-apple-darwin10-nm... no
checking for x86_64-apple-darwin10-ranlib... no
checking for x86_64-apple-darwin10-strip... no
checking for x86_64-apple-darwin10-windres... no
checking for x86_64-apple-darwin10-windmc... no
checking for x86_64-apple-darwin10-objcopy... no
checking for x86_64-apple-darwin10-objdump... no
checking for i686-apple-darwin9-cc... no
checking for i686-apple-darwin9-gcc... no
checking for i686-apple-darwin9-c++... no
checking for i686-apple-darwin9-g++... no
checking for i686-apple-darwin9-cxx... no
checking for i686-apple-darwin9-gxx... no
checking for i686-apple-darwin9-gcc... no
checking for i686-apple-darwin9-gcj... no
checking for i686-apple-darwin9-gfortran... no
checking for i686-apple-darwin9-ar... no
checking for i686-apple-darwin9-as... no
checking for i686-apple-darwin9-dlltool... no
checking for i686-apple-darwin9-ld... no
checking for i686-apple-darwin9-lipo... no
checking for i686-apple-darwin9-nm... no
checking for i686-apple-darwin9-objdump... no
checking for i686-apple-darwin9-ranlib... no
checking for i686-apple-darwin9-strip... no
checking for i686-apple-darwin9-windres... no
checking for i686-apple-darwin9-windmc... no
checking where to find the target ar... pre-installed
checking where to find the target as... pre-installed
checking where to find the target cc... pre-installed
checking where to find the target c++... pre-installed
checking where to find the target c++ for libstdc++... pre-installed
checking where to find the target dlltool... pre-installed
checking where to find the target gcc... pre-installed
checking where to find the target gcj... pre-installed
checking where to find the target gfortran... pre-installed
checking where to find the target ld... pre-installed
checking where to find the target lipo... pre-installed
checking where to find the target nm... pre-installed
checking where to find the target objdump... pre-installed
checking where to find the target ranlib... pre-installed
checking where to find the target strip... pre-installed
checking where to find the target windres... pre-installed
checking where to find the target windmc... pre-installed
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether -fkeep-inline-functions is supported... yes
configure: creating ./config.status
config.status: creating Makefile


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41180


  parent reply	other threads:[~2009-09-03  0:56 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-28  3:13 [Bug c++/41180] New: " dmarkman at mac dot com
2009-08-28  3:17 ` [Bug c++/41180] " dmarkman at mac dot com
2009-08-28 10:19 ` redi at gcc dot gnu dot org
2009-08-28 10:23 ` [Bug bootstrap/41180] " redi at gcc dot gnu dot org
2009-08-28 13:28 ` howarth at nitro dot med dot uc dot edu
2009-08-28 14:36 ` dmarkman at mac dot com
2009-08-28 14:37 ` dmarkman at mac dot com
2009-08-28 15:02 ` redi at gcc dot gnu dot org
2009-08-28 15:12 ` howarth at nitro dot med dot uc dot edu
2009-08-28 15:32 ` howarth at nitro dot med dot uc dot edu
2009-08-28 16:14 ` mrs at gcc dot gnu dot org
2009-08-28 17:28 ` dmarkman at mac dot com
2009-08-29  1:32 ` howarth at nitro dot med dot uc dot edu
2009-08-29  1:41 ` howarth at nitro dot med dot uc dot edu
2009-08-29  2:19 ` howarth at nitro dot med dot uc dot edu
2009-08-31 17:36 ` mrs at apple dot com
2009-08-31 17:38 ` mrs at apple dot com
2009-08-31 18:04 ` howarth at nitro dot med dot uc dot edu
2009-08-31 20:37 ` mrs at apple dot com
2009-09-01  4:00 ` howarth at nitro dot med dot uc dot edu
2009-09-01  4:23 ` howarth at nitro dot med dot uc dot edu
2009-09-02 20:37 ` mrs at apple dot com
2009-09-02 21:41 ` howarth at nitro dot med dot uc dot edu
2009-09-02 21:44 ` howarth at nitro dot med dot uc dot edu
2009-09-02 22:22 ` howarth at nitro dot med dot uc dot edu
2009-09-02 23:37 ` howarth at nitro dot med dot uc dot edu
2009-09-03  0:20 ` mrs at apple dot com
2009-09-03  0:56 ` howarth at nitro dot med dot uc dot edu [this message]
2009-09-03 11:04 ` joseph at codesourcery dot com
2009-09-03 13:00 ` howarth at nitro dot med dot uc dot edu
2009-09-04  1:50 ` mrs at apple dot com
2009-09-09  8:15 ` fxcoudert at gcc dot gnu dot org
2009-09-09  8:47 ` fxcoudert at gcc dot gnu dot org
2009-09-30 19:40 ` pinskia at gcc dot gnu dot org
2009-09-30 19:41 ` pinskia at gcc dot gnu dot org
     [not found] <bug-41180-4@http.gcc.gnu.org/bugzilla/>
2014-02-16 13:14 ` jackie.rosen at hushmail dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090903005641.22683.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).