]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
FreeBSD: add support for FreeBSD 14.1
authorPaul Floyd <pjfloyd@wanadoo.fr>
Wed, 8 May 2024 12:01:09 +0000 (14:01 +0200)
committerPaul Floyd <pjfloyd@wanadoo.fr>
Wed, 8 May 2024 12:01:09 +0000 (14:01 +0200)
Just one extra syscall that I can see.

configure.ac
coregrind/m_syswrap/priv_syswrap-freebsd.h
coregrind/m_syswrap/syswrap-freebsd.c
include/vki/vki-scnums-freebsd.h

index 46efdc7590bc0b41ed592309aa5c3d01ae843439..22be6e59baf9823d5f29818d9eb59ba0c3f6e7d3 100755 (executable)
@@ -415,8 +415,10 @@ case "${host_os}" in
         freebsd_13_2=1320
         AC_DEFINE([FREEBSD_13_3], 1330, [FREEBSD_VERS value for FreeBSD 13.3])
         freebsd_13_3=1330
-        AC_DEFINE([FREEBSD_14], 1400, [FREEBSD_VERS value for FreeBSD 14.x])
+        AC_DEFINE([FREEBSD_14], 1400, [FREEBSD_VERS value for FreeBSD 14.0])
         freebsd_14=1400
+        AC_DEFINE([FREEBSD_14_1], 1410, [FREEBSD_VERS value for FreeBSD 14.1])
+        freebsd_14_1=1410
         AC_DEFINE([FREEBSD_15], 1500, [FREEBSD_VERS value for FreeBSD 15.x])
         freebsd_15=1500
 
@@ -477,9 +479,22 @@ case "${host_os}" in
            esac
            ;;
         14.*)
-           AC_MSG_RESULT([FreeBSD 14.x (${kernel})])
-           AC_DEFINE([FREEBSD_VERS], FREEBSD_14, [FreeBSD version])
-           freebsd_vers=$freebsd_14
+           case "${kernel}" in
+           14.0-*)
+              AC_MSG_RESULT([FreeBSD 14.0 (${kernel})])
+              AC_DEFINE([FREEBSD_VERS], FREEBSD_14_0, [FreeBSD version])
+              freebsd_vers=$freebsd_14_0
+              ;;
+           14.1-*)
+              AC_MSG_RESULT([FreeBSD 14.1 (${kernel})])
+              AC_DEFINE([FREEBSD_VERS], FREEBSD_14_1, [FreeBSD version])
+              freebsd_vers=$freebsd_14_1
+              ;;
+           *)
+              AC_MSG_RESULT([unsupported (${kernel})])
+              AC_MSG_ERROR([Valgrind works on FreeBSD 10.x to 15.x])
+              ;;
+           esac
            ;;
         15.*)
            AC_MSG_RESULT([FreeBSD 15.x (${kernel})])
index ed0889d200b734a14aeebc2d61cdbdcb9c07c698..9efba456613d2606e4bbb414955e5acc2a0f06f6 100644 (file)
@@ -569,12 +569,14 @@ DECL_TEMPLATE(freebsd, sys_kqueuex) // 583
 DECL_TEMPLATE(freebsd, sys_membarrier) // 584
 #endif
 
-#if (FREEBSD_VERS >= FREEBSD_15)
+#if (FREEBSD_VERS >= FREEBSD_14)
 DECL_TEMPLATE(freebsd, sys_timerfd_create) // 585
 DECL_TEMPLATE(freebsd, sys_timerfd_gettime) // 586
 DECL_TEMPLATE(freebsd, sys_timerfd_settime) // 587
+#if (FREEBSD_VERS >= FREEBSD_14_1)
 DECL_TEMPLATE(freebsd, sys_kcmp) // 588
 #endif
+#endif
 
 DECL_TEMPLATE(freebsd, sys_fake_sigreturn)
 
index 51c562346ebbaf572a36c521f1dcc920bcc92594..730e1de3f08cea036a6450455c464857adc79ad6 100644 (file)
@@ -7106,7 +7106,7 @@ PRE(sys_membarrier)
 
 #endif
 
-#if (FREEBSD_VERS >= FREEBSD_15)
+#if (FREEBSD_VERS >= FREEBSD_14)
 
 // SYS_timerfd_create 585
 // int timerfd_create(int clockid, int flags);
@@ -7181,6 +7181,8 @@ POST(sys_timerfd_settime)
    }
 }
 
+#if (FREEBSD_VERS >= FREEBSD_14_1)
+
 // SYS_kcmp 588
 // int kcmp(pid_t pid1, pid_t pid2, int type, uintptr_t idx1, uintptr_t idx2);
 PRE(sys_kcmp)
@@ -7205,8 +7207,10 @@ PRE(sys_kcmp)
    }
 }
 
+#endif // FREEBSD_14_1
 
-#endif
+
+#endif // FREEBSD_14
 
 #undef PRE
 #undef POST
@@ -7937,12 +7941,14 @@ const SyscallTableEntry ML_(syscall_table)[] = {
    BSDXY(__NR_kqueuex,          sys_kqueuex),           // 583
    BSDX_(__NR_membarrier,       sys_membarrier),        // 584
 #endif
-#if (FREEBSD_VERS >= FREEBSD_15)
+#if (FREEBSD_VERS >= FREEBSD_14)
    BSDXY(__NR_timerfd_create,   sys_timerfd_create),    // 585
    BSDXY(__NR_timerfd_settime,  sys_timerfd_settime),   // 586
    BSDXY(__NR_timerfd_gettime,  sys_timerfd_gettime),   // 587
+#if (FREEBSD_VERS >= FREEBSD_14_1)
    BSDX_(__NR_kcmp,             sys_kcmp),              // 588
 #endif
+#endif
 
 
    BSDX_(__NR_fake_sigreturn,   sys_fake_sigreturn),    // 1000, fake sigreturn
index 967cd7835ecc24bcaeb8ff45a112cadd08edc5d6..f9ec98ab1ca1b96ee88533600f415f672249d56a 100644 (file)
 
 #endif
 
-#if (FREEBSD_VERS >= FREEBSD_15)
+#if (FREEBSD_VERS >= FREEBSD_14)
 #define __NR_timerfd_create      585
 #define __NR_timerfd_gettime     586
 #define __NR_timerfd_settime     587
+#if (FREEBSD_VERS >= FREEBSD_14_1)
 #define __NR_kcmp                588
+#endif
 
 #endif