public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
To: FX <fxcoudert@gmail.com>
Cc: GCC Development <gcc@gcc.gnu.org>,
		"fortran@gcc.gnu.org List" <fortran@gcc.gnu.org>
Subject: Re: Fwd: [RFC, Patch, gfortran] make -static-libgfortran work on 	darwin.
Date: Tue, 10 Jun 2008 19:07:00 -0000	[thread overview]
Message-ID: <20080610190632.GF1722@ins.uni-bonn.de> (raw)
In-Reply-To: <3D6964FD-6DF0-4F83-9932-6945316CFBF5@gmail.com>

Hello,

* FX wrote on Tue, Jun 10, 2008 at 05:59:36PM CEST:
>> De : IainS <developer@sandoe-acoustics.co.uk>
>>
>> I opted to call the static library "libgfortran_static" and to leave 
>> the shared name unchanged.
>>
>> It would be great if libtool could be persuaded to change the basename 
>> as well as the extension for the dynamic/static
>> but despite RTFM and googling I can't seem to find any example of how 
>> to achieve that in an easy manner.

It doesn't do that because that breaks the abstraction.  It might also
increase a bit the risk of ending up with bits of the static library
included, and bits of shared deplibs you use pulling in the shared
version of the library.

Can the driver use path/to/libgfortran.a instead of '-Lpath/to
-lgfortran' to avoid being hindered by missing -Bstatic/-Bdynamic?

Independently, does anybody know whether odcctools is dead (homepage
seems to be down ATM)?
<http://thread.gmane.org/gmane.comp.gnu.libtool.general/7158/focus=7173>

>> It is possible to accommodate the required lib name change at install
>> time by renaming libgfortran.a and ranlib-ing the new one.

Don't try this on AIX, where libtool may create a shared archive with
that name.

>> however, I'm not sure how to make a formal test case for the change:
>> ...  since to prove that the static lib has been used requires
>> inspection of the generated executable.

This is what we use within the libtool testsuite (not fool-proof!):
- remove the shared library before running the executable.

To make it a bit more fool-proof:
- after generating the executable, create an incompatible shared
  library, install it in some temporary directory, let that directory
  be searched early by the runtime linker.

Not sure what level of overkill is suitable for GCC.  ;-)


I agree with FX that it would be nice to limit a change to Darwin if at
all.

Cheers,
Ralf

  reply	other threads:[~2008-06-10 19:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <A6664290-AFD1-4FCE-97E5-01DE56BB8B1D@sandoe-acoustics.co.uk>
2008-06-10 16:00 ` FX
2008-06-10 19:07   ` Ralf Wildenhues [this message]
2008-06-10 19:43     ` IainS
2008-06-10 19:59       ` Ralf Wildenhues
2008-06-10 20:41         ` IainS
2008-06-11  3:40         ` Peter O'Gorman
2008-06-10 20:15       ` Ralf Wildenhues
2008-06-10 16:12 ` FX
2008-06-10 16:40   ` IainS
2008-06-10 16:43   ` Dave Korn

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=20080610190632.GF1722@ins.uni-bonn.de \
    --to=ralf.wildenhues@gmx.de \
    --cc=fortran@gcc.gnu.org \
    --cc=fxcoudert@gmail.com \
    --cc=gcc@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).