When trying to compile MARSS on FreeBSD (with the following patch)

This patch is required to get to the build stage with scons.  I'm
still working on getting it to build correctly, but can this patch
please be applied upstream?

diff --git a/qemu/SConfigure b/qemu/SConfigure
index eeccb5b..fa7fb82 100644
--- a/qemu/SConfigure
+++ b/qemu/SConfigure
@@ -560,10 +560,10 @@ usb = "linux"
 linux_user = True

 # Check target OS
-if conf.CheckCPUDefine("__linux__"):
+if conf.CheckCPUDefine("__linux__") or conf.CheckCPUDefine("__FreeBSD__"):
     env['targetos'] = "Linux"
 else:
-    print("ERROR: Unsupported target OS, use Linux")
+    print("ERROR: Unsupported target OS, use FreeBSD or Linux")
     exit_with_error()

 CFLAGS = "%s -fno-strict-aliasing" % (env['CCFLAGS'])
diff --git a/qemu/SConstruct b/qemu/SConstruct
index 62e0a5c..94a70ae 100644
--- a/qemu/SConstruct
+++ b/qemu/SConstruct
@@ -291,11 +291,11 @@ else:
 env['CPPPATH'].append("%s/fpu" % env['source_path'])

 op_helper_obj = env.Object('%s/op_helper.c' % target_path,
-        CCFLAGS = env['CCFLAGS'] + HELPER_CFLAGS)
+        CCFLAGS = env['CCFLAGS'] + [HELPER_CFLAGS])
 helper_obj = env.Object('%s/helper.c' % target_path,
-        CCFLAGS = env['CCFLAGS'] + HELPER_CFLAGS)
+        CCFLAGS = env['CCFLAGS'] + [HELPER_CFLAGS])
 cpu_exec_obj = env.Object('cpu-exec.c',
-        CCFLAGS = env['CCFLAGS'] + HELPER_CFLAGS)
+        CCFLAGS = env['CCFLAGS'] + [HELPER_CFLAGS])

 cpu_emu_objs += " %s/op_helper.o %s/helper.o" % (target_path, target_path)
 cpu_emu_objs += " cpu-exec.o"
diff --git a/qemu/qemu-timer.h b/qemu/qemu-timer.h
index 7107e1a..92fb0de 100644
--- a/qemu/qemu-timer.h
+++ b/qemu/qemu-timer.h
@@ -10,6 +10,10 @@
 #include <mmsystem.h>
 #endif

+#ifdef __FreeBSD__
+#include <osreldate.h>
+#endif
+
 /* timers */

 typedef struct QEMUClock QEMUClock;



-- 
Eitan Adler

_______________________________________________
http://www.marss86.org
Marss86-Devel mailing list
[email protected]
https://www.cs.binghamton.edu/mailman/listinfo/marss86-devel

Reply via email to