Subject: pkg/9902: Backwards ELF test in pkgsrc/libtool (1.3.4)
To: None <gnats-bugs@gnats.netbsd.org>
From: None <mason@primenet.com.au>
List: netbsd-bugs
Date: 04/16/2000 09:06:15
>Number:         9902
>Category:       pkg
>Synopsis:       Backwards ELF test in pkgsrc/libtool (1.3.4)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Apr 16 09:07:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     Geoff C. Wing
>Release:        20000416
>Organization:
Geoff Wing : <gcw@pobox.com>     Work URL: http://www.primenet.com.au/
Rxvt Stuff : <gcw@rxvt.org>      Ego URL : http://pobox.com/~gcw/
Zsh Stuff  : <gcw@zsh.org>       Phone   : (Australia) 0413 431 874
>Environment:
System: NetBSD c.primenet.com.au 1.4X NetBSD 1.4X (C) #0: Mon Apr 3 04:06:56 EST 2000 mason@c.primenet.com.au:/usr/netbsd/src/sys/arch/i386/compile/C i386


>Description:
	pkgsrc/libtool (1.3.4) uses a test for ELFness.  Backwards.

	from ltconfig.in:
	  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
	    -- do ELF stuff --     <<<<Heh, we're in a.out land here
	  else
	    -- do a.out stuff --   <<<<and this is ELFland here
	  fi

>How-To-Repeat:
	Try to use libtool-1.3.4
>Fix:
	Add patches/patch-ab:

--- ltconfig.in.orig	Mon Dec  6 21:09:59 1999
+++ ltconfig.in	Mon Apr 17 01:40:43 2000
@@ -1188,11 +1188,11 @@
 
   netbsd*)
     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-      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
       archive_cmds='$LD -Bshareable $libobjs $deplibs $linkopts -o $lib'
       # can we support soname and/or expsyms with a.out? -oliva
+    else
+      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'
     fi
     ;;
 
>Release-Note:
>Audit-Trail:
>Unformatted: