[lldb-dev] Heads-up: FreeBSD LLDB CMake build broken by relative rpath change

Brad King brad.king at kitware.com
Thu Feb 27 07:45:51 PST 2014


On 02/27/2014 10:33 AM, Ed Maste wrote:
> It's not FreeBSD-specific; here it is in the GNU ld manual:
> https://sourceware.org/binutils/docs/ld/Options.html#Options
> 
> -z keyword
> `origin'  Marks the object may contain $ORIGIN.
> 
> and it turns up in some Solaris references from the early 2000s as well.

Also w.r.t. the patch:

> +  if( ${CMAKE_SYSTEM_NAME} MATCHES FreeBSD )
> +    set(CMAKE_EXE_LINKER_FLAGS "-Wl,-zorigin")
> +  endif()

CMAKE_EXE_LINKER_FLAGS is a user-settable value in the local cache
so instead of setting it outright you should prepend or append:

  set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-zorigin")

-Brad




More information about the lldb-dev mailing list