diff options
author | Po-Chuan Hsieh <sunpoet@FreeBSD.org> | 2023-05-03 00:17:41 +0800 |
---|---|---|
committer | Po-Chuan Hsieh <sunpoet@FreeBSD.org> | 2023-05-03 00:17:41 +0800 |
commit | 0f497b4088a2053bffbdc534bac05f21a9a3f9e7 (patch) | |
tree | 5b15b461383af276b948a8a99426c9b3c85307c2 | |
parent | dd6d333a6fa0e3d7604cf3e4d3e57dedff7f2986 (diff) | |
download | freebsd-ports-0f497b4088a2053bffbdc534bac05f21a9a3f9e7.zip |
devel/libunwind: Fix build on 14-CURRENT on armv6/armv7
ptrace/_UPT_access_fpreg.c:107:25: error: no member named 'fpr' in 'struct fpreg'
memcpy(&fpreg.fpr[reg], val, sizeof(unw_fpreg_t));
~~~~~ ^
ptrace/_UPT_access_fpreg.c:123:30: error: no member named 'fpr' in 'struct fpreg'
memcpy(val, &fpreg.fpr[reg], sizeof(unw_fpreg_t));
~~~~~ ^
2 errors generated.
Reported by: Mark Millard <marklmi@yahoo.com>
Obtained from: https://github.com/libunwind/libunwind/commit/99fb31d5f05ff6c96ca3a9350c792618fab23f2d
Reference: https://pkg-status.freebsd.org/beefy8/data/main-armv6-default/pdf5b273c8e36_s83d5725005/logs/libunwind-20211201_2.log
https://pkg-status.freebsd.org/ampere2/data/main-armv7-default/p519c178336e5_scb3c414f2f/logs/libunwind-20211201_2.log
-rw-r--r-- | devel/libunwind/files/patch-armv7 | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/devel/libunwind/files/patch-armv7 b/devel/libunwind/files/patch-armv7 new file mode 100644 index 000000000000..e22e4b42fbd4 --- /dev/null +++ b/devel/libunwind/files/patch-armv7 @@ -0,0 +1,29 @@ +Obtained from: https://github.com/libunwind/libunwind/commit/99fb31d5f05ff6c96ca3a9350c792618fab23f2d + +--- src/ptrace/_UPT_access_fpreg.c.orig 2021-11-26 16:58:55 UTC ++++ src/ptrace/_UPT_access_fpreg.c +@@ -104,7 +104,11 @@ _UPT_access_fpreg (unw_addr_space_t as, unw_regnum_t r + #elif defined(__i386__) + memcpy(&fpreg.fpr_acc[reg], val, sizeof(unw_fpreg_t)); + #elif defined(__arm__) ++# if __FreeBSD_version >= 1400079 ++ memcpy(&fpreg.fpr_r[reg], val, sizeof(unw_fpreg_t)); ++# else + memcpy(&fpreg.fpr[reg], val, sizeof(unw_fpreg_t)); ++# endif + #elif defined(__aarch64__) + memcpy(&fpreg.fp_q[reg], val, sizeof(unw_fpreg_t)); + #elif defined(__powerpc64__) +@@ -120,7 +124,11 @@ _UPT_access_fpreg (unw_addr_space_t as, unw_regnum_t r + #elif defined(__i386__) + memcpy(val, &fpreg.fpr_acc[reg], sizeof(unw_fpreg_t)); + #elif defined(__arm__) +- memcpy(val, &fpreg.fpr[reg], sizeof(unw_fpreg_t)); ++# if __FreeBSD_version >= 1400079 ++ memcpy(&fpreg.fpr_r[reg], val, sizeof(unw_fpreg_t)); ++# else ++ memcpy(&fpreg.fpr[reg], val, sizeof(unw_fpreg_t)); ++# endif + #elif defined(__aarch64__) + memcpy(val, &fpreg.fp_q[reg], sizeof(unw_fpreg_t)); + #elif defined(__powerpc64__) |