Dynamic root: Add "/lib" to gold and ld linker search paths master
authorJohn Marino <draco@marino.st>
Thu, 17 Apr 2014 07:06:17 +0000 (09:06 +0200)
committerFran├žois Tigeot <ftigeot@wolfpond.org>
Thu, 17 Apr 2014 08:09:48 +0000 (10:09 +0200)
This fixes numerous new dports failures seen during linking.

contrib/binutils-2.22/gold/options.cc
contrib/binutils-2.24/gold/options.cc
gnu/usr.bin/binutils222/ld/Makefile.i386
gnu/usr.bin/binutils222/ld/Makefile.x86_64
gnu/usr.bin/binutils224/ld/Makefile.i386
gnu/usr.bin/binutils224/ld/Makefile.x86_64

index 55e2956..1354974 100644 (file)
@@ -1143,6 +1143,7 @@ General_options::finalize()
     }
   else if (!this->nostdlib())
     {
+      this->add_to_library_path_with_sysroot(USRDATA_PREFIX "/lib");
       this->add_to_library_path_with_sysroot(USRDATA_PREFIX "/usr/lib");
     }
 
index a8b7d17..e4876be 100644 (file)
@@ -1141,6 +1141,7 @@ General_options::finalize()
               || this->user_set_sysroot()
               || *TARGET_SYSTEM_ROOT != '\0')
        {
+         this->add_to_library_path_with_sysroot(USRDATA_PREFIX "/lib");
          this->add_to_library_path_with_sysroot(USRDATA_PREFIX "/usr/lib");
        }
       else
index 041f13f..931c4d3 100644 (file)
@@ -5,9 +5,9 @@ NATIVE_EMULATION=       elf_i386
 HOST=  ${TARGET_TUPLE}
 CFLAGS+= -DDEFAULT_EMULATION=\"${NATIVE_EMULATION}\"
 CFLAGS+= -DTARGET=\"${TARGET_TUPLE}\"
-_i386_path=    ${USRDATA_PREFIX}/usr/lib
+_i386_path=    ${USRDATA_PREFIX}/lib:${USRDATA_PREFIX}/usr/lib
 .else
-_i386_path=    /usr/cross/i386-dragonfly/usr/lib
+_i386_path=    /usr/cross/i386-dragonfly/lib:/usr/cross/i386-dragonfly/usr/lib
 .endif
 EMS+=          ${NATIVE_EMULATION}
 .for ext in ${ELF_SCR_EXT}
index b774d84..98d63b3 100644 (file)
@@ -4,7 +4,7 @@ NATIVE_EMULATION=       elf_x86_64
 HOST=  ${TARGET_TUPLE}
 CFLAGS+= -DDEFAULT_EMULATION=\"${NATIVE_EMULATION}\"
 CFLAGS+= -DTARGET=\"${TARGET_TUPLE}\"
-_x86_64_path=  ${USRDATA_PREFIX}/usr/lib
+_x86_64_path=  ${USRDATA_PREFIX}/lib:${USRDATA_PREFIX}/usr/lib
 EMS+=          ${NATIVE_EMULATION}
 .for ext in ${ELF_SCR_EXT}
 LDSCRIPTS_${NATIVE_EMULATION}+=        ${NATIVE_EMULATION}.${ext}
@@ -33,7 +33,7 @@ e${NATIVE_EMULATION}.c ${LDSCRIPTS_${NATIVE_EMULATION}}: \
 
 X86_EMULATION= elf_i386
 # XXX adjust path
-_i386_path=    ${USRDATA_PREFIX}/usr/lib/i386
+_i386_path=    ${USRDATA_PREFIX}/lib/i386:${USRDATA_PREFIX}/usr/lib/i386
 EMS+=          ${X86_EMULATION}
 .for ext in ${ELF_SCR_EXT}
 LDSCRIPTS_${X86_EMULATION}+=   ${X86_EMULATION}.${ext}
index 21e1d4d..772cf62 100644 (file)
@@ -5,9 +5,9 @@ NATIVE_EMULATION=       elf_i386
 HOST=  ${TARGET_TUPLE}
 CFLAGS+= -DDEFAULT_EMULATION=\"${NATIVE_EMULATION}\"
 CFLAGS+= -DTARGET=\"${TARGET_TUPLE}\"
-_i386_path=    ${USRDATA_PREFIX}/usr/lib
+_i386_path=    ${USRDATA_PREFIX}/lib:${USRDATA_PREFIX}/usr/lib
 .else
-_i386_path=    /usr/cross/i386-dragonfly/usr/lib
+_i386_path=    /usr/cross/i386-dragonfly/lib:/usr/cross/i386-dragonfly/usr/lib
 .endif
 EMS+=          ${NATIVE_EMULATION}
 .for ext in ${ELF_SCR_EXT}
index 04a4203..7dfd578 100644 (file)
@@ -4,7 +4,7 @@ NATIVE_EMULATION=       elf_x86_64
 HOST=  ${TARGET_TUPLE}
 CFLAGS+= -DDEFAULT_EMULATION=\"${NATIVE_EMULATION}\"
 CFLAGS+= -DTARGET=\"${TARGET_TUPLE}\"
-_x86_64_path=  ${USRDATA_PREFIX}/usr/lib
+_x86_64_path=  ${USRDATA_PREFIX}/lib:${USRDATA_PREFIX}/usr/lib
 EMS+=          ${NATIVE_EMULATION}
 .for ext in ${ELF_SCR_EXT}
 LDSCRIPTS_${NATIVE_EMULATION}+=        ${NATIVE_EMULATION}.${ext}
@@ -33,7 +33,7 @@ e${NATIVE_EMULATION}.c ${LDSCRIPTS_${NATIVE_EMULATION}}: \
 
 X86_EMULATION= elf_i386
 # XXX adjust path
-_i386_path=    ${USRDATA_PREFIX}/usr/lib/i386
+_i386_path=    ${USRDATA_PREFIX}/lib/i386:${USRDATA_PREFIX}/usr/lib/i386
 EMS+=          ${X86_EMULATION}
 .for ext in ${ELF_SCR_EXT}
 LDSCRIPTS_${X86_EMULATION}+=   ${X86_EMULATION}.${ext}