j...@wxcvbn.org (Jérémie Courrèges-Anglas) writes:

[...]

>> The solution here is to patch the port to link by invoking cc.
>>
>> 2. Ports that attempt to link code compiled without -fPIC into a
>>    shared library:
>>
>>   devel/valgrind
>
> This one looks complicated. :)
>
> cc'd Masao in case he was not aware.

Here's a diff to make it build.  Lightly tested with 'valgrind du -sh .'
Using CPPFLAGS doesn't feel right but it works (tm).

Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/valgrind/Makefile,v
retrieving revision 1.4
diff -u -p -r1.4 Makefile
--- Makefile    30 Apr 2015 13:06:10 -0000      1.4
+++ Makefile    21 May 2015 17:01:28 -0000
@@ -6,7 +6,7 @@ COMMENT =               instrumentation framework for
 CATEGORIES =           devel
 
 V =                    3.10.1
-REVISION =             0
+REVISION =             1
 DISTNAME =             valgrind-${V}
 EXTRACT_SUFX =         .tar.bz2
 
Index: patches/patch-coregrind_Makefile_am
===================================================================
RCS file: patches/patch-coregrind_Makefile_am
diff -N patches/patch-coregrind_Makefile_am
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-coregrind_Makefile_am 21 May 2015 17:01:28 -0000
@@ -0,0 +1,11 @@
+$OpenBSD$
+--- coregrind/Makefile.am.orig Thu May 21 18:48:36 2015
++++ coregrind/Makefile.am      Thu May 21 18:56:25 2015
+@@ -10,6 +10,7 @@ include $(top_srcdir)/Makefile.all.am
+ #----------------------------------------------------------------------------
+ 
+ AM_CPPFLAGS_@VGCONF_PLATFORM_PRI_CAPS@ += \
++      -fPIC \
+       -I$(top_srcdir)/coregrind \
+       -DVG_LIBDIR="\"$(pkglibdir)"\" \
+       -DVG_PLATFORM="\"@VGCONF_ARCH_PRI@-@VGCONF_OS@\""


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

Reply via email to