[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Darwin patches: Take 3

From: F J Franklin
Subject: Darwin patches: Take 3
Date: Mon, 11 Mar 2002 09:52:37 +0000 (GMT)

Dear libtoolers,

Some patch-work. Stress-tested with GTK-2.0 :-)

Please please please - pretty please with (optional) cherries on top -
people test this/these patch/es on other operating systems and architectures,
because I would really like to stop maintaining my own personal libtool...

Regards, Frank

Francis James Franklin


Patch: [ltcvs-20020308-1.patch]

There's a bug with building static archives that occurs when building
libltdl.a (and this occurs w/ or w/o my patch) - where ltdl.o is added to
the archive twice:

ar cru .libs/libltdl.a  .libs/ltdl.o   ltdl.o

where ".libs/ltdl.o" and "ltdl.o", the shared and static targets
respectively, are identical.

I have attached a mini-patch which appears to fix this - certainly it
doesn't cause any tests to fail on darwin but I haven't tested on other


Patch: [ltcvs-20020308-2.patch]

The attached patch, and the use of bash rather than zsh, reduces the number of
failed tests to one - the last failure being hardcode.test, which I haven't
really looked at in any detail.

A fix for everybody's favourite darwin bug (the convenience lib. thingy) is
included. It's improved from my original submission in June and doesn't seem
to break anything. We even have the latest CVS glib & gtk+ building now!

The module loader is derived from Dan Winship's gmodule-dyld. I've reworked
it as a dlopen/dlclose/etc. interface for direct inclusion in ltdl.c but also
as a standalone file in case anybody wants to use it elsewhere. (I'm very new
to modules and there are still some issues to be addressed, so to speak...)

The only things with this patch I'm really uncertain about are:

(1) the 'fix' (\\\"\1\\\" -> \"\1\") for
    where I have changed the two instances but perhaps it would be better to
    add a third darwin-specific case?

(2) The following line makes no sense to me:

    ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)

    since AC_PROVIDE_AC_LIBTOOL_DLOPEN is *never*, as far as I can tell,
    defined and therefore enable_dlopen is always "no", and one consequence of
    this is that mdemo tries to link to "foo1.a" using "-lfoo1" which fails...

Anyway, I'd be grateful if people could test the patch. Here's a sample
ChangeLog entry:

2002-03-08  Francis James Franklin  <address@hidden>

        darwin updates:
        * libltdl/ add ltdyld.c & ltdyld.h
        * libltdl/README: add note on MacOSX support
        * libltdl/ltdl.c: include ltdyld.c & ltdyld.h if HAVE_DYLD
        * libltdl/ltdyld.c: libdl-equiv. wrapper round NeXT module interface
        * libltdl/ltdyld.h: header, with LTDYLD_REPLACE_DLFCN option
        * libtool.m4:
        - always enable_dlopen=yes
        - check for NSLinkModule
        - copy darwin linker characteristics to CXX config section
        - lt_cv_sys_global_symbol_to_c_name_address fix (\\\"\1\\\" -> \"\1\")
        * ltdl.m4: check for NSLinkModule
        - fix infamous conv. library bug (a.k.a. Appalling Patch, Version 0.3)
        - don't add nothing after piecewise linking
        * tests/ propagate $(SHELL) to tests


Patch: [ltcvs-20020308-3.patch]

This is a bit of fun, for whoever's interested, lets you add
"-rpath @executable_path[/path]" to _la_LDFLAGS in to build
relocatable libraries. I use this with my Crazy Wormhole stuff


Attachment: ltcvs-20020308-1.patch
Description: ltcvs-20020308-1.patch

Attachment: ltcvs-20020308-2.patch
Description: ltcvs-20020308-2.patch

Attachment: ltcvs-20020308-3.patch
Description: ltcvs-20020308-3.patch

reply via email to

[Prev in Thread] Current Thread [Next in Thread]