svn commit: r526608 - in head/devel: valgrind valgrind-devel valgrind-devel/files valgrind/files
Dimitry Andric
dim at FreeBSD.org
Fri Feb 21 06:58:12 UTC 2020
Author: dim (src committer)
Date: Fri Feb 21 06:58:07 2020
New Revision: 526608
URL: https://svnweb.freebsd.org/changeset/ports/526608
Log:
devel/valgrind(-devel): Fix compiler version detection hopefully forever
Every time a compiler major version is bumped, we run into this exact
same error:
===> Configuring for valgrind-3.10.1.20160113_7,1
...
checking for a supported version of gcc... no (10.0.0)
configure: error: please use gcc >= 3.0 or clang >= 2.9
Attempt to fix this for all versions in the future.
Other fix included: don't use undefined behavior to implement offsetof,
just use the official builtin function instead.
Approved by: zeising (maintainer)
MFH: 2020Q1
Added:
head/devel/valgrind-devel/files/patch-VEX_auxprogs_genoffsets.c (contents, props changed)
head/devel/valgrind/files/patch-VEX_auxprogs_genoffsets.c (contents, props changed)
Modified:
head/devel/valgrind-devel/Makefile
head/devel/valgrind-devel/files/patch-configure.ac
head/devel/valgrind/Makefile
head/devel/valgrind/files/patch-configure.ac
Modified: head/devel/valgrind-devel/Makefile
==============================================================================
--- head/devel/valgrind-devel/Makefile Fri Feb 21 06:56:46 2020 (r526607)
+++ head/devel/valgrind-devel/Makefile Fri Feb 21 06:58:07 2020 (r526608)
@@ -4,7 +4,7 @@
PORTNAME= valgrind
PORTVERSION= 3.10.1.20160113
DISTVERSIONPREFIX= freebsd-
-PORTREVISION= 6
+PORTREVISION= 7
PORTEPOCH= 1
CATEGORIES= devel
MASTER_SITES= https://bitbucket.org/${BB_ACCOUNT}/${BB_PROJECT}/get/${BB_COMMIT}.tar.gz?dummy=/ \
Added: head/devel/valgrind-devel/files/patch-VEX_auxprogs_genoffsets.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/devel/valgrind-devel/files/patch-VEX_auxprogs_genoffsets.c Fri Feb 21 06:58:07 2020 (r526608)
@@ -0,0 +1,11 @@
+--- VEX/auxprogs/genoffsets.c 2016-01-13 19:20:20 UTC
++++ VEX/auxprogs/genoffsets.c
+@@ -59,7 +59,7 @@
+ #define VG_STRINGIFZ(__str) #__str
+ #define VG_STRINGIFY(__str) VG_STRINGIFZ(__str)
+
+-#define my_offsetof(__type,__field) (&((__type*)0)->__field)
++#define my_offsetof(__type,__field) offsetof(__type,__field)
+
+ /* This forces gcc to evaluate the my_offsetof call at compile time,
+ and then emits it in the assembly, along with the nonsense string
Modified: head/devel/valgrind-devel/files/patch-configure.ac
==============================================================================
--- head/devel/valgrind-devel/files/patch-configure.ac Fri Feb 21 06:56:46 2020 (r526607)
+++ head/devel/valgrind-devel/files/patch-configure.ac Fri Feb 21 06:58:07 2020 (r526608)
@@ -1,23 +1,21 @@
--- configure.ac.orig 2016-01-13 19:20:20 UTC
+++ configure.ac
-@@ -145,7 +145,19 @@
- notclang-5.*)
+@@ -136,16 +136,10 @@
+ AM_CONDITIONAL(COMPILER_IS_CLANG, test $is_clang = clang)
+
+ case "${is_clang}-${gcc_version}" in
+- notclang-3.*)
++ notclang-[[3-9]].*|notclang-[[1-9]][[0-9]]*)
AC_MSG_RESULT([ok (${gcc_version})])
;;
+- notclang-4.*)
+- AC_MSG_RESULT([ok (${gcc_version})])
+- ;;
+- notclang-5.*)
+- AC_MSG_RESULT([ok (${gcc_version})])
+- ;;
- clang-2.9|clang-3.*|clang-4.*)
-+ notclang-6.*)
-+ AC_MSG_RESULT([ok (${gcc_version})])
-+ ;;
-+ notclang-7.*)
-+ AC_MSG_RESULT([ok (${gcc_version})])
-+ ;;
-+ notclang-8.*)
-+ AC_MSG_RESULT([ok (${gcc_version})])
-+ ;;
-+ notclang-9.*)
-+ AC_MSG_RESULT([ok (${gcc_version})])
-+ ;;
-+ clang-2.9|clang-[[3-9]].*)
++ clang-2.9|clang-[[3-9]].*|clang-[[1-9]][[0-9]]*)
AC_MSG_RESULT([ok (clang-${gcc_version})])
;;
*)
Modified: head/devel/valgrind/Makefile
==============================================================================
--- head/devel/valgrind/Makefile Fri Feb 21 06:56:46 2020 (r526607)
+++ head/devel/valgrind/Makefile Fri Feb 21 06:58:07 2020 (r526608)
@@ -4,7 +4,7 @@
PORTNAME= valgrind
PORTVERSION= 3.10.1.20160113
DISTVERSIONPREFIX= freebsd-
-PORTREVISION= 7
+PORTREVISION= 8
PORTEPOCH= 1
CATEGORIES= devel
MASTER_SITES= https://bitbucket.org/${BB_ACCOUNT}/${BB_PROJECT}/get/${BB_COMMIT}.tar.gz?dummy=/ \
Added: head/devel/valgrind/files/patch-VEX_auxprogs_genoffsets.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/devel/valgrind/files/patch-VEX_auxprogs_genoffsets.c Fri Feb 21 06:58:07 2020 (r526608)
@@ -0,0 +1,11 @@
+--- VEX/auxprogs/genoffsets.c 2016-01-13 19:20:20 UTC
++++ VEX/auxprogs/genoffsets.c
+@@ -59,7 +59,7 @@
+ #define VG_STRINGIFZ(__str) #__str
+ #define VG_STRINGIFY(__str) VG_STRINGIFZ(__str)
+
+-#define my_offsetof(__type,__field) (&((__type*)0)->__field)
++#define my_offsetof(__type,__field) offsetof(__type,__field)
+
+ /* This forces gcc to evaluate the my_offsetof call at compile time,
+ and then emits it in the assembly, along with the nonsense string
Modified: head/devel/valgrind/files/patch-configure.ac
==============================================================================
--- head/devel/valgrind/files/patch-configure.ac Fri Feb 21 06:56:46 2020 (r526607)
+++ head/devel/valgrind/files/patch-configure.ac Fri Feb 21 06:58:07 2020 (r526608)
@@ -1,23 +1,21 @@
--- configure.ac.orig 2016-01-13 19:20:20 UTC
+++ configure.ac
-@@ -145,7 +145,19 @@
- notclang-5.*)
+@@ -136,16 +136,10 @@
+ AM_CONDITIONAL(COMPILER_IS_CLANG, test $is_clang = clang)
+
+ case "${is_clang}-${gcc_version}" in
+- notclang-3.*)
++ notclang-[[3-9]].*|notclang-[[1-9]][[0-9]]*)
AC_MSG_RESULT([ok (${gcc_version})])
;;
+- notclang-4.*)
+- AC_MSG_RESULT([ok (${gcc_version})])
+- ;;
+- notclang-5.*)
+- AC_MSG_RESULT([ok (${gcc_version})])
+- ;;
- clang-2.9|clang-3.*|clang-4.*)
-+ notclang-6.*)
-+ AC_MSG_RESULT([ok (${gcc_version})])
-+ ;;
-+ notclang-7.*)
-+ AC_MSG_RESULT([ok (${gcc_version})])
-+ ;;
-+ notclang-8.*)
-+ AC_MSG_RESULT([ok (${gcc_version})])
-+ ;;
-+ notclang-9.*)
-+ AC_MSG_RESULT([ok (${gcc_version})])
-+ ;;
-+ clang-2.9|clang-[[3-9]].*)
++ clang-2.9|clang-[[3-9]].*|clang-[[1-9]][[0-9]]*)
AC_MSG_RESULT([ok (clang-${gcc_version})])
;;
*)
More information about the svn-ports-head
mailing list