[arch-commits] Commit in xulrunner/trunk (2 files)
Evangelos Foutras
foutrelis at archlinux.org
Sun Apr 3 11:59:08 UTC 2016
Date: Sunday, April 3, 2016 @ 13:59:08
Author: foutrelis
Revision: 169388
Fix build with recent binutils
Added:
xulrunner/trunk/0001-Bug-1233963-Work-around-recent-GNU-gold-behavior-wit.patch
Modified:
xulrunner/trunk/PKGBUILD
-----------------------------------------------------------------+
0001-Bug-1233963-Work-around-recent-GNU-gold-behavior-wit.patch | 49 ++++++++++
PKGBUILD | 5 +
2 files changed, 54 insertions(+)
Added: 0001-Bug-1233963-Work-around-recent-GNU-gold-behavior-wit.patch
===================================================================
--- 0001-Bug-1233963-Work-around-recent-GNU-gold-behavior-wit.patch (rev 0)
+++ 0001-Bug-1233963-Work-around-recent-GNU-gold-behavior-wit.patch 2016-04-03 11:59:08 UTC (rev 169388)
@@ -0,0 +1,49 @@
+From 4d0fe8f40364c170226f1ef3bc98975630463e87 Mon Sep 17 00:00:00 2001
+From: Mike Hommey <mh+mozilla at glandium.org>
+Date: Tue, 19 Jan 2016 14:31:04 +0900
+Subject: [PATCH] Bug 1233963 - Work around recent GNU gold behavior with
+ segments starting before the first section they contain
+
+---
+ build/unix/elfhack/elf.cpp | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/build/unix/elfhack/elf.cpp b/build/unix/elfhack/elf.cpp
+index 666b535..743afde 100644
+--- a/build/unix/elfhack/elf.cpp
++++ b/build/unix/elfhack/elf.cpp
+@@ -253,26 +253,29 @@ Elf::Elf(std::ifstream &file)
+ }
+ if (phdr.p_type == PT_PHDR)
+ segment->addSection(phdr_section);
+ for (int j = 1; j < ehdr->e_shnum; j++)
+ if (phdr.contains(sections[j]))
+ segment->addSection(sections[j]);
+ // Make sure that our view of segments corresponds to the original
+ // ELF file.
+- assert(segment->getFileSize() == phdr.p_filesz);
++ // GNU gold likes to start some segments before the first section
++ // they contain. https://sourceware.org/bugzilla/show_bug.cgi?id=19392
++ unsigned int gold_adjustment = segment->getAddr() - phdr.p_vaddr;
++ assert(segment->getFileSize() == phdr.p_filesz - gold_adjustment);
+ // gold makes TLS segments end on an aligned virtual address, even
+ // when the underlying section ends before that, while bfd ld
+ // doesn't. It's fine if we don't keep that alignment.
+ unsigned int memsize = segment->getMemSize();
+ if (phdr.p_type == PT_TLS && memsize != phdr.p_memsz) {
+ unsigned int align = segment->getAlign();
+ memsize = (memsize + align - 1) & ~(align - 1);
+ }
+- assert(memsize == phdr.p_memsz);
++ assert(memsize == phdr.p_memsz - gold_adjustment);
+ segments.push_back(segment);
+ }
+
+ new (&eh_entry) ElfLocation(ehdr->e_entry, this);
+ }
+
+ Elf::~Elf()
+ {
+--
+2.7.0
+
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2016-04-03 10:54:31 UTC (rev 169387)
+++ PKGBUILD 2016-04-03 11:59:08 UTC (rev 169388)
@@ -15,6 +15,7 @@
source=(https://ftp.mozilla.org/pub/mozilla.org/xulrunner/releases/$pkgver/source/xulrunner-$pkgver.source.tar.xz
mozconfig
freetype261.patch
+ 0001-Bug-1233963-Work-around-recent-GNU-gold-behavior-wit.patch
mozilla-pkgconfig.patch
shared-libs.patch)
options=('!emptydirs' '!makeflags' 'staticlibs')
@@ -22,6 +23,7 @@
sha256sums=('f7abb2e2989779305ab1f80d30caf9fc55d96c7e66d1394e2cc9639442e2b864'
'df0e663e7f9246b84936882e564270fac541c6bb39450b759abe686e5c27a052'
'3aea9a83bf304da5525f34a911712cf42f8ded1c8b6becf0a2cf8a4b4f7facd6'
+ '13a27a385fab88938ac7417f1e7ca7225ec6b88840bafe67e0f5642e5446554a'
'1aa9ebe67542a2b8c28905d070829ada5b29438c6a7961f2b0cdd6b92d8b9f5c'
'59d9fc421bc10a5515b73e159f44a72365bf7b7e8b3fc8a8c46043ef40bd3a40')
@@ -32,6 +34,9 @@
# https://bugzilla.mozilla.org/show_bug.cgi?id=1194520
patch -Np1 -i ../freetype261.patch
+ # https://bugzilla.mozilla.org/show_bug.cgi?id=1233963
+ patch -Np1 -i ../0001-Bug-1233963-Work-around-recent-GNU-gold-behavior-wit.patch
+
# fix libdir/sdkdir - fedora
patch -Np1 -i ../mozilla-pkgconfig.patch
patch -Np1 -i ../shared-libs.patch
More information about the arch-commits
mailing list