public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "simon at pushface dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug ada/42554] Can't build gnatlink, gnatmake
Date: Mon, 01 Feb 2010 22:54:00 -0000	[thread overview]
Message-ID: <20100201225357.2113.qmail@sourceware.org> (raw)
In-Reply-To: <bug-42554-303@http.gcc.gnu.org/bugzilla/>



------- Comment #5 from simon at pushface dot org  2010-02-01 22:53 -------
I think this bug is caused by a much more fundamental problem: the -c switch to
ranlib, which seems to be a Darwin special, appears to cause this problem (at
any rate with Xcode >= 3.2, ie darwin10.

The top-level configure.ac includes the following

  *-*-darwin*)
    # ranlib from Darwin requires the -c flag to look at common symbols.
    extra_ranlibflags_for_target=" -c"
    ;;

and the SVN log for ths says

r60397 | geoffk | 2002-12-22 06:46:41 +0000 (Sun, 22 Dec 2002) | 4 lines

        * configure.in (extra_ranlibflags_for_target): New variable.
        (*-*-darwin): Add -c to ranlib commands.
        * configure (tooldir): Handle extra_ranlibflags_for_target.

The Darwin man page for ranlib says

       -c     Include common symbols as definitions with respect to the ta-
              ble of contents.  This is seldom the  intended  behavior  for
              linking from a library, as it forces the linking of a library
              member just because it uses an uninitialized global  that  is
              undefined  at  that  point  in  the  linking.  This option is
              included only because this was the original behavior of  ran-
              lib.  This option is not the default.

Apple, in response to Jack Howarth re: radar 6320843

Darwin static archives traditionally do not have common symbols in there table
of contents.  The -c option forces common symbols into the table of contents
and causes this problem.


I have replaced the section of configure.ac above by this:

  *-*-darwin1[[0123456789]]*)
    # ranlib from Darwin 10 (Xcode 3.2) does not require the -c flag
    # to look at common symbols.
    ;;
  *-*-darwin*)
    # ranlib from older Darwins requires the -c flag to look at common
    # symbols.
    extra_ranlibflags_for_target=" -c"
    ;;

and the build proceeds to completion


-- 


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


  parent reply	other threads:[~2010-02-01 22:54 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-30 18:25 [Bug ada/42554] New: " simon at pushface dot org
2009-12-30 18:27 ` [Bug ada/42554] " simon at pushface dot org
2010-01-06 22:35 ` simon at pushface dot org
2010-01-07 22:25 ` simon at pushface dot org
2010-01-31 22:58 ` simon at pushface dot org
2010-02-01 22:54 ` simon at pushface dot org [this message]
2010-02-01 22:56 ` simon at pushface dot org
2010-02-02  1:56 ` howarth at nitro dot med dot uc dot edu
2010-02-02  6:26 ` [Bug ada/42554] Can't build GNAT tools simon at pushface dot org
2010-02-02 13:11 ` simon at pushface dot org
2010-02-02 21:25 ` simon at pushface dot org
2010-02-02 22:55 ` howarth at nitro dot med dot uc dot edu
2010-02-03 21:24 ` simon at pushface dot org
2010-03-19 10:20 ` mrs at gcc dot gnu dot org
2010-05-17 12:07 ` fxcoudert at gcc dot gnu dot org

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=20100201225357.2113.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).