Subject: bin/4140: make fixes for ELF environments
To: None <gnats-bugs@gnats.netbsd.org>
From: None <dholland@eecs.harvard.edu>
List: netbsd-bugs
Date: 09/22/1997 19:16:24
>Number:         4140
>Category:       bin
>Synopsis:       some ifdef fixes for ELF .a support
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Sep 22 23:50:01 1997
>Last-Modified:
>Originator:     David A. Holland <dholland@eecs.harvard.edu>
>Organization:
   - David A. Holland             |    VINO project home page:
     dholland@eecs.harvard.edu    | http://www.eecs.harvard.edu/vino
>Release:        1.2
>Environment:
	
System: NetBSD chianti.eecs.harvard.edu 1.2.1 NetBSD 1.2.1 (CHIANTI) #1: Tue Sep 9 16:52:39 EDT 1997 root@chianti.eecs.harvard.edu:/usr/src/sys/arch/i386/compile/CHIANTI i386

This was actually found in -current of 19970410.

>Description:
	make knows a bit more than is good for it about .a files.
	The mechanism it uses for determining when it needs to know about
	System V ar formats doesn't quite work as well as it might.

	Consequently, using make with elf .a files causes it to spuriously
	decide they are out of date.
>How-To-Repeat:
>Fix:

Index: arch.c
===================================================================
RCS file: /home/vino/repo/src/tools/make/arch.c,v
retrieving revision 1.2
diff -u -r1.2 arch.c
--- arch.c	1997/09/11 19:42:29	1.2
+++ arch.c	1997/09/11 19:54:39
@@ -123,7 +123,7 @@
 static void ArchFree __P((ClientData));
 static struct ar_hdr *ArchStatMember __P((char *, char *, Boolean));
 static FILE *ArchFindMember __P((char *, char *, struct ar_hdr *, char *));
-#if defined(__svr4__) || defined(__SVR4)
+#if defined(__svr4__) || defined(__SVR4) || defined(__ELF__)
 #define SVR4ARCHIVES
 static int ArchSVR4Entry __P((Arch *, char *, size_t, FILE *));
 #endif
Index: config.h
===================================================================
RCS file: /home/vino/repo/src/tools/make/config.h,v
retrieving revision 1.1.1.2
diff -u -r1.1.1.2 config.h
--- config.h	1997/04/14 21:01:24	1.1.1.2
+++ config.h	1997/09/11 20:20:18
@@ -111,7 +111,7 @@
  */
 #define SUNSHCMD
 
-#if !defined(__svr4__) && !defined(__SVR4)
+#if !defined(__svr4__) && !defined(__SVR4) && !defined(__ELF__)
 # ifndef RANLIBMAG
 #  define RANLIBMAG "__.SYMDEF"
 # endif
>Audit-Trail:
>Unformatted: