From 843f6e33f3e16dd691611c6bc138f011f0e64363 Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Thu, 18 Feb 1999 20:58:14 +0000 Subject: [PATCH] * ltconfig.in (ld_shlibs): move -soname and similar flags to the end of archive_cmds and archive_expsym_cmds, so as to prevent gcc's collect2 from inserting an object file between -soname and the library name --- ChangeLog | 5 +++++ ltconfig.in | 14 +++++++------- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index c4fbd893e..1480a265d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 1999-02-18 Alexandre Oliva + * ltconfig.in (ld_shlibs): move -soname and similar flags to the + end of archive_cmds and archive_expsym_cmds, so as to prevent + gcc's collect2 from inserting an object file between -soname and + the library name + * ltconfig.in (openbsd*, netbsd*, library_names_spec): append alternate name without ${release}, otherwise build fails when -release is used diff --git a/ltconfig.in b/ltconfig.in index 44e71bdc1..27c2845ef 100755 --- a/ltconfig.in +++ b/ltconfig.in @@ -1076,7 +1076,7 @@ if test "$with_gnu_ld" = yes; then beos*) if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -nostart ${wl}-soname $wl$soname -o $lib $libobjs $deplibs $linkopts' + archive_cmds='$CC -nostart $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib' else ld_shlibs=no fi @@ -1106,8 +1106,8 @@ if test "$with_gnu_ld" = yes; then *) if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared ${wl}-soname $wl$soname -o $lib $libobjs $deplibs $linkopts' - archive_expsym_cmds='$CC -shared ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib $libobjs $deplibs $linkopts' + archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi @@ -1239,9 +1239,9 @@ else irix5* | irix6*) if test "$with_gcc" = yes; then - archive_cmds='$CC -shared -o $lib ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` $libobjs $deplibs $linkopts' + archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' else - archive_cmds='$LD -shared -o $lib -soname $soname `test -n "$verstring" && echo -set_version $verstring` $libobjs $deplibs $linkopts' + archive_cmds='$LD -shared $libobjs $deplibs $linkopts -soname $soname `test -n "$verstring" && echo -set_version $verstring` -o $lib' fi hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: @@ -1276,10 +1276,10 @@ else osf3* | osf4*) if test "$with_gcc" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} -o $lib ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` $libobjs $deplibs $linkopts' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' else allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$LD -shared${allow_undefined_flag} -o $lib -soname $soname `test -n "$verstring" && echo -set_version $verstring` $libobjs $deplibs $linkopts' + archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linkopts -soname $soname `test -n "$verstring" && echo -set_version $verstring` -o $lib' fi hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: -- 2.47.3