Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Jan 2011 15:04:28 GMT
From:      Dimitry Andric <dim@FreeBSD.org>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/154084: www/qt4-webkit giving link errors on amd64 with new binutils
Message-ID:  <201101171504.p0HF4SWV060783@red.freebsd.org>
Resent-Message-ID: <201101171510.p0HFA8HO009608@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         154084
>Category:       ports
>Synopsis:       www/qt4-webkit giving link errors on amd64 with new binutils
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jan 17 15:10:08 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Dimitry Andric
>Release:        FreeBSD 9.0-CURRENT amd64
>Organization:
The FreeBSD Project
>Environment:
FreeBSD vfbsd9x64.home.andric.com 9.0-CURRENT FreeBSD 9.0-CURRENT #0 r217434M: Sat Jan 15 19:59:12 CET 2011 dim@vfbsd9x64.home.andric.com:/usr/obj/usr/src/sys/GENERIC amd64
>Description:
When building the www/qt4-webkit port with newer versions of binutils
(e.g. 2.17 or higher), it errors out with:

ld: ./.libs/libJavaScriptCore.a(libJavaScriptCore_la-JITStubs.o):
relocation R_X86_64_PC32 against symbol `cti_vm_throw' can not be used
when making a shared object; recompile with -fPIC

This is due to WebKit PR 28422:
https://bugs.webkit.org/show_bug.cgi?id=28422

It is marked RESOLVED FIXED upstream, but their patch only tests for
Linux, unfortunately.  I amended this to also test for FreeBSD.

>How-To-Repeat:
Compile port with binutils 2.17 or later.

>Fix:
See diff.

Patch attached with submission follows:

Index: www/qt4-webkit/files/patch-src-3rdparty-javascriptcore-JavaScriptCore-jit-JITStubs.cpp
===================================================================
RCS file: www/qt4-webkit/files/patch-src-3rdparty-javascriptcore-JavaScriptCore-jit-JITStubs.cpp
diff -N www/qt4-webkit/files/patch-src-3rdparty-javascriptcore-JavaScriptCore-jit-JITStubs.cpp
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ www/qt4-webkit/files/patch-src-3rdparty-javascriptcore-JavaScriptCore-jit-JITStubs.cpp	17 Jan 2011 14:18:02 -0000
@@ -0,0 +1,11 @@
+--- src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp.orig	2010-11-06 02:55:22.000000000 +0100
++++ src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp	2011-01-17 14:32:18.000000000 +0100
+@@ -80,7 +80,7 @@
+ #define THUMB_FUNC_PARAM(name)
+ #endif
+ 
+-#if OS(LINUX) && CPU(X86_64)
++#if (OS(LINUX) || OS(FREEBSD)) && CPU(X86_64)
+ #define SYMBOL_STRING_RELOCATION(name) #name "@plt"
+ #else
+ #define SYMBOL_STRING_RELOCATION(name) SYMBOL_STRING(name)
Index: www/qt4-webkit/files/patch-src-3rdparty-webkit-JavaScriptCore-jit-JITStubs.cpp
===================================================================
RCS file: www/qt4-webkit/files/patch-src-3rdparty-webkit-JavaScriptCore-jit-JITStubs.cpp
diff -N www/qt4-webkit/files/patch-src-3rdparty-webkit-JavaScriptCore-jit-JITStubs.cpp
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ www/qt4-webkit/files/patch-src-3rdparty-webkit-JavaScriptCore-jit-JITStubs.cpp	17 Jan 2011 14:18:02 -0000
@@ -0,0 +1,11 @@
+--- src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp.orig	2010-11-06 02:55:20.000000000 +0100
++++ src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp	2011-01-17 14:32:18.000000000 +0100
+@@ -77,7 +77,7 @@
+ #define THUMB_FUNC_PARAM(name)
+ #endif
+ 
+-#if OS(LINUX) && CPU(X86_64)
++#if (OS(LINUX) || OS(FREEBSD)) && CPU(X86_64)
+ #define SYMBOL_STRING_RELOCATION(name) #name "@plt"
+ #else
+ #define SYMBOL_STRING_RELOCATION(name) SYMBOL_STRING(name)


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201101171504.p0HF4SWV060783>