View | Details | Raw Unified | Return to bug 273955
Collapse All | Expand All

(-)b/devel/valgrind/Makefile (-11 / +12 lines)
Lines 1-6 Link Here
1
PORTNAME=	valgrind
1
PORTNAME=	valgrind
2
PORTVERSION=	3.21.0
2
PORTVERSION=	3.21.0
3
PORTREVISION=	1
3
PORTREVISION=	2
4
PORTEPOCH=	1
4
PORTEPOCH=	1
5
CATEGORIES=	devel
5
CATEGORIES=	devel
6
MASTER_SITES=	SOURCEWARE/valgrind
6
MASTER_SITES=	SOURCEWARE/valgrind
Lines 16-22 ONLY_FOR_ARCHS= amd64 i386 Link Here
16
16
17
USES=		autoreconf cpe gmake pathfix perl5 pkgconfig shebangfix python:3.9+,run tar:bz2
17
USES=		autoreconf cpe gmake pathfix perl5 pkgconfig shebangfix python:3.9+,run tar:bz2
18
USE_PERL5=	build
18
USE_PERL5=	build
19
SHEBANG_FILES= callgrind/callgrind_annotate.in callgrind/callgrind_control.in cachegrind/cg_merge.in cachegrind/cg_diff.in cachegrind/cg_annotate.in
19
SHEBANG_FILES=	callgrind/callgrind_annotate.in callgrind/callgrind_control.in cachegrind/cg_merge.in cachegrind/cg_diff.in cachegrind/cg_annotate.in
20
GNU_CONFIGURE=	yes
20
GNU_CONFIGURE=	yes
21
CONFIGURE_ENV+=	ac_cv_path_PERL=${PERL}
21
CONFIGURE_ENV+=	ac_cv_path_PERL=${PERL}
22
22
Lines 24-30 SSP_UNSAFE= yes Link Here
24
LIB32_PATH?=	/usr/lib32/libc.so
24
LIB32_PATH?=	/usr/lib32/libc.so
25
25
26
CONFLICTS=	valgrind-devel
26
CONFLICTS=	valgrind-devel
27
PORTDOCS=	html
27
28
# Valgrind needs to read debuginfo from its own preload shared libraries
29
# (quote from README_PACKAGERS
30
#-- Don't strip the debug info off lib/valgrind/$platform/vgpreload*.so
31
#   in the installation tree.  Either Valgrind won't work at all, or it
32
#   will still work if you do, but will generate less helpful error
33
#   messages.)
34
STRIP=			# empty
35
36
PORTDOCS=		html
28
37
29
OPTIONS_DEFINE=		DOCS MANPAGES MPI
38
OPTIONS_DEFINE=		DOCS MANPAGES MPI
30
OPTIONS_DEFINE_amd64=	32BIT
39
OPTIONS_DEFINE_amd64=	32BIT
Lines 34-47 OPTIONS_DEFAULT_amd64= 32BIT Link Here
34
.endif
43
.endif
35
OPTIONS_SUB=		yes
44
OPTIONS_SUB=		yes
36
45
37
# Valgrind needs to read debuginfo from its own preload shared libraries
38
# (quote from README_PACKAGERS
39
#-- Don't strip the debug info off lib/valgrind/$platform/vgpreload*.so
40
#   in the installation tree.  Either Valgrind won't work at all, or it
41
#   will still work if you do, but will generate less helpful error
42
#   messages.)
43
STRIP=          # empty
44
45
32BIT_DESC=	Enable debugging of 32-bit programs (requires lib32)
46
32BIT_DESC=	Enable debugging of 32-bit programs (requires lib32)
46
MPI_DESC=	Enable build of MPI wrappers
47
MPI_DESC=	Enable build of MPI wrappers
47
48
(-)b/devel/valgrind/files/patch-coregrind-vg_preloaded.c (+31 lines)
Added Link Here
1
--- coregrind/vg_preloaded.c.orig	2023-09-19 20:30:09.413386000 +0200
2
+++ coregrind/vg_preloaded.c	2023-09-19 20:32:14.366333000 +0200
3
@@ -228,7 +228,27 @@
4
 
5
 #elif defined(VGO_freebsd)
6
 
7
-// nothing specific currently
8
+#if (FREEBSD_VERS >= FREEBSD_14)
9
+
10
+void * VG_NOTIFY_ON_LOAD(ifunc_wrapper) (void);
11
+void * VG_NOTIFY_ON_LOAD(ifunc_wrapper) (void)
12
+{
13
+    OrigFn fn;
14
+    Addr result = 0;
15
+    Addr fnentry;
16
+
17
+    /* Call the original indirect function and get it's result */
18
+    VALGRIND_GET_ORIG_FN(fn);
19
+    CALL_FN_W_v(result, fn);
20
+
21
+    fnentry = result;
22
+
23
+    VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__ADD_IFUNC_TARGET,
24
+                                    fn.nraddr, fnentry, 0, 0, 0);
25
+    return (void*)result;
26
+}
27
+
28
+#endif
29
 
30
 #elif defined(VGO_solaris)
31
 

Return to bug 273955