source: scripts_home/scripts/untested/autotools/patches/libtool-1.4.2-expsym-linux.patch@ 1c9c5c3

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 1c9c5c3 was 1c9c5c3, checked in by Jim Gifford <clfs@…>, 19 years ago

r624@server (orig r622): jim | 2005-10-31 12:40:28 -0800
Rearranging Archive

  • Property mode set to 100644
File size: 1.6 KB
RevLine 
[d1afb9e]1 This patch makes -export-symbols and -export-symbols-regex work with
2 GNU ld. It creates a version script rather than using -retain-symbols-file,
3 which just selectively strips the library.
4
5--- libtool-1.4.2/libtool.m4.expsym-linux Fri Aug 23 19:01:55 2002
6+++ libtool-1.4.2/libtool.m4 Sat Aug 24 13:47:10 2002
7@@ -1401,6 +1401,30 @@
8 hardcode_shlibpath_var=no
9 ;;
10
11+ linux*)
12+ if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
13+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
14+ supports_anon_versioning=no
15+ case `$LD -v 2>/dev/null` in
16+ *\ [01].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
17+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
18+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
19+ *\ 2.11.*) ;; # other 2.11 versions
20+ *) supports_anon_versioning=yes ;;
21+ esac
22+ if test $supports_anon_versioning = yes; then
23+ archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~
24+cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
25+$echo "local: *; };" >> $output_objdir/$libname.ver~
26+ $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
27+ else
28+ $archive_expsym_cmds="$archive_cmds"
29+ fi
30+ else
31+ ld_shlibs=no
32+ fi
33+ ;;
34+
35 *)
36 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
37 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
Note: See TracBrowser for help on using the repository browser.