aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian R. Gaeke <brg@dgate.ORG>2023-07-11 08:22:23 +0000
committerRobert Clausecker <fuz@FreeBSD.org>2023-07-11 22:07:22 +0000
commit1072f555f4303b06fc936c59597ce47407e97e2f (patch)
treefcca02256c706a09020ace0fabdea2a4c1663a8c
parentfdc2540238121f148c9fb4c7d1f34ec9abea9bd7 (diff)
downloadports-1072f555f4303b06fc936c59597ce47407e97e2f.tar.gz
ports-1072f555f4303b06fc936c59597ce47407e97e2f.zip
emulators/vmips: fix build with clang 16
- patch out code that sets the unexpected handler. It is not strictly necessary for normal functionality. - apply C++ and C standards appropriate to this program in the port Makefile. PR: 272436
-rw-r--r--emulators/vmips/Makefile4
-rw-r--r--emulators/vmips/files/patch-vmips.cc24
2 files changed, 27 insertions, 1 deletions
diff --git a/emulators/vmips/Makefile b/emulators/vmips/Makefile
index 45f23f9892a5..8c7ec21009f6 100644
--- a/emulators/vmips/Makefile
+++ b/emulators/vmips/Makefile
@@ -1,6 +1,6 @@
PORTNAME= vmips
PORTVERSION= 1.5.1
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= emulators
MASTER_SITES= SF \
http://www.dgate.org/vmips/releases/${DISTNAME}/
@@ -14,6 +14,8 @@ LICENSE_FILE= ${WRKSRC}/COPYING
USES= gmake
GNU_CONFIGURE= yes
+USE_CSTD= gnu99
+USE_CXXSTD= gnu++98
INFO= vmips
diff --git a/emulators/vmips/files/patch-vmips.cc b/emulators/vmips/files/patch-vmips.cc
new file mode 100644
index 000000000000..10c31ef29fc3
--- /dev/null
+++ b/emulators/vmips/files/patch-vmips.cc
@@ -0,0 +1,24 @@
+--- vmips.cc.orig 2013-05-25 22:21:31 UTC
++++ vmips.cc
+@@ -591,9 +591,11 @@ vmips::run()
+ return 0;
+ }
+
++#if 0
+ static void vmips_unexpected() {
+ fatal_error ("unexpected exception");
+ }
++#endif
+
+ static void vmips_terminate() {
+ fatal_error ("uncaught exception");
+@@ -602,7 +604,9 @@ static void vmips_terminate() {
+ int
+ main(int argc, char **argv)
+ try {
++#if 0
+ std::set_unexpected(vmips_unexpected);
++#endif
+ std::set_terminate(vmips_terminate);
+
+ machine = new vmips(argc, argv);