[kmscon-devel] Amended linker check for OS X

David Herrmann dh.herrmann at gmail.com
Thu Mar 27 04:34:13 PDT 2014


Hi

On Thu, Mar 27, 2014 at 9:50 AM, Florian Gilcher
<florian.gilcher at asquera.de> wrote:
> I went through a few manuals last evening and hopefully amended the patch to
> your li(n)king.

:)

> As libtool only checks for GNU ld or not, I decided to check for the host
> platform next. As the OS linker is used in that case, that seems like the most
> stable way to go. I decided not to check for apples ld using its version string
> (because it doesn't seem very stable).

Yes, checking for GNU-ld first is the way to go. If it's GNU-ld we
don't care for the target and just supply the default options. I also
agree on testing the host-os instead of apple-linker-specific flags,
because all that stuff _is_ specific to MACH-O, not specific to the
linker. So yeah, the detection looks good.

> On Darwin, it now links with -dead_strip,-dead_strip_dylibs (equivalent to
> --as-needed, --gc-sections) and -bind_at_load (similar to -z,now). I decided no

--gc-sections is slightly different than -dead_strip, but the
intention is the same. So yes, it is a suitable replacement.

> --version_script has no equivalent on OS X, as two-level namespaces are used
> and applied by default.[1]

I really _want_ version-scripts on linux. For any other system, I
actually don't care. If someone cares enough to implement some
symbol-versioning there, I'd gladly apply the patches. But I won't
have the time to dig into that (and again, I don't care..).

> I hope that solves most problems with this patch.

Apart from a rather sparse commit-message, the patch looks good. Thanks a lot!
David


More information about the kmscon-devel mailing list