pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/www/firefox fix pkg/50767 linker error when using clang



details:   https://anonhg.NetBSD.org/pkgsrc/rev/4c6ff0523f63
branches:  trunk
changeset: 351186:4c6ff0523f63
user:      tnn <tnn%pkgsrc.org@localhost>
date:      Tue Aug 16 09:34:12 2016 +0000

description:
fix pkg/50767 linker error when using clang

diffstat:

 www/firefox/distinfo                                |   4 +++-
 www/firefox/patches/patch-toolkit_library_libxul.mk |  16 ++++++++++++++++
 www/firefox/patches/patch-xpcom_components_Module.h |  16 ++++++++++++++++
 3 files changed, 35 insertions(+), 1 deletions(-)

diffs (62 lines):

diff -r dbdfa85b8469 -r 4c6ff0523f63 www/firefox/distinfo
--- a/www/firefox/distinfo      Tue Aug 16 09:06:56 2016 +0000
+++ b/www/firefox/distinfo      Tue Aug 16 09:34:12 2016 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.250 2016/08/06 08:46:59 ryoon Exp $
+$NetBSD: distinfo,v 1.251 2016/08/16 09:34:12 tnn Exp $
 
 SHA1 (firefox-48.0.source.tar.xz) = 2b73cfc996861fe895ad7564d485bf9e35190767
 RMD160 (firefox-48.0.source.tar.xz) = 7f1754fd11849c4894b4cb234fe1c3fc4be47ba6
@@ -86,10 +86,12 @@
 SHA1 (patch-toolkit_components_protobuf_src_google_protobuf_stubs_atomicops.h) = 5ffb0782bbbff2fd17ad71e98b349b4ec3dc6c8c
 SHA1 (patch-toolkit_components_protobuf_src_google_protobuf_stubs_platform__macros.h) = bd4388323851fcb7b10392d6a27f9bc56633a52e
 SHA1 (patch-toolkit_components_terminator_nsTerminator.cpp) = 5b6d2e5c9f685d32894898d3ef3aec09a1a1e5ce
+SHA1 (patch-toolkit_library_libxul.mk) = 98d79e7ae52d4b54111512a98a03810e2bbe454d
 SHA1 (patch-toolkit_library_moz.build) = be0b3ae0c8048fd61c67b2ae78b2a0813cbefd85
 SHA1 (patch-toolkit_xre_glxtest.cpp) = cf048491778610454b914400e53072afedd96e7b
 SHA1 (patch-toolkit_xre_nsEmbedFunctions.cpp) = 4db0dfc98ffeb09f524a471e6a727f2c3b045afe
 SHA1 (patch-xpcom_base_nscore.h) = d7c96eda884d7f370442749c43caba50da61bbe4
+SHA1 (patch-xpcom_components_Module.h) = 892f8d6a9cb868e5cdc3c6f6be233055dd1ca529
 SHA1 (patch-xpcom_reflect_xptcall_md_unix_Makefile.in) = 950874fbc255c93a828bddd84ffe8478094214cc
 SHA1 (patch-xpcom_reflect_xptcall_md_unix_moz.build) = 82026e72559334810be2f8a510d22f0553a353c2
 SHA1 (patch-xpcom_reflect_xptcall_md_unix_xptcinvoke__arm__netbsd.cpp) = 493d1433ae72bbd0c65ab3f51de43fb864a6f58d
diff -r dbdfa85b8469 -r 4c6ff0523f63 www/firefox/patches/patch-toolkit_library_libxul.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/firefox/patches/patch-toolkit_library_libxul.mk       Tue Aug 16 09:34:12 2016 +0000
@@ -0,0 +1,16 @@
+$NetBSD: patch-toolkit_library_libxul.mk,v 1.4 2016/08/16 09:34:12 tnn Exp $
+
+Can't do relocation against extern protected symbol (pkg/50767)
+usr/bin/ld: ../../xpcom/components/nsComponentManager.o: relocation R_X86_64_PC32 against protected symbol `start_kPStaticModules_NSModule' can not be used when making a shared object
+
+--- toolkit/library/libxul.mk.orig     2016-06-18 12:32:59.901404958 +0000
++++ toolkit/library/libxul.mk
+@@ -55,7 +55,7 @@ endif
+ ifdef _MSC_VER
+ get_first_and_last = dumpbin -exports $1 | grep _NSModule@@ | sort -k 3 | sed -n 's/^.*?\([^@]*\)@@.*$$/\1/;1p;$$p'
+ else
+-get_first_and_last = $(TOOLCHAIN_PREFIX)nm -g $1 | grep _NSModule$$ | grep -vw refptr | sort | sed -n 's/^.* _*\([^ ]*\)$$/\1/;1p;$$p'
++get_first_and_last = $(TOOLCHAIN_PREFIX)nm $1 | grep _NSModule$$ | grep -vw refptr | sort | sed -n 's/^.* _*\([^ ]*\)$$/\1/;1p;$$p'
+ endif
+ 
+ LOCAL_CHECKS = test "$$($(get_first_and_last) | xargs echo)" != "start_kPStaticModules_NSModule end_kPStaticModules_NSModule" && echo "NSModules are not ordered appropriately" && exit 1 || exit 0
diff -r dbdfa85b8469 -r 4c6ff0523f63 www/firefox/patches/patch-xpcom_components_Module.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/firefox/patches/patch-xpcom_components_Module.h       Tue Aug 16 09:34:12 2016 +0000
@@ -0,0 +1,16 @@
+$NetBSD: patch-xpcom_components_Module.h,v 1.3 2016/08/16 09:34:12 tnn Exp $
+
+Can't do relocation against extern protected symbol (pkg/50767)
+usr/bin/ld: ../../xpcom/components/nsComponentManager.o: relocation R_X86_64_PC32 against protected symbol `start_kPStaticModules_NSModule' can not be used when making a shared object
+
+--- xpcom/components/Module.h.orig     2016-06-01 04:11:44.000000000 +0000
++++ xpcom/components/Module.h
+@@ -125,7 +125,7 @@ struct Module
+ #    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("hidden")))
+ #    elif defined(__MACH__)
+ #      define NSMODULE_SECTION __attribute__((section("__DATA, .kPStaticModules"), visibility("default")))
+ #    elif defined (_WIN32)



Home | Main Index | Thread Index | Old Index