unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH 1/1] gnu: icecat: Fix build with binutils >= 2.26.
@ 2016-10-31 16:06 Leo Famulari
  2016-10-31 22:02 ` Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: Leo Famulari @ 2016-10-31 16:06 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/patches/icecat-binutils.patch: New patch.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/gnuzilla.scm (icecat)[source]: Use it.
---
 gnu/local.mk                               |  1 +
 gnu/packages/gnuzilla.scm                  |  1 +
 gnu/packages/patches/icecat-binutils.patch | 40 ++++++++++++++++++++++++++++++
 3 files changed, 42 insertions(+)
 create mode 100644 gnu/packages/patches/icecat-binutils.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 7937809..2447cf9 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -605,6 +605,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/hypre-doc-tables.patch			\
   %D%/packages/patches/hypre-ldflags.patch			\
   %D%/packages/patches/icecat-avoid-bundled-libraries.patch	\
+  %D%/packages/patches/icecat-binutils.patch			\
   %D%/packages/patches/icu4c-CVE-2014-6585.patch		\
   %D%/packages/patches/icu4c-CVE-2015-1270.patch		\
   %D%/packages/patches/icu4c-CVE-2015-4760.patch		\
diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm
index 8a39ed4..6bfe90f 100644
--- a/gnu/packages/gnuzilla.scm
+++ b/gnu/packages/gnuzilla.scm
@@ -318,6 +318,7 @@ standards.")
         "1hk5lwaqm8nkfm43sq521mzyrx0x3iiwvlcy62m7cq7grz9wixp6"))
       (patches
        `(,(search-patch "icecat-avoid-bundled-libraries.patch")
+         ,(search-patch "icecat-binutils.patch")
          ,(mozilla-patch "icecat-CVE-2016-5250.patch"     "6711ccb0184e" "1p0s91rw1j7ib6hy9gh5p0l33rja32rfgygh29jw4wq1hxfql8rk")
          ,(mozilla-patch "icecat-CVE-2016-5257-pt1.patch" "b08f28db372e" "0fmifimavawbff700rzjibsnr16am6902gp965scvi1iy78754ia")
          ,(mozilla-patch "icecat-CVE-2016-5257-pt2.patch" "a49fd7eb57ba" "1dyh0pjdmf64sjbj1x0mdjwfispacx9yny1kx9nzpf85myryr640")
diff --git a/gnu/packages/patches/icecat-binutils.patch b/gnu/packages/patches/icecat-binutils.patch
new file mode 100644
index 0000000..53a3ed9
--- /dev/null
+++ b/gnu/packages/patches/icecat-binutils.patch
@@ -0,0 +1,40 @@
+
+# HG changeset patch
+# User J. Brown <jb999@gmx.de>
+# Date 1476951900 14400
+# Node ID cca249d09ef600650e6127c18be438a37e9d4587
+# Parent  d8bbf1a3957fd25ff24bfee51331c150b154cc39
+Bug 1242901 - Fix linking libxul.so with binutils/GNU ld >= 2.26. r=glandium
+
+The build fails with:
+
+    /usr/bin/ld: ../../xpcom/components/nsComponentManager.o: relocation R_386_GOTOFF against protected data `start_kPStaticModules_NSModule' can not be used when making a shared object
+    /usr/bin/ld: final link failed: Bad value
+    collect2: error: ld returned 1 exit status
+
+This is a patch from 2016/04/27 16:36:50 ryoon found on
+http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/www/firefox45/patches/#dirlist.
+
+diff --git a/xpcom/components/Module.h b/xpcom/components/Module.h
+--- a/xpcom/components/Module.h
++++ b/xpcom/components/Module.h
+@@ -133,17 +133,17 @@ struct Module
+ #if defined(MOZILLA_INTERNAL_API)
+ #  define NSMODULE_NAME(_name) _name##_NSModule
+ #  if defined(_MSC_VER)
+ #    pragma section(".kPStaticModules$M", read)
+ #    pragma comment(linker, "/merge:.kPStaticModules=.rdata")
+ #    define NSMODULE_SECTION __declspec(allocate(".kPStaticModules$M"), dllexport)
+ #  elif defined(__GNUC__)
+ #    if defined(__ELF__)
+-#      define NSMODULE_SECTION __attribute__((section(".kPStaticModules"), visibility("protected")))
++#      define NSMODULE_SECTION __attribute__((section(".kPStaticModules"), visibility("default")))
+ #    elif defined(__MACH__)
+ #      define NSMODULE_SECTION __attribute__((section("__DATA, .kPStaticModules"), visibility("default")))
+ #    elif defined (_WIN32)
+ #      define NSMODULE_SECTION __attribute__((section(".kPStaticModules"), dllexport))
+ #    endif
+ #  endif
+ #  if !defined(NSMODULE_SECTION)
+ #    error Do not know how to define sections.
+
-- 
2.10.2

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/1] gnu: icecat: Fix build with binutils >= 2.26.
  2016-10-31 16:06 [PATCH 1/1] gnu: icecat: Fix build with binutils >= 2.26 Leo Famulari
@ 2016-10-31 22:02 ` Ludovic Courtès
  0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2016-10-31 22:02 UTC (permalink / raw)
  To: Leo Famulari; +Cc: guix-devel

Leo Famulari <leo@famulari.name> skribis:

> * gnu/packages/patches/icecat-binutils.patch: New patch.
> * gnu/local.mk (dist_patch_DATA): Add it.
> * gnu/packages/gnuzilla.scm (icecat)[source]: Use it.

LGTM, thanks!

Ludo'.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-10-31 22:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-31 16:06 [PATCH 1/1] gnu: icecat: Fix build with binutils >= 2.26 Leo Famulari
2016-10-31 22:02 ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).