public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
From: Titus von Boxberg <titus@v9g.de>
To: crossgcc@sourceware.org
Cc: yann.morin.1998@anciens.enib.fr
Subject: [PATCH 4 of 5] docs/Using on MacOS: Document usage with Xcode 4.1
Date: Sun, 21 Aug 2011 13:14:00 -0000	[thread overview]
Message-ID: <d23cf8712f52b626e390.1313932144@mikulin.boxberg.lan> (raw)
In-Reply-To: <patchbomb.1313932140@mikulin.boxberg.lan>

# HG changeset patch
# User Titus von Boxberg <titus@v9g.de>
# Date 1313921619 -7200
# Node ID d23cf8712f52b626e3906f996b900107dc642e3d
# Parent  8107b0e85cd1764f64a3790b7f3e2a0e80a61933
docs/Using on MacOS: Document usage with Xcode 4.1

With Xcode 4.1 'gcc' is symlinked llvm-gcc-4.2 which cannot bootstrap
other gccs.
See http://llvm.org/bugs/show_bug.cgi?id=9571

On my machine the faulty gcc is
gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)

Document a workaround.

Signed-off-by: "Titus von Boxberg" <titus@v9g.de>

diff -r 8107b0e85cd1 -r d23cf8712f52 docs/C - Misc. tutorials.txt
--- a/docs/C - Misc. tutorials.txt	Sun Aug 21 10:19:36 2011 +0200
+++ b/docs/C - Misc. tutorials.txt	Sun Aug 21 12:13:39 2011 +0200
@@ -55,7 +55,7 @@
    mount somewhere.
 
 2) Install macports (or similar easy means of installing 3rd party software),
-   make sure that macport's bin dir is in your PATH.
+   make sure that macport's bin dir is in the front (!) of your PATH.
    Furtheron assuming it is /opt/local/bin.
 
 3) Install (at least) the following macports
@@ -65,11 +65,25 @@
    gsed
    gawk
    gcc43 (only necessary for Leopard OSX 10.5)
+   gcc_select (only necessary for OSX 10.5, or Xcode > 4)
 
+4) Prerequisites
    On Leopard, make sure that the macport's gcc is called with the default
-   commands (gcc, g++,...), e.g. via macport gcc_select
+   commands (gcc, g++,...), via macport's gcc_select
 
-4) run ct-ng's configure with the following tool configuration
+   On OSX 10.7 Lion / when using Xcode >= 4 make sure that the default commands
+   (gcc, g++, etc.) point to gcc-4.2, NOT llvm-gcc-4.2
+   by using macport's gcc_select feature. With MacPorts >= 1.9.2
+   the command is: "sudo port select --set gcc gcc42"
+   This also requires (like written above) that macport's bin dir
+   comes before standard directories in your PATH environment variable
+   because the gcc symlink is installed in /opt/local/bin and the default /usr/bin/gcc
+   is not removed by the gcc select command!
+   Explanation: llvm-gcc-4.2 (with Xcode 4.1 it is on my machine
+   "gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)")
+   cannot boostrap gcc. See http://llvm.org/bugs/show_bug.cgi?id=9571
+
+5) run ct-ng's configure with the following tool configuration
    (assuming you have installed the tools via macports in /opt/local):
    ./configure --with-sed=/opt/local/bin/gsed                 \
                --with-libtool=/opt/local/bin/glibtool         \
@@ -79,7 +93,7 @@
                --with-readelf=/opt/local/bin/greadelf         \
                [...other configure parameters as you like...]
 
-5) proceed as described in standard documentation
+6) proceed as described in standard documentation
 
 -----
 

--
For unsubscribe information see http://sourceware.org/lists.html#faq

  parent reply	other threads:[~2011-08-21 13:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-21 13:13 [PATCH 0 of 5] Several patches for OSX,uClibc,gdb-6.8 Titus von Boxberg
2011-08-21 13:13 ` [PATCH 1 of 5] configure: correct check_for Titus von Boxberg
2011-08-21 13:14 ` [PATCH 3 of 5] patches/uClibc-0.9.30: install_headers build step portable to OSX 10.7 Titus von Boxberg
2011-08-21 13:14 ` [PATCH 2 of 5] main: need path to libtoolize Titus von Boxberg
2011-08-21 13:14 ` Titus von Boxberg [this message]
2011-08-21 13:21 ` [PATCH 5 of 5] patches/gdb/6.8: correct compilation error when stpcpy is a define Titus von Boxberg
2011-08-21 22:22 ` [PATCH 0 of 5] Several patches for OSX,uClibc,gdb-6.8 Yann E. MORIN
2011-08-21 22:53   ` Yann E. MORIN

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=d23cf8712f52b626e390.1313932144@mikulin.boxberg.lan \
    --to=titus@v9g.de \
    --cc=crossgcc@sourceware.org \
    --cc=yann.morin.1998@anciens.enib.fr \
    /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).