I'm trying to build 7.4.3 under Solaris 9 with gcc and static linking of
libgcc. This requires passing '-static-libgcc' when linking both
binaries and shared libraries.

Passing 'LDFLAGS=-static-libgcc' to configure only partially works.
Binaries are correctly linked with that flag, but shared libraries
appear to ignore everything but -L options in LDFLAGS when linking (see
src/Makefile.shlib). The 8.0 tree appears to do the same.

I've changed Makefile.shlib to add all of LDFLAGS to SHLIB_LINK for now,
but I'm assuming there's a reason that it was only using -L flags
originally. Is there a Right Way to pass extra options for
shared-library linking?

-O

Search Discussions

  • Tom Lane at Aug 17, 2004 at 3:58 pm

    Oliver Jowett writes:
    I've changed Makefile.shlib to add all of LDFLAGS to SHLIB_LINK for now,
    but I'm assuming there's a reason that it was only using -L flags
    originally.
    IIRC, on some platforms there are elements of LDFLAGS that will actively
    break shared library linking.
    Is there a Right Way to pass extra options for
    shared-library linking?
    LDFLAGS_SL is meant for this, I believe. Dunno whether you can set it
    via configure, though ... that may be an oversight. In the meantime
    you could hand-hack Makefile.global to set it.

    regards, tom lane
  • Oliver Jowett at Aug 18, 2004 at 5:50 am

    Tom Lane wrote:
    Oliver Jowett <oliver@opencloud.com> writes:
    Is there a Right Way to pass extra options for
    shared-library linking?
    LDFLAGS_SL is meant for this, I believe. Dunno whether you can set it
    via configure, though ... that may be an oversight. In the meantime
    you could hand-hack Makefile.global to set it.
    Ok. LDFLAGS_SL only seems to be used for AIX & BeOS at the moment, and
    configure does not know about it. I will look at modifying configure.in
    and Makefile.shlib to support it on other platforms.

    -O

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppgsql-hackers @
categoriespostgresql
postedAug 17, '04 at 3:18p
activeAug 18, '04 at 5:50a
posts3
users2
websitepostgresql.org...
irc#postgresql

2 users in discussion

Oliver Jowett: 2 posts Tom Lane: 1 post

People

Translate

site design / logo © 2021 Grokbase