From: Alexandre Oliva Date: Fri, 26 Mar 1999 00:08:41 +0000 (+0000) Subject: * demo/Makefile.am: create a static library, link two libtool X-Git-Tag: release-1-3~97 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e8f3587f5dcb7bfb4a4c1a0415d07eb618d5124b;p=thirdparty%2Flibtool.git * demo/Makefile.am: create a static library, link two libtool archives with it, then link the program hell0 with both * demo/hell1.c, demo/hell2.c: dummy files used to create the libtool archives without introducing symbol conflicts * tests/demo-exec.test, tests/demo-inst.test: run the new program * ltconfig.in (irix5*, irix6*, deplibs_check_method): pass_all --- diff --git a/ChangeLog b/ChangeLog index 0557c0537..1f5fc94c2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 1999-03-25 Alexandre Oliva + * demo/Makefile.am: create a static library, link two libtool + archives with it, then link the program hell0 with both + * demo/hell1.c, demo/hell2.c: dummy files used to create the + libtool archives without introducing symbol conflicts + * tests/demo-exec.test, tests/demo-inst.test: run the new program + * ltconfig.in (irix5*, irix6*, deplibs_check_method): pass_all + * ltmain.in ($PATH): instead of modifying the PATH, better prevent its expansion the first time *_cmds variables are eval'ed. Modify $show within loops that eval them so as to expand variables diff --git a/demo/Makefile.am b/demo/Makefile.am index 87b7ef3f6..f83e5c213 100644 --- a/demo/Makefile.am +++ b/demo/Makefile.am @@ -49,6 +49,19 @@ helldl: chmod +x $@ endif +# This is one of the essential tests for deplibs_check_method=pass_all. +# If this one passes with pass_all, it is likely that pass_all works +noinst_LIBRARIES = libhell0.a +libhell0_a_SOURCES = hello.c foo.c +lib_LTLIBRARIES += libhell1.la libhell2.la +libhell1_la_SOURCES = hell1.c +libhell2_la_SOURCES = hell2.c +libhell1_la_LIBADD = -L. -lhell0 # libtool rejects libhell0.la +libhell2_la_LIBADD = -L. -lhell0 # we have to use -L/-l. Why? +bin_PROGRAMS += hell0 +hell0_SOURCES = main.c +hell0_LDADD = libhell1.la libhell2.la + # Unfortunately, in order to test libtool thoroughly, we need access # to its private directory. objdir = `sed -n -e 's/^objdir=\(.*\)$$/\1/p' ../libtool` diff --git a/demo/hell1.c b/demo/hell1.c new file mode 100644 index 000000000..52e5148d3 --- /dev/null +++ b/demo/hell1.c @@ -0,0 +1 @@ +int hell1() { return 1; } diff --git a/demo/hell2.c b/demo/hell2.c new file mode 100644 index 000000000..c1ff477e0 --- /dev/null +++ b/demo/hell2.c @@ -0,0 +1 @@ +int hell2() { return 2; } diff --git a/ltconfig.in b/ltconfig.in index a1f2995b3..81f4473c6 100755 --- a/ltconfig.in +++ b/ltconfig.in @@ -1718,10 +1718,8 @@ irix5*) soname_spec='${libname}${release}.so' library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' shlibpath_var=LD_LIBRARY_PATH - deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1" # or should it be pass_all? - file_magic_cmd=/usr/bin/file - file_magic_test_file=`echo /lib/libc.so*` shlibpath_overrides_runpath=no + deplibs_check_method=pass_all ;; irix6*) @@ -1744,9 +1742,7 @@ irix6*) # there either sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" - deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1" # or should it be pass_all? - file_magic_cmd=/usr/bin/file - file_magic_test_file=`echo /lib${libsuff}/libc.so*` + deplibs_check_method=pass_all ;; # No shared lib support for Linux oldld, aout, or coff. diff --git a/tests/demo-exec.test b/tests/demo-exec.test index 0980d5a6d..f872c19af 100755 --- a/tests/demo-exec.test +++ b/tests/demo-exec.test @@ -32,6 +32,12 @@ else status=1 fi +if ../demo/hell0 | grep 'Welcome to GNU Hell'; then : +else + echo "$0: cannot execute ../demo/hell0" 1>&2 + status=1 +fi + if ../demo/helldl | egrep -e '(Welcome to .*GNU Hell|unsupported)'; then : else echo "$0: cannot execute ../demo/helldl" 1>&2 diff --git a/tests/demo-inst.test b/tests/demo-inst.test index da47fc5d1..290031528 100755 --- a/tests/demo-inst.test +++ b/tests/demo-inst.test @@ -43,6 +43,18 @@ else status=1 fi +if $prefix/bin/hell0 | grep 'Welcome to GNU Hell'; then : +else + echo "$0: cannot execute $prefix/bin/hell0" 1>&2 + + # Simple check to see if they are superuser. + if test -w /; then : + else + echo "You may need to run $0 as the superuser." + fi + status=1 +fi + if $prefix/bin/helldl | egrep -e '(Welcome to .*GNU Hell|unsupported)'; then : else echo "$0: cannot execute $prefix/bin/helldl" 1>&2