Christian Weisgerber <na...@mips.inka.de> writes:

> Here are the failures from the latest amd64 package bulk build:
>
> devel/valgrind          missing -fPIC
> games/freeciv           picks up execinfo.h
> games/monadius          SIGBUS
> mail/courier-imap       "Cannot obtain information for user _courier"
>
> valgrind has been broken for some time.

The diff below appears to fix it (this is really a static executable).

As a bonus I think that the exact command that is run should be logged.

ok / comments?

Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/valgrind/Makefile,v
retrieving revision 1.3
diff -u -p -r1.3 Makefile
--- Makefile    30 Apr 2015 09:27:39 -0000      1.3
+++ Makefile    30 Apr 2015 12:00:33 -0000
@@ -1,13 +1,12 @@
 # $OpenBSD: Makefile,v 1.3 2015/04/30 09:27:39 ajacoutot Exp $
 
-BROKEN =               relocation R_X86_64_32S can not be used ...
-
 ONLY_FOR_ARCHS =       amd64
 
 COMMENT =              instrumentation framework for dynamic analysis tools
 CATEGORIES =           devel
 
 V =                    3.10.1
+REVISION =             0
 DISTNAME =             valgrind-${V}
 EXTRACT_SUFX =         .tar.bz2
 
Index: patches/patch-coregrind_link_tool_exe_openbsd_in
===================================================================
RCS file: patches/patch-coregrind_link_tool_exe_openbsd_in
diff -N patches/patch-coregrind_link_tool_exe_openbsd_in
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-coregrind_link_tool_exe_openbsd_in    30 Apr 2015 12:00:33 
-0000
@@ -0,0 +1,20 @@
+$OpenBSD$
+--- coregrind/link_tool_exe_openbsd.in.orig    Thu Apr 30 13:37:16 2015
++++ coregrind/link_tool_exe_openbsd.in Thu Apr 30 13:42:34 2015
+@@ -77,14 +77,14 @@ chomp($temp);
+ my $origbase = 0x400000;
+ system(sprintf "sed -e 's|%x|%x|g' < $ldscript > $temp", $origbase, 
$notebase);
+ 
+-my $cmd = sprintf "$cc -static -Wl,-Ttext=0x%x -Wl,-T,$temp", $textbase;
++my $cmd = sprintf "$cc -static -nopie -Wl,-Ttext=0x%x -Wl,-T,$temp", 
$textbase;
+ 
+ # Add the rest of the parameters
+ foreach my $n (2 .. $#ARGV) {
+    $cmd = "$cmd $ARGV[$n]";
+ }
+ 
+-#print "link_tool_exe_linux: $cmd\n";
++print "link_tool_exe_openbsd: $cmd\n";
+ 
+ 
+ # Execute the command:


-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

Reply via email to