Browse files

defaults: remove /usr/lib/gcc* from ldconfig search path

It is not necessary for ldconfig to add /usr/lib/gcc44 and /usr/lib/gcc41
directories to the default library search path.  Every binary built with
gcc41 and gcc44 embeds these paths into the DT_RPATH dynamic tag which
tells the runtime linker to look their first.  In effect, this means these
paths are potentially searched multiple times: once due to the rpath and
again due to the ldconfig hints file.  Let's do away will the redundant,
always-fails check here.

Another reason is that the gcc libraries have different versions of the
same libraries.  Surely the gcc41 version isn't preferred over the gcc44
version, but it gets searched first.  Again, let rpath take care of this
for gcc.

To update the rc.conf defaults, "make upgrade" after building world is
  • Loading branch information...
jrmarino committed Mar 24, 2012
1 parent 43add72 commit b519f37ff250d8b77d64b16781b456a9e1837f95
Showing with 1 addition and 1 deletion.
  1. +1 −1 etc/defaults/rc.conf
@@ -378,7 +378,7 @@ sysvipc_enable="NO" # Load System V IPC primitives at startup (or NO).
linux_enable="NO" # Linux binary compatibility loaded at startup (or NO).
clear_tmp_enable="NO" # Clear /tmp at startup.
ldconfig_insecure="NO" # Set to YES to disable ldconfig security checks
-ldconfig_paths="/usr/lib /usr/lib/gcc* /usr/lib/compat /usr/pkg/lib /usr/local/lib"
+ldconfig_paths="/usr/lib /usr/lib/compat /usr/pkg/lib /usr/local/lib"
# shared library search paths
kern_securelevel="-1" # range: -1..3 ; `-1' is the most insecure
update_motd="YES" # update version info in /etc/motd (or NO)

0 comments on commit b519f37

Please sign in to comment.