From: John Marino Date: Sat, 24 Mar 2012 08:14:15 +0000 (+0100) Subject: gcc41: remove /usr/lib from rpath X-Git-Tag: v3.2.0~1182 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/43add724990da155c21ef4a0893f4ebc2c36eb05 gcc41: remove /usr/lib from rpath The gcc41 specs were unconditionally adding /usr/lib to the rpath, making it impossible to use the -z nodefaultlibs linker flag. RTLD will look in /usr/lib by default as the last priority of the library search path as long as the object wasn't built with -z nodefaultlibs. Also the __DragonFly__ macro was bumped from 1 to 3. It's supposed to reflect the major version of DragonFly. --- diff --git a/gnu/usr.bin/cc41/cc_prep/config/dragonfly-spec.h b/gnu/usr.bin/cc41/cc_prep/config/dragonfly-spec.h index e3a2d1df83..ea4cc89a9b 100644 --- a/gnu/usr.bin/cc41/cc_prep/config/dragonfly-spec.h +++ b/gnu/usr.bin/cc41/cc_prep/config/dragonfly-spec.h @@ -133,22 +133,16 @@ is built with the --enable-threads configure-time option.} \ #define LINK_LIBGCC_SPEC "" #define LIBGCC_SPEC "%{shared: -lgcc_pic} %{!shared: -lgcc}" -#define PRE_LIB_SPEC " \ - %{pg: -L"PREFIX2"/lib/gcc41/profile \ - %{!static: -rpath /usr/lib/gcc41/profile \ - -rpath-link "PREFIX2"/lib/gcc41/profile}} \ - %{g: -L"PREFIX2"/lib/gcc41/debug \ - %{!static: -rpath /usr/lib/gcc41/debug \ - -rpath-link "PREFIX2"/lib/gcc41/debug}} \ - -L"PREFIX2"/lib/gcc41 \ - %{!static: -rpath /usr/lib/gcc41 -rpath-link "PREFIX2"/lib/gcc41} \ - %{pg: -L"PREFIX2"/lib/profile \ - %{!static: -rpath /usr/lib/profile \ - -rpath-link "PREFIX2"/lib/profile}} \ - %{g: -L"PREFIX2"/lib/debug \ - %{!static: -rpath /usr/lib/debug -rpath-link "PREFIX2"/lib/debug}} \ - %{!static: -rpath /usr/lib -rpath-link "PREFIX2"/lib} \ - " +#define PRE_LIB_SPEC \ +" %{pg: -L"PREFIX2"/lib/gcc41/profile \ + %{!static: -rpath /usr/lib/gcc41/profile} \ + } \ + -L"PREFIX2"/lib/gcc41 \ + %{!static: -rpath /usr/lib/gcc41} \ + %{pg: -L"PREFIX2"/lib/profile \ + %{!static: -rpath /usr/lib/profile} \ + } \ +" #define DFBSD_LINK_COMMAND_SPEC "\ %{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:\ diff --git a/gnu/usr.bin/cc41/cc_prep/config/dragonfly.h b/gnu/usr.bin/cc41/cc_prep/config/dragonfly.h index 6cf92977a4..4e760a3f42 100644 --- a/gnu/usr.bin/cc41/cc_prep/config/dragonfly.h +++ b/gnu/usr.bin/cc41/cc_prep/config/dragonfly.h @@ -92,4 +92,4 @@ Boston, MA 02111-1307, USA. */ program, which avoids race conditions if the program has forked. */ #define TARGET_HAS_F_SETLKW -#define DFBSD_MAJOR 1 +#define DFBSD_MAJOR 3