NetBSD Problem Report #48227

From ryo_on@yk.rim.or.jp  Sat Sep 21 02:57:22 2013
Return-Path: <ryo_on@yk.rim.or.jp>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 6CDAB725B4
	for <gnats-bugs@gnats.NetBSD.org>; Sat, 21 Sep 2013 02:57:22 +0000 (UTC)
Message-Id: <20130921025715.B8C9D2026F8E0@mail.SiriusCloud.jp>
Date: Sat, 21 Sep 2013 11:57:15 +0900 (JST)
From: ryoon@NetBSD.org
Reply-To: ryoon@NetBSD.org
To: gnats-bugs@gnats.NetBSD.org
Subject: Please update devel/elftoolchain to 0.6.1
X-Send-Pr-Version: 3.95

>Number:         48227
>Category:       pkg
>Synopsis:       Please update devel/elftoolchain to 0.6.1
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    agc
>State:          analyzed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Sep 21 03:00:00 +0000 2013
>Closed-Date:    
>Last-Modified:  Sat May 14 19:30:01 +0000 2016
>Originator:     Ryo ONODERA
>Release:        NetBSD 6.99.23
>Organization:

>Environment:


System: NetBSD tellurium.elements.tetera.org 6.99.23 NetBSD 6.99.23 (DTRACE) #4: Tue Sep 3 09:25:35 JST 2013 ryo_on@tellurium.elements.tetera.org:/usr/obj/amd64/sys/arch/amd64/compile/DTRACE amd64
Architecture: x86_64
Machine: amd64
>Description:
Please update devel/elftoolchain to latest version, 0.6.1.
See http://sourceforge.net/apps/trac/elftoolchain/ (redirect destination
of HOMEPAGE).
Changes are shown in RELEASE-NOTES file.

By the way, elftoolchain conflicts with libelf (dependency of glib2) and
actually almost all people cannot install it.
My patch rename libelf to libelfbase and remove conflict.
If such renaming is not acceptable by MAINTAINER, plese remove them,
simply remove patches for *Makefiles.

>How-To-Repeat:

>Fix:

Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/devel/elftoolchain/Makefile,v
retrieving revision 1.6
diff -u -r1.6 Makefile
--- Makefile	10 Sep 2013 14:16:52 -0000	1.6
+++ Makefile	21 Sep 2013 02:48:59 -0000
@@ -1,9 +1,8 @@
 # $NetBSD: Makefile,v 1.6 2013/09/10 14:16:52 joerg Exp $

-DISTNAME=	elftoolchain-0.5.1
-PKGREVISION=	1
+DISTNAME=	elftoolchain-0.6.1
 CATEGORIES=	devel
-MASTER_SITES=	${MASTER_SITE_SOURCEFORGE:=elftoolchain/${DISTNAME}/}
+MASTER_SITES=	${MASTER_SITE_SOURCEFORGE:=elftoolchain/}
 EXTRACT_SUFX=	.tar.bz2

 MAINTAINER=	agc@NetBSD.org
@@ -11,8 +10,6 @@
 COMMENT=	Compilation tools (nm, ar, as, ld, etc.) for the ELF object format
 LICENSE=	modified-bsd

-CONFLICTS=	libelf-[0-9]*
-
 PKG_INSTALLATION_TYPES=	overwrite pkgviews

 MAKE_JOBS_SAFE=	no
Index: PLIST
===================================================================
RCS file: /cvsroot/pkgsrc/devel/elftoolchain/PLIST,v
retrieving revision 1.2
diff -u -r1.2 PLIST
--- PLIST	26 Nov 2011 15:50:27 -0000	1.2
+++ PLIST	21 Sep 2013 02:48:59 -0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.2 2011/11/26 15:50:27 dholland Exp $
+@comment $NetBSD$
 bin/addr2line
 bin/ar
 bin/brandelf
@@ -19,12 +19,12 @@
 lib/libdwarf.so.3.0
 lib/libdwarf_p.a
 lib/libdwarf_pic.a
-lib/libelf.a
-lib/libelf.so
-lib/libelf.so.1
-lib/libelf.so.1.0
-lib/libelf_p.a
-lib/libelf_pic.a
+lib/libelfbase.a
+lib/libelfbase.so
+lib/libelfbase.so.1
+lib/libelfbase.so.1.0
+lib/libelfbase_p.a
+lib/libelfbase_pic.a
 lib/libelftc.a
 lib/libelftc.so
 lib/libelftc.so.1
@@ -317,6 +317,8 @@
 man/cat3/elf_newscn.0
 man/cat3/elf_next.0
 man/cat3/elf_nextscn.0
+man/cat3/elf_open.0
+man/cat3/elf_openmemory.0
 man/cat3/elf_rand.0
 man/cat3/elf_rawdata.0
 man/cat3/elf_rawfile.0
@@ -328,7 +330,9 @@
 man/cat3/elftc_bfd_target_byteorder.0
 man/cat3/elftc_bfd_target_class.0
 man/cat3/elftc_bfd_target_flavor.0
+man/cat3/elftc_copyfile.0
 man/cat3/elftc_demangle.0
+man/cat3/elftc_set_timestamps.0
 man/cat3/elftc_version.0
 man/cat3/gelf.0
 man/cat3/gelf_checksum.0
@@ -647,6 +651,8 @@
 man/man3/elf_newscn.3
 man/man3/elf_next.3
 man/man3/elf_nextscn.3
+man/man3/elf_open.3
+man/man3/elf_openmemory.3
 man/man3/elf_rand.3
 man/man3/elf_rawdata.3
 man/man3/elf_rawfile.3
@@ -658,7 +664,9 @@
 man/man3/elftc_bfd_target_byteorder.3
 man/man3/elftc_bfd_target_class.3
 man/man3/elftc_bfd_target_flavor.3
+man/man3/elftc_copyfile.3
 man/man3/elftc_demangle.3
+man/man3/elftc_set_timestamps.3
 man/man3/elftc_version.3
 man/man3/gelf.3
 man/man3/gelf_checksum.3
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/devel/elftoolchain/distinfo,v
retrieving revision 1.3
diff -u -r1.3 distinfo
--- distinfo	28 Sep 2012 08:59:07 -0000	1.3
+++ distinfo	21 Sep 2013 02:48:59 -0000
@@ -1,23 +1,22 @@
 $NetBSD: distinfo,v 1.3 2012/09/28 08:59:07 dholland Exp $

-SHA1 (elftoolchain-0.5.1.tar.bz2) = 333cfce857ca220177d0a5d111d40afca1eea0c7
-RMD160 (elftoolchain-0.5.1.tar.bz2) = 4be0adf8349c764474810e23cfb022c655002d77
-Size (elftoolchain-0.5.1.tar.bz2) = 5008332 bytes
-SHA1 (patch-aa) = e3588a6580ece7159b109e01730f144703aeda1d
-SHA1 (patch-ab) = 7ed42bdf24917a01e42580958d29078c7143168c
-SHA1 (patch-ac) = c681369aa0dd87a1b2fa5ede647f267a4c132e87
-SHA1 (patch-ad) = 22a254add215d7fa18b32e17e30c92d451c2cecd
-SHA1 (patch-ae) = 19f04351c82e4ab421582a2d5b2761308aeff53d
-SHA1 (patch-af) = 8de41e29969295b668deee22d6bbb761a586059a
-SHA1 (patch-ag) = adbf0b3ba6121bc9b3351cf2f79863a8bafc13d8
-SHA1 (patch-ah) = 1c1d31443566994f48d3b7e9ab2385bd4c07d55e
-SHA1 (patch-ai) = 37e8a01421c926b995f7a5cd32c77df7b18bd28f
-SHA1 (patch-aj) = 1656ff3c1a9dd9fe27af122d9cbe605092a40925
-SHA1 (patch-ak) = 699aeca92ce35f57988b6135c6b7f3a8f533825f
-SHA1 (patch-al) = 1ca5bb02b4bf8b4d0820747c3398d1f5f317c66c
-SHA1 (patch-am) = 286bd77aef36812b60fb29218368573b74ac892e
-SHA1 (patch-an) = 6de919bb0cf3f406c9b5addcf868c57d5d71403e
-SHA1 (patch-ar_acpyacc_y) = 462e9463ff66defe76759d4eb58d3b5d98c846b9
-SHA1 (patch-libdwarf_Makefile) = bea37cf65de237146dc51a71aed04581bc6c1d95
-SHA1 (patch-libelf_Makefile) = 29fdcead0e1d01ba2cf1d9e16e9d50bc041c9eec
-SHA1 (patch-libelftc_Makefile) = a91f55e598482123a04dd5e50e5d992a8d866036
+SHA1 (elftoolchain-0.6.1.tar.bz2) = 4ef1ac0642e5e01738121fd74ccfe76c85426f4f
+RMD160 (elftoolchain-0.6.1.tar.bz2) = 4268371905cb6e1741371cfb957bf8a7cb04ce18
+Size (elftoolchain-0.6.1.tar.bz2) = 5085425 bytes
+SHA1 (patch-addr2line_Makefile) = 844f9396d922175e674019b55b9e9f03a3431a8a
+SHA1 (patch-am) = e4b1ae2c940b103f028bad1f761ff4553a210b94
+SHA1 (patch-ar_Makefile) = d24f52fd58ee5ada741c87b28be9499f2619c58a
+SHA1 (patch-brandelf_Makefile) = ab29162738255f0e12be0eb3c6e20dcdc3ebea3c
+SHA1 (patch-cxxfilt_Makefile) = 256b2acccd64b271b02a58cd529660593a92f5bd
+SHA1 (patch-elfcopy_Makefile) = ca6a125bbb0eb46b0ce50e70809e8668a6f63e6e
+SHA1 (patch-elfdump_Makefile) = ba748490a4e8235413141eef78d6d1ff66753f44
+SHA1 (patch-findtextrel_Makefile) = 62cd4ef1553dffb5bd1b36d9fa0313fc70f9abe9
+SHA1 (patch-libdwarf_Makefile) = 7812380c95f16364301ea589f3d9a08e775623d0
+SHA1 (patch-libelf_Makefile) = 8509929bc03d544f73dbbce9dc5a6de454d35b33
+SHA1 (patch-libelftc_Makefile) = 90b425f519a8c916df59573c71ab9ac6702b647c
+SHA1 (patch-mk_elftoolchain.lib.mk) = dd2b29f72d78f51cfe276931054f068a2c9a1229
+SHA1 (patch-mk_elftoolchain.prog.mk) = f3e6d54369659b599a333fba3606252bef78e81b
+SHA1 (patch-nm_Makefile) = aacca35a9522e74eb3b3aee8e48a3487bc9ad26f
+SHA1 (patch-readelf_Makefile) = 6cea4e14e05d48b28baf5bbf7dcb2777f498a7c0
+SHA1 (patch-size_Makefile) = 8dbfdc05c689215f74c1a370aaae61dd91a4ff44
+SHA1 (patch-strings_Makefile) = 404f719a6de3ff939ff79ee15c534218d348a43b
Index: patches/patch-aa
===================================================================
RCS file: patches/patch-aa
diff -N patches/patch-aa
--- patches/patch-aa	20 Nov 2011 06:25:18 -0000	1.1.1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,15 +0,0 @@
-$NetBSD: patch-aa,v 1.1.1.1 2011/11/20 06:25:18 agc Exp $
-
-Fix warning for printf format messages with gcc 4.5 and -Wformat=2
-
---- addr2line/addr2line.c	2011/11/18 20:38:58	1.1
-+++ addr2line/addr2line.c	2011/11/18 20:39:27
-@@ -57,7 +57,7 @@
- static char unknown[] = { '?', '?', '\0' };
- static Dwarf_Addr section_base;
- 
--static const char *usagemsg = "\
-+static const char usagemsg[] = "\
- Usage: %s [options] hexaddress...\n\
-   Map program addresses to source file names and line numbers.\n\n\
-   Options:\n\
Index: patches/patch-ab
===================================================================
RCS file: patches/patch-ab
diff -N patches/patch-ab
--- patches/patch-ab	20 Nov 2011 06:25:18 -0000	1.1.1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,48 +0,0 @@
-$NetBSD: patch-ab,v 1.1.1.1 2011/11/20 06:25:18 agc Exp $
-
-Fix warning for printf format messages with gcc 4.5 and -Wformat=2
-
---- ar/ar.c	2011/11/18 20:41:01	1.1
-+++ ar/ar.c	2011/11/18 20:41:58
-@@ -370,7 +370,7 @@
- 		    opt, bsdar->mode);
- }
- 
--static const char *ar_usagemsg = "\
-+static const char ar_usagemsg[] = "\
- Usage: %s <command> [options] archive file...\n\
-   Manage archives.\n\n\
-   Where <command> is one of:\n\
-@@ -404,13 +404,13 @@
- ";
- 
- static void
--bsdar_usage()
-+bsdar_usage(void)
- {
- 	(void) fprintf(stderr, ar_usagemsg, ELFTC_GETPROGNAME());
- 	exit(EXIT_FAILURE);
- }
- 
--static const char *ranlib_usagemsg = "\
-+static const char ranlib_usagemsg[] = "\
- Usage: %s [options] archive...\n\
-   Update or create archive symbol tables.\n\n\
-   Options:\n\
-@@ -420,14 +420,14 @@
- ";
- 
- static void
--ranlib_usage()
-+ranlib_usage(void)
- {
- 	(void)fprintf(stderr, ranlib_usagemsg, ELFTC_GETPROGNAME());
- 	exit(EXIT_FAILURE);
- }
- 
- static void
--bsdar_version()
-+bsdar_version(void)
- {
- 	(void)printf("%s (%s, %s)\n", ELFTC_GETPROGNAME(), archive_version(),
- 	    elftc_version());
Index: patches/patch-ac
===================================================================
RCS file: patches/patch-ac
diff -N patches/patch-ac
--- patches/patch-ac	20 Nov 2011 06:25:18 -0000	1.1.1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,27 +0,0 @@
-$NetBSD: patch-ac,v 1.1.1.1 2011/11/20 06:25:18 agc Exp $
-
-Broken YY_NO_INPUT is only needed for NetBSD before 5.99.21
-
---- common/_elftc.h	2011/11/19 10:48:54	1.1
-+++ common/_elftc.h	2011/11/19 10:54:13
-@@ -163,6 +163,7 @@
- 
- #if defined(__NetBSD__)
- 
-+#include <sys/param.h>
- #include <sys/endian.h>
- 
- #define	ELFTC_BYTE_ORDER			_BYTE_ORDER
-@@ -170,7 +171,11 @@
- #define	ELFTC_BYTE_ORDER_BIG_ENDIAN		_BIG_ENDIAN
- 
- #define	ELFTC_HAVE_STRMODE			1
--#define	ELFTC_BROKEN_YY_NO_INPUT		1
-+#if __NetBSD_Version__ <= 599002100
-+/* from src/doc/CHANGES: flex(1): Import flex-2.5.35 [christos 20091025] */
-+/* and 5.99.21 was from Wed Oct 21 21:28:36 2009 UTC */
-+#  define ELFTC_BROKEN_YY_NO_INPUT		1
-+#endif
- #endif	/* __NetBSD __ */
- 
- #endif	/* _ELFTC_H */
Index: patches/patch-ad
===================================================================
RCS file: patches/patch-ad
diff -N patches/patch-ad
--- patches/patch-ad	20 Nov 2011 06:25:18 -0000	1.1.1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,15 +0,0 @@
-$NetBSD: patch-ad,v 1.1.1.1 2011/11/20 06:25:18 agc Exp $
-
-Fix warning for printf format messages with gcc 4.5 and -Wformat=2
-
---- brandelf/brandelf.c	2011/11/18 21:21:58	1.1
-+++ brandelf/brandelf.c	2011/11/18 21:22:12
-@@ -219,7 +219,7 @@
- 	return (retval);
- }
- 
--static const char *usagemsg = "\
-+static const char usagemsg[] = "\
- Usage: %s [options] file...\n\
-   Set or display the ABI field for an ELF object.\n\n\
-   Supported options are:\n\
Index: patches/patch-addr2line_Makefile
===================================================================
RCS file: patches/patch-addr2line_Makefile
diff -N patches/patch-addr2line_Makefile
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-addr2line_Makefile	21 Sep 2013 02:48:59 -0000
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- addr2line/Makefile.orig	2011-10-26 15:40:28.000000000 +0000
++++ addr2line/Makefile
+@@ -8,7 +8,7 @@ SRCS=	addr2line.c
+ WARNS?=	6
+ 
+ DPADD=	${LIBELF} ${LIBELFTC} ${LIBDWARF}
+-LDADD=	-lelftc -ldwarf -lelf
++LDADD=	-lelftc -ldwarf -lelfbase
+ 
+ MAN1=	addr2line.1
+ 
Index: patches/patch-ae
===================================================================
RCS file: patches/patch-ae
diff -N patches/patch-ae
--- patches/patch-ae	20 Nov 2011 06:25:18 -0000	1.1.1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,15 +0,0 @@
-$NetBSD: patch-ae,v 1.1.1.1 2011/11/20 06:25:18 agc Exp $
-
-Fix warning for printf format messages with gcc 4.5 and -Wformat=2
-
---- cxxfilt/cxxfilt.c	2011/11/18 21:24:38	1.1
-+++ cxxfilt/cxxfilt.c	2011/11/18 21:24:54
-@@ -71,7 +71,7 @@
- 	{"gnu-v3", ELFTC_DEM_GNU3}
- };
- 
--static const char *usagemsg = "\
-+static const char usagemsg[] = "\
- Usage: %s [options] [encoded-names...]\n\
-   Translate C++ symbol names to human-readable form.\n\n\
-   Options:\n\
Index: patches/patch-af
===================================================================
RCS file: patches/patch-af
diff -N patches/patch-af
--- patches/patch-af	20 Nov 2011 06:25:18 -0000	1.1.1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,33 +0,0 @@
-$NetBSD: patch-af,v 1.1.1.1 2011/11/20 06:25:18 agc Exp $
-
-Fix warning for printf format messages with gcc 4.5 and -Wformat=2
-
---- elfcopy/main.c	2011/11/18 21:25:47	1.1
-+++ elfcopy/main.c	2011/11/18 21:26:31
-@@ -1259,7 +1259,7 @@
- 		errx(EXIT_FAILURE, "unrecognized OSABI %s", abi);
- }
- 
--static const char *elfcopy_usagemsg = "\
-+static const char elfcopy_usagemsg[] = "\
- Usage: %s [options] infile [outfile]\n\
-   Transform an ELF object.\n\n\
-   Options:\n\
-@@ -1338,7 +1338,7 @@
- 	exit(EXIT_FAILURE);
- }
- 
--static const char *mcs_usagemsg = "\
-+static const char mcs_usagemsg[] = "\
- Usage: %s [options] file...\n\
-   Manipulate the comment section in an ELF object.\n\n\
-   Options:\n\
-@@ -1357,7 +1357,7 @@
- 	exit(EXIT_FAILURE);
- }
- 
--static const char *strip_usagemsg = "\
-+static const char strip_usagemsg[] = "\
- Usage: %s [options] file...\n\
-   Discard information from ELF objects.\n\n\
-   Options:\n\
Index: patches/patch-ag
===================================================================
RCS file: patches/patch-ag
diff -N patches/patch-ag
--- patches/patch-ag	20 Nov 2011 06:25:18 -0000	1.1.1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,15 +0,0 @@
-$NetBSD: patch-ag,v 1.1.1.1 2011/11/20 06:25:18 agc Exp $
-
-Fix warning for printf format messages with gcc 4.5 and -Wformat=2
-
---- elfdump/elfdump.c	2011/11/18 21:28:48	1.1
-+++ elfdump/elfdump.c	2011/11/18 21:29:03
-@@ -2736,7 +2736,7 @@
- 	PRT("\nelf checksum: %#lx\n", gelf_checksum(ed->elf));
- }
- 
--static const char *usagemsg = "\
-+static const char usagemsg[] = "\
- Usage: %s [options] file...\n\
-   Display information about ELF objects and ar(1) archives.\n\n\
-   Options:\n\
Index: patches/patch-ah
===================================================================
RCS file: patches/patch-ah
diff -N patches/patch-ah
--- patches/patch-ah	20 Nov 2011 06:25:18 -0000	1.1.1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,15 +0,0 @@
-$NetBSD: patch-ah,v 1.1.1.1 2011/11/20 06:25:18 agc Exp $
-
-Fix warning for printf format messages with gcc 4.5 and -Wformat=2
-
---- findtextrel/findtextrel.c	2011/11/18 21:29:57	1.1
-+++ findtextrel/findtextrel.c	2011/11/18 21:30:11
-@@ -47,7 +47,7 @@
- 	{NULL, 0, NULL, 0}
- };
- 
--static const char *usagemsg = "\
-+static const char usagemsg[] = "\
- Usage: %s [options] [files...]\n\
-   Show text relocations present in position independent code.\n\n\
-   Options:\n\
Index: patches/patch-ai
===================================================================
RCS file: patches/patch-ai
diff -N patches/patch-ai
--- patches/patch-ai	20 Nov 2011 06:25:18 -0000	1.1.1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,36 +0,0 @@
-$NetBSD: patch-ai,v 1.1.1.1 2011/11/20 06:25:18 agc Exp $
-
-Fix warning for printf format messages with gcc 4.5 and -Wformat=2
-
---- nm/nm.c	2011/11/18 21:31:02	1.1
-+++ nm/nm.c	2011/11/18 21:45:38
-@@ -855,9 +855,9 @@
- 
- 	if (nm_opts.demangle_type < 0 ||
- 	    elftc_demangle(name, dem, sizeof(dem), nm_opts.demangle_type) < 0)
--		printf(format, name);
-+		printf((strcmp(format, "%s") == 0) ? "%s" : "%-20s|", name);
- 	else
--		printf(format, dem);
-+		printf((strcmp(format, "%s") == 0) ? "%s" : "%-20s|", dem);
- }
- 
- static void
-@@ -1355,7 +1355,7 @@
- process_sym:
- 
- 	p_data.list_num = get_sym(elf, &list_head, shnum, dynndx, strndx,
--	    type_table, (const char **)sec_table, shnum);
-+	    type_table, (const char **)(const void **)sec_table, shnum);
- 
- 	if (p_data.list_num == 0)
- 		goto next_cmd;
-@@ -1363,7 +1363,7 @@
- 	p_data.headp = &list_head;
- 	p_data.sh_num = shnum;
- 	p_data.t_table = type_table;
--	p_data.s_table = (const char **)sec_table;
-+	p_data.s_table = (const char **)(const void **)sec_table;
- 	p_data.filename = filename;
- 	p_data.objname = objname;
- 
Index: patches/patch-aj
===================================================================
RCS file: patches/patch-aj
diff -N patches/patch-aj
--- patches/patch-aj	20 Nov 2011 06:25:18 -0000	1.1.1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,15 +0,0 @@
-$NetBSD: patch-aj,v 1.1.1.1 2011/11/20 06:25:18 agc Exp $
-
-Fix warning for printf format messages with gcc 4.5 and -Wformat=2
-
---- readelf/readelf.c	2011/11/18 21:46:36	1.1
-+++ readelf/readelf.c	2011/11/18 21:47:04
-@@ -6580,7 +6580,7 @@
- 	exit(EXIT_SUCCESS);
- }
- 
--static const char *usagemsg = "\
-+static const char usagemsg[] = "\
- Usage: %s [options] file...\n\
-   Display information about ELF objects and ar(1) archives.\n\n\
-   Options:\n\
Index: patches/patch-ak
===================================================================
RCS file: patches/patch-ak
diff -N patches/patch-ak
--- patches/patch-ak	20 Nov 2011 06:25:18 -0000	1.1.1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,15 +0,0 @@
-$NetBSD: patch-ak,v 1.1.1.1 2011/11/20 06:25:18 agc Exp $
-
-cast through void pointer first
-
---- size/size.c	2011/11/18 21:47:50	1.1
-+++ size/size.c	2011/11/18 21:48:08
-@@ -194,7 +194,7 @@
- 	argc -= optind;
- 	argv += optind;
- 
--	files = (argc == 0) ? default_args : (const char **) argv;
-+	files = (argc == 0) ? default_args : (const char **)(const void **)argv;
- 
- 	while ((fn = *files) != NULL) {
- 		rc = handle_elf(fn);
Index: patches/patch-al
===================================================================
RCS file: patches/patch-al
diff -N patches/patch-al
--- patches/patch-al	20 Nov 2011 06:25:18 -0000	1.1.1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,15 +0,0 @@
-$NetBSD: patch-al,v 1.1.1.1 2011/11/20 06:25:18 agc Exp $
-
-Fix warning for printf format messages with gcc 4.5 and -Wformat=2
-
---- strings/strings.c	2011/11/18 21:48:54	1.1
-+++ strings/strings.c	2011/11/18 21:49:07
-@@ -426,7 +426,7 @@
- 	return (RETURN_OK);
- }
- 
--static const char *usagemsg = "\
-+static const char usagemsg[] = "\
- Usage: %s [options] [file...]\n\
-   Print contiguous sequences of printable characters.\n\n\
-   Options:\n\
Index: patches/patch-am
===================================================================
RCS file: /cvsroot/pkgsrc/devel/elftoolchain/patches/patch-am,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 patch-am
--- patches/patch-am	20 Nov 2011 06:25:18 -0000	1.1.1.1
+++ patches/patch-am	21 Sep 2013 02:48:59 -0000
@@ -2,30 +2,30 @@

 don't build tests for ordinary packaging

---- Makefile	2011/11/18 21:53:08	1.1
-+++ Makefile	2011/11/18 21:53:38
-@@ -26,9 +26,9 @@
+--- Makefile.orig	2012-09-14 07:16:57.000000000 +0000
++++ Makefile
+@@ -28,9 +28,9 @@ SUBDIR += size
  SUBDIR += strings

  # Build the test suites.
--.if exists(${.CURDIR}/test)
+-.if exists(${.CURDIR}/test) && defined(MKTESTS) && ${MKTESTS} == "yes"
 -SUBDIR += test
 -.endif
-+#.if exists(${.CURDIR}/test)
++#.if exists(${.CURDIR}/test) && defined(MKTESTS) && ${MKTESTS} == "yes"
 +#SUBDIR += test
 +#.endif

  # Build documentation at the end.
- .if exists(${.CURDIR}/documentation)
-@@ -42,7 +42,7 @@
+ .if exists(${.CURDIR}/documentation) && defined(MKDOC) && ${MKDOC} == "yes"
+@@ -44,7 +44,7 @@ SUBDIR += documentation
  #

  # Run the test suites.
--.if exists(${.CURDIR}/test)
+-.if exists(${.CURDIR}/test) && defined(MKTESTS) && ${MKTESTS} == "yes"
 -run-tests:	all .PHONY
 -	(cd ${.CURDIR}/test; ${MAKE} test)
 -.endif
-+#.if exists(${.CURDIR}/test)
++#.if exists(${.CURDIR}/test) && defined(MKTESTS) && ${MKTESTS} == "yes"
 +#run-tests:	all .PHONY
 +#	(cd ${.CURDIR}/test; ${MAKE} test)
 +#.endif
Index: patches/patch-an
===================================================================
RCS file: patches/patch-an
diff -N patches/patch-an
--- patches/patch-an	20 Nov 2011 06:25:18 -0000	1.1.1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,16 +0,0 @@
-$NetBSD: patch-an,v 1.1.1.1 2011/11/20 06:25:18 agc Exp $
-
-NetBSD uses the straight "MAN" definition for manual pages
-
---- libelftc/Makefile	2011/11/19 10:22:19	1.1
-+++ libelftc/Makefile	2011/11/19 10:24:35
-@@ -28,6 +28,9 @@
- 	elftc_demangle.3 \
- 	elftc_version.3
- 
-+# for NetBSD
-+MAN=	${MAN3}
-+
- MLINKS=	elftc_bfd_find_target.3 elftc_bfd_target_byteorder.3 \
- 	elftc_bfd_find_target.3 elftc_bfd_target_class.3 \
- 	elftc_bfd_find_target.3 elftc_bfd_target_flavor.3
Index: patches/patch-ar_Makefile
===================================================================
RCS file: patches/patch-ar_Makefile
diff -N patches/patch-ar_Makefile
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-ar_Makefile	21 Sep 2013 02:48:59 -0000
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- ar/Makefile.orig	2011-12-04 07:20:46.000000000 +0000
++++ ar/Makefile
+@@ -10,7 +10,7 @@ YSRC=	acpyacc.y
+ WARNS?=	5
+ 
+ DPADD=	${LIBARCHIVE} ${LIBELFTC} ${LIBELF}
+-LDADD=	-larchive -lelftc -lelf
++LDADD=	-larchive -lelftc -lelfbase
+ 
+ CFLAGS+=-I. -I${.CURDIR}
+ 
Index: patches/patch-ar_acpyacc_y
===================================================================
RCS file: patches/patch-ar_acpyacc_y
diff -N patches/patch-ar_acpyacc_y
--- patches/patch-ar_acpyacc_y	28 Sep 2012 08:59:07 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,61 +0,0 @@
-$NetBSD: patch-ar_acpyacc_y,v 1.1 2012/09/28 08:59:07 dholland Exp $
-
-Fix warnings about old-style function definitions that are fatal in
-some(?) builds.
-
---- ar/acpyacc.y~	2011-11-10 06:56:46.000000000 +0000
-+++ ar/acpyacc.y
-@@ -414,7 +414,7 @@ arscp_extract(struct list *list)
- 
- /* List modules of archive. (Simple Mode) */
- static void
--arscp_list()
-+arscp_list(void)
- {
- 
- 	if (!arscp_target_exist())
-@@ -481,7 +481,7 @@ arscp_replace(struct list *list)
- 
- /* Rename the temporary archive to the target archive. */
- static void
--arscp_save()
-+arscp_save(void)
- {
- 	mode_t mask;
- 
-@@ -510,7 +510,7 @@ arscp_save()
-  * invoking CREATE cmd on current archive.
-  */
- static void
--arscp_clear()
-+arscp_clear(void)
- {
- 	char		*new_target;
- 
-@@ -546,7 +546,7 @@ arscp_end(int eval)
-  * issued by user.
-  */
- static int
--arscp_target_exist()
-+arscp_target_exist(void)
- {
- 
- 	if (target)
-@@ -621,7 +621,7 @@ arscp_mlist2argv(struct list *list)
- 
- /* Free space allocated for argv array and its elements. */
- static void
--arscp_free_argv()
-+arscp_free_argv(void)
- {
- 	int i;
- 
-@@ -633,7 +633,7 @@ arscp_free_argv()
- 
- /* Show a prompt if we are in interactive mode */
- static void
--arscp_prompt()
-+arscp_prompt(void)
- {
- 
- 	if (interactive) {
Index: patches/patch-brandelf_Makefile
===================================================================
RCS file: patches/patch-brandelf_Makefile
diff -N patches/patch-brandelf_Makefile
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-brandelf_Makefile	21 Sep 2013 02:48:59 -0000
@@ -0,0 +1,12 @@
+$NetBSD$
+
+--- brandelf/Makefile.orig	2011-10-26 15:40:28.000000000 +0000
++++ brandelf/Makefile
+@@ -4,6 +4,6 @@ TOP=	..
+ 
+ PROG=	brandelf
+ WARNS?=	6
+-LDADD=	-lelftc -lelf
++LDADD=	-lelftc -lelfbase
+ 
+ .include "${TOP}/mk/elftoolchain.prog.mk"
Index: patches/patch-cxxfilt_Makefile
===================================================================
RCS file: patches/patch-cxxfilt_Makefile
diff -N patches/patch-cxxfilt_Makefile
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-cxxfilt_Makefile	21 Sep 2013 02:48:59 -0000
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- cxxfilt/Makefile.orig	2011-10-26 15:40:28.000000000 +0000
++++ cxxfilt/Makefile
+@@ -8,7 +8,7 @@ SRCS=	cxxfilt.c
+ WARNS?=	6
+ 
+ DPADD=	${LIBELFTC} ${LIBELF}
+-LDADD=	-lelftc -lelf
++LDADD=	-lelftc -lelfbase
+ 
+ MAN1=	c++filt.1
+ 
Index: patches/patch-elfcopy_Makefile
===================================================================
RCS file: patches/patch-elfcopy_Makefile
diff -N patches/patch-elfcopy_Makefile
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-elfcopy_Makefile	21 Sep 2013 02:48:59 -0000
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- elfcopy/Makefile.orig	2011-12-04 07:20:46.000000000 +0000
++++ elfcopy/Makefile
+@@ -9,7 +9,7 @@ SRCS=	archive.c ascii.c binary.c main.c 
+ WARNS?=	5
+ 
+ DPADD=	${LIBELF} ${LIBELFTC}
+-LDADD=	-lelf -lelftc
++LDADD=	-lelfbase -lelftc
+ 
+ .if !defined(LIBELF_AR)
+ LDADD+= -larchive
Index: patches/patch-elfdump_Makefile
===================================================================
RCS file: patches/patch-elfdump_Makefile
diff -N patches/patch-elfdump_Makefile
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-elfdump_Makefile	21 Sep 2013 02:48:59 -0000
@@ -0,0 +1,12 @@
+$NetBSD$
+
+--- elfdump/Makefile.orig	2011-12-04 07:11:47.000000000 +0000
++++ elfdump/Makefile
+@@ -6,6 +6,6 @@ PROG=	elfdump
+ WARNS?=	6
+ 
+ DPADD=	${LIBELFTC} ${LIBELF}
+-LDADD=	-lelftc -lelf
++LDADD=	-lelftc -lelfbase
+ 
+ .include "${TOP}/mk/elftoolchain.prog.mk"
Index: patches/patch-findtextrel_Makefile
===================================================================
RCS file: patches/patch-findtextrel_Makefile
diff -N patches/patch-findtextrel_Makefile
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-findtextrel_Makefile	21 Sep 2013 02:48:59 -0000
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- findtextrel/Makefile.orig	2011-10-26 15:53:48.000000000 +0000
++++ findtextrel/Makefile
+@@ -8,7 +8,7 @@ SRCS=	findtextrel.c
+ WARNS?=	6
+ 
+ DPADD=	${LIBELFTC} ${LIBDWARF} ${LIBELF} 
+-LDADD=	-lelftc -ldwarf -lelf
++LDADD=	-lelftc -ldwarf -lelfbase
+ 
+ MAN1=	findtextrel.1
+ 
Index: patches/patch-libdwarf_Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/devel/elftoolchain/patches/patch-libdwarf_Makefile,v
retrieving revision 1.1
diff -u -r1.1 patch-libdwarf_Makefile
--- patches/patch-libdwarf_Makefile	26 Nov 2011 15:50:27 -0000	1.1
+++ patches/patch-libdwarf_Makefile	21 Sep 2013 02:48:59 -0000
@@ -6,9 +6,9 @@
 This is a bug in bootstrap-mk-files but I'm going to fix it in both
 places to avoid demanding rebootstrapping.

---- libdwarf/Makefile~	2011-10-27 03:47:28.000000000 +0000
+--- libdwarf/Makefile.orig	2011-10-27 03:47:28.000000000 +0000
 +++ libdwarf/Makefile
-@@ -79,6 +79,7 @@ GENSRCS=	dwarf_pubnames.c dwarf_pubtypes
+@@ -79,10 +79,11 @@ GENSRCS=	dwarf_pubnames.c dwarf_pubtypes
  CLEANFILES=	${GENSRCS}

  SHLIB_MAJOR=	3
@@ -16,3 +16,8 @@

  WARNS?=	6

+-LDADD+=		-lelf
++LDADD+=		-L../libelf -lelfbase
+ 
+ MAN=	dwarf_add_AT_comp_dir.3				\
+ 	dwarf_add_AT_const_value_string.3		\
Index: patches/patch-libelf_Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/devel/elftoolchain/patches/patch-libelf_Makefile,v
retrieving revision 1.1
diff -u -r1.1 patch-libelf_Makefile
--- patches/patch-libelf_Makefile	26 Nov 2011 15:50:27 -0000	1.1
+++ patches/patch-libelf_Makefile	21 Sep 2013 02:48:59 -0000
@@ -6,9 +6,18 @@
 This is a bug in bootstrap-mk-files but I'm going to fix it in both
 places to avoid demanding rebootstrapping.

---- libelf/Makefile~	2011-01-01 11:17:52.000000000 +0000
+--- libelf/Makefile.orig	2012-05-31 06:25:16.000000000 +0000
 +++ libelf/Makefile
-@@ -61,6 +61,7 @@ GENSRCS=	libelf_fsize.c libelf_msize.c l
+@@ -2,7 +2,7 @@
+ 
+ TOP=	${.CURDIR}/..
+ 
+-LIB=	elf
++LIB=	elfbase
+ 
+ SRCS=	elf.c							\
+ 	elf_begin.c						\
+@@ -64,6 +64,7 @@ GENSRCS=	libelf_fsize.c libelf_msize.c l
  CLEANFILES=	${GENSRCS}

  SHLIB_MAJOR=	1
Index: patches/patch-libelftc_Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/devel/elftoolchain/patches/patch-libelftc_Makefile,v
retrieving revision 1.1
diff -u -r1.1 patch-libelftc_Makefile
--- patches/patch-libelftc_Makefile	26 Nov 2011 15:50:27 -0000	1.1
+++ patches/patch-libelftc_Makefile	21 Sep 2013 02:48:59 -0000
@@ -6,13 +6,20 @@
 This is a bug in bootstrap-mk-files but I'm going to fix it in both
 places to avoid demanding rebootstrapping.

---- libelftc/Makefile~	2011-11-26 15:18:44.000000000 +0000
+--- libelftc/Makefile.orig	2012-09-14 11:27:57.000000000 +0000
 +++ libelftc/Makefile
-@@ -17,6 +17,7 @@ INCS=	libelftc.h
- BRANCH=	0.5.1		# Change this on release branches.
+@@ -19,12 +19,13 @@ INCS=	libelftc.h
+ RELEASE=	0.6.1		# Change this on release branches.

  SHLIB_MAJOR=	1
 +SHLIB_MINOR=	0

  WARNS?=	6

+ CLEANFILES+=	elftc_version.c
+ 
+-LDADD+=	-lelf
++LDADD+=	-lelfbase
+ 
+ MAN=	elftc_bfd_find_target.3 \
+ 	elftc_copyfile.3 \
Index: patches/patch-mk_elftoolchain.lib.mk
===================================================================
RCS file: patches/patch-mk_elftoolchain.lib.mk
diff -N patches/patch-mk_elftoolchain.lib.mk
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-mk_elftoolchain.lib.mk	21 Sep 2013 02:48:59 -0000
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- mk/elftoolchain.lib.mk.orig	2011-12-11 16:39:16.000000000 +0000
++++ mk/elftoolchain.lib.mk
+@@ -19,7 +19,7 @@ CFLAGS+=	-I${.CURDIR}		# Sources
+ CFLAGS+=	-I${TOP}/common		# common code
+ 
+ .if defined(LDADD)
+-_LDADD_LIBELF=${LDADD:M-lelf}
++_LDADD_LIBELF=${LDADD:M-lelfbase}
+ .if !empty(_LDADD_LIBELF)
+ CFLAGS+=	-I${TOP}/libelf
+ LDFLAGS+=	-L${TOP}/libelf
Index: patches/patch-mk_elftoolchain.prog.mk
===================================================================
RCS file: patches/patch-mk_elftoolchain.prog.mk
diff -N patches/patch-mk_elftoolchain.prog.mk
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-mk_elftoolchain.prog.mk	21 Sep 2013 02:48:59 -0000
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- mk/elftoolchain.prog.mk.orig	2011-12-11 16:39:16.000000000 +0000
++++ mk/elftoolchain.prog.mk
+@@ -23,7 +23,7 @@ CFLAGS+= -I${TOP}/libdwarf
+ LDFLAGS+= -L${TOP}/libdwarf
+ .endif
+ 
+-_LDADD_LIBELF=${LDADD:M-lelf}
++_LDADD_LIBELF=${LDADD:M-lelfbase}
+ .if !empty(_LDADD_LIBELF)
+ CFLAGS+= -I${TOP}/libelf
+ LDFLAGS+= -L${TOP}/libelf
Index: patches/patch-nm_Makefile
===================================================================
RCS file: patches/patch-nm_Makefile
diff -N patches/patch-nm_Makefile
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-nm_Makefile	21 Sep 2013 02:48:59 -0000
@@ -0,0 +1,12 @@
+$NetBSD$
+
+--- nm/Makefile.orig	2011-10-27 03:50:33.000000000 +0000
++++ nm/Makefile
+@@ -8,6 +8,6 @@ SRCS=	nm.c
+ 
+ WARNS?=	6
+ 
+-LDADD=	-ldwarf -lelftc -lelf
++LDADD=	-ldwarf -lelftc -lelfbase
+ 
+ .include "${TOP}/mk/elftoolchain.prog.mk"
Index: patches/patch-readelf_Makefile
===================================================================
RCS file: patches/patch-readelf_Makefile
diff -N patches/patch-readelf_Makefile
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-readelf_Makefile	21 Sep 2013 02:48:59 -0000
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- readelf/Makefile.orig	2011-10-27 03:50:33.000000000 +0000
++++ readelf/Makefile
+@@ -8,7 +8,7 @@ SRCS=	readelf.c
+ WARNS?=	6
+ 
+ DPADD=	${LIBDWARF} ${LIBELF}
+-LDADD=	-ldwarf -lelftc -lelf
++LDADD=	-ldwarf -lelftc -lelfbase
+ 
+ MAN1=	readelf.1
+ 
Index: patches/patch-size_Makefile
===================================================================
RCS file: patches/patch-size_Makefile
diff -N patches/patch-size_Makefile
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-size_Makefile	21 Sep 2013 02:48:59 -0000
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- size/Makefile.orig	2011-10-23 14:49:16.000000000 +0000
++++ size/Makefile
+@@ -4,7 +4,7 @@ TOP=	..
+ 
+ PROG=   size
+ WARNS?= 6
+-LDADD=  -lelftc -lelf
++LDADD=  -lelftc -lelfbase
+ DPADD=	${LIBELFTC} ${LIBELF}
+ 
+ .include "${TOP}/mk/elftoolchain.prog.mk"
Index: patches/patch-strings_Makefile
===================================================================
RCS file: patches/patch-strings_Makefile
diff -N patches/patch-strings_Makefile
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-strings_Makefile	21 Sep 2013 02:48:59 -0000
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- strings/Makefile.orig	2011-10-23 14:52:59.000000000 +0000
++++ strings/Makefile
+@@ -5,7 +5,7 @@ TOP=	..
+ PROG=   strings
+ WARNS?= 6
+ DPADD=	${LIBELFTC} ${LIBELF}
+-LDADD=  -lelftc -lelf
++LDADD=  -lelftc -lelfbase
+ 
+ .include "${TOP}/mk/elftoolchain.prog.mk"
+ 

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->agc
Responsible-Changed-By: wiz@NetBSD.org
Responsible-Changed-When: Sat, 21 Sep 2013 08:48:59 +0000
Responsible-Changed-Why:
Over to maintainer.


State-Changed-From-To: open->analyzed
State-Changed-By: agc@NetBSD.org
State-Changed-When: Mon, 23 Sep 2013 06:00:19 +0000
State-Changed-Why:
analyzed - I like the libelf rename, it's a nice solution

I'll try to get joseph (upstream) to take the changes on board

I'm not sure it will make the new branch (it'd be great if it
did, but I'm not sure right now what depends on this package)


From: Benny Siegert <bsiegert@gmail.com>
To: agc@NetBSD.org, gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/48227
Date: Sat, 14 May 2016 21:25:04 +0200

 Ping? Latest is 0.7.1.

 -- 
 Benny Siegert <bsiegert@gmail.com>

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.