Bug 85120 - Update port: devel/libelf to 0.8.6
Summary: Update port: devel/libelf to 0.8.6
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Peter Pentchev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-19 15:20 UTC by Vasil Dimov
Modified: 2005-09-05 23:37 UTC (History)
1 user (show)

See Also:


Attachments
libelf_0.8.5-0.8.6.diff (3.37 KB, patch)
2005-08-19 15:20 UTC, Vasil Dimov
no flags Details | Diff
patch-lib::64.xlatetof.c (594 bytes, text/plain)
2005-08-19 15:20 UTC, Vasil Dimov
no flags Details
patch-lib::gelf.h (393 bytes, text/plain)
2005-08-19 15:20 UTC, Vasil Dimov
no flags Details
file.diff (1.23 KB, patch)
2005-08-19 15:20 UTC, Vasil Dimov
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vasil Dimov 2005-08-19 15:20:07 UTC
Update libelf from 0.8.5 to 0.8.6

* swap www.mr511.de and ${MASTER_SITE_SUNSITE} as the archive has not
  yet appeared on ${MASTER_SITE_SUNSITE} - save "Not found" cycles

* change nonexistent (in FreeBSD) types Elf64_Xword and Elf64_Sxword
  used in source with the equivalent ones: Elf64_Word and Elf64_Sword
  I have also attached a separate patch for each file, but the sed
  command in Makefile is easier for maintenance IMHO.

* introduce files/patch-Makefile.in to force libelf.pc to go in the
  right place

* sync files/patch-configure and pkg-plist

Fix: If these will be added, post-patch: should be removed from Makefile


--- lib/32.fsize.c.orig	Fri Aug 19 16:18:02 2005
+++ lib/32.fsize.c	Fri Aug 19 16:18:48 2005
@@ -68,8 +68,8 @@
 	    { sizeof(Elf64_Sword),    sizeof(__ext_Elf64_Sword)  },
 	    { sizeof(Elf64_Sym),      sizeof(__ext_Elf64_Sym)    },
 	    { sizeof(Elf64_Word),     sizeof(__ext_Elf64_Word)   },
-	    { sizeof(Elf64_Sxword),   sizeof(__ext_Elf64_Sxword) },
-	    { sizeof(Elf64_Xword),    sizeof(__ext_Elf64_Xword)  },
+	    { sizeof(Elf64_Sword),    sizeof(__ext_Elf64_Sxword) },
+	    { sizeof(Elf64_Word),     sizeof(__ext_Elf64_Xword)  },
 	    /* XXX: check Solaris values */
 	    { 0, 0 },	/* Elf64_Verdef/Verdaux size varies */
 	    { 0, 0 },	/* Elf64_Verneed/Vernaux size varies */
--- patch-lib::32.fsize.c ends here ---

--- lib/cook.c.orig	Fri Aug 19 16:21:53 2005
+++ lib/cook.c	Fri Aug 19 16:22:31 2005
@@ -245,7 +245,7 @@
 		/*
 		 * Check for overflow on 32-bit systems
 		 */
-		if (overflow(num, u.sh64.sh_size, Elf64_Xword)) {
+		if (overflow(num, u.sh64.sh_size, Elf64_Word)) {
 		    seterr(ERROR_OUTSIDE);
 		    return 0;
 		}
@@ -320,9 +320,9 @@
 		/*
 		 * Check for overflow on 32-bit systems
 		 */
-		if (overflow(scn->s_size, shdr->sh_size, Elf64_Xword)
+		if (overflow(scn->s_size, shdr->sh_size, Elf64_Word)
 		 || overflow(scn->s_offset, shdr->sh_offset, Elf64_Off)
-		 || overflow(sd->sd_data.d_align, shdr->sh_addralign, Elf64_Xword)) {
+		 || overflow(sd->sd_data.d_align, shdr->sh_addralign, Elf64_Word)) {
 		    seterr(ERROR_OUTSIDE);
 		    return 0;
 		}
--- patch-lib::cook.c ends here ---
Comment 1 Peter Pentchev freebsd_committer freebsd_triage 2005-08-19 15:32:41 UTC
State Changed
From-To: open->analyzed

Looking into this. 


Comment 2 Peter Pentchev freebsd_committer freebsd_triage 2005-08-19 15:32:41 UTC
Responsible Changed
From-To: freebsd-ports-bugs->roam

My port.
Comment 3 Peter Pentchev freebsd_committer freebsd_triage 2005-09-05 23:36:37 UTC
State Changed
From-To: analyzed->closed

Update committed, thanks! 
I added a small patch to fix the compilation on 4.x systems.