[kmscon-devel] Build failure on OS X 10.9

Florian Gilcher florian.gilcher at asquera.de
Mon Mar 24 11:52:49 PDT 2014


Apples standard toolchain installed using XCode uses llvm-ld
instead of GNU ld.

    $ ld -v
    @(#)PROGRAM:ld  PROJECT:ld64-236.3
    configured to support archs: armv6 armv7 armv7s arm64 i386 x86_64 armv6m armv7m armv7em
    LTO support using: LLVM version 3.4svn

This leads to the following error message when
trying to compile on OS X 10.9:

    ld: unknown option: --as-needed
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    make[2]: *** [libtsm.la] Error 1
    make[1]: *** [all-recursive] Error 1
    make: *** [all] Error 2

All currently used linker flags are not supported by llvm-ld. (I checked every
single one)

This patch avoids setting any linker flags when GNU ld is not used to make sure
that the project at least builds in the presence of an unknown linker.

Note: I sent a previous patch to David which checked for CLANG being
used - this patch checks for GNU ld.



More information about the kmscon-devel mailing list