Skip to content

Commit ff9b753

Browse files
committed
# Fix broken files
1 parent 00f8f24 commit ff9b753

2 files changed

Lines changed: 98 additions & 9 deletions

File tree

ltconfig

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1188,8 +1188,8 @@ EOF
11881188

11891189
netbsd*)
11901190
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1191-
archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
1192-
archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1191+
archive_cmds='$CC -shared $compile_rpath $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
1192+
archive_expsym_cmds='$CC -shared $compile_rpath $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
11931193
else
11941194
archive_cmds='$LD -Bshareable $libobjs $deplibs $linkopts -o $lib'
11951195
# can we support soname and/or expsyms with a.out? -oliva
@@ -1210,8 +1210,8 @@ EOF
12101210
12111211
EOF
12121212
elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1213-
archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
1214-
archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1213+
archive_cmds='$CC -shared $compile_rpath $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
1214+
archive_expsym_cmds='$CC -shared $compile_rpath $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
12151215
else
12161216
ld_shlibs=no
12171217
fi
@@ -1226,8 +1226,8 @@ EOF
12261226

12271227
*)
12281228
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1229-
archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
1230-
archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1229+
archive_cmds='$CC -shared $compile_rpath $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
1230+
archive_expsym_cmds='$CC -shared $compile_rpath $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
12311231
else
12321232
ld_shlibs=no
12331233
fi
@@ -1428,9 +1428,9 @@ else
14281428
no_undefined_flag=' -z text'
14291429
# $CC -shared without GNU ld will not create a library from C++
14301430
# object files and a static libstdc++, better avoid it by now
1431-
archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linkopts'
1431+
archive_cmds='$LD $compile_rpath -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linkopts'
14321432
archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
1433-
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linkopts~$rm $lib.exp'
1433+
$LD $compile_rpath -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linkopts~$rm $lib.exp'
14341434
hardcode_libdir_flag_spec='-R$libdir'
14351435
hardcode_shlibpath_var=no
14361436
case "$host_os" in

ltmain.sh

Lines changed: 90 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1162,7 +1162,7 @@ compiler."
11621162

11631163
*.o | *.obj | *.a | *.lib)
11641164
# A standard object.
1165-
objs="$objs $arg"
1165+
libobjs="$libobjs $arg"
11661166
;;
11671167

11681168
*.lo)
@@ -1796,6 +1796,94 @@ compiler."
17961796
esac
17971797
fi
17981798

1799+
if test -n "$rpath$xrpath"; then
1800+
# If the user specified any rpath flags, then add them.
1801+
for libdir in $rpath $xrpath; do
1802+
# This is the magic to use -rpath.
1803+
case "$compile_rpath " in
1804+
*" $libdir "*) ;;
1805+
*) compile_rpath="$compile_rpath $libdir" ;;
1806+
esac
1807+
case "$finalize_rpath " in
1808+
*" $libdir "*) ;;
1809+
*) finalize_rpath="$finalize_rpath $libdir" ;;
1810+
esac
1811+
done
1812+
fi
1813+
1814+
# Now hardcode the library paths
1815+
rpath=
1816+
hardcode_libdirs=
1817+
for libdir in $compile_rpath; do
1818+
if test -n "$hardcode_libdir_flag_spec"; then
1819+
if test -n "$hardcode_libdir_separator"; then
1820+
if test -z "$hardcode_libdirs"; then
1821+
hardcode_libdirs="$libdir"
1822+
else
1823+
# Just accumulate the unique libdirs.
1824+
case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
1825+
*"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
1826+
;;
1827+
*)
1828+
hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
1829+
;;
1830+
esac
1831+
fi
1832+
else
1833+
eval flag=\"$hardcode_libdir_flag_spec\"
1834+
rpath="$rpath $flag"
1835+
fi
1836+
elif test -n "$runpath_var"; then
1837+
case "$perm_rpath " in
1838+
*" $libdir "*) ;;
1839+
*) perm_rpath="$perm_rpath $libdir" ;;
1840+
esac
1841+
fi
1842+
done
1843+
# Substitute the hardcoded libdirs into the rpath.
1844+
if test -n "$hardcode_libdir_separator" &&
1845+
test -n "$hardcode_libdirs"; then
1846+
libdir="$hardcode_libdirs"
1847+
eval rpath=\" $hardcode_libdir_flag_spec\"
1848+
fi
1849+
compile_rpath="$rpath"
1850+
1851+
rpath=
1852+
hardcode_libdirs=
1853+
for libdir in $finalize_rpath; do
1854+
if test -n "$hardcode_libdir_flag_spec"; then
1855+
if test -n "$hardcode_libdir_separator"; then
1856+
if test -z "$hardcode_libdirs"; then
1857+
hardcode_libdirs="$libdir"
1858+
else
1859+
# Just accumulate the unique libdirs.
1860+
case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
1861+
*"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
1862+
;;
1863+
*)
1864+
hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
1865+
;;
1866+
esac
1867+
fi
1868+
else
1869+
eval flag=\"$hardcode_libdir_flag_spec\"
1870+
rpath="$rpath $flag"
1871+
fi
1872+
elif test -n "$runpath_var"; then
1873+
case "$finalize_perm_rpath " in
1874+
*" $libdir "*) ;;
1875+
*) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
1876+
esac
1877+
fi
1878+
done
1879+
# Substitute the hardcoded libdirs into the rpath.
1880+
if test -n "$hardcode_libdir_separator" &&
1881+
test -n "$hardcode_libdirs"; then
1882+
libdir="$hardcode_libdirs"
1883+
eval rpath=\" $hardcode_libdir_flag_spec\"
1884+
fi
1885+
finalize_rpath="$rpath"
1886+
17991887
# Create the output directory, or remove our outputs if we need to.
18001888
if test -d $output_objdir; then
18011889
$show "${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*"
@@ -1955,6 +2043,7 @@ EOF
19552043
done
19562044
done
19572045
if test -n "$a_deplib" ; then
2046+
newdeplibs="$newdeplibs $a_deplib"
19582047
droppeddeps=yes
19592048
echo
19602049
echo "*** Warning: This library needs some functionality provided by $a_deplib."

0 commit comments

Comments
 (0)