emulators/bochs: fix build issues
disable hidden deps on docbook and fix various format strings. Reminded + ok sthen@ While here also fix the HOMEPAGE.
This commit is contained in:
parent
fa1a393fa8
commit
2b020a3627
@ -1,20 +1,22 @@
|
||||
COMMENT= x86 machine simulator
|
||||
|
||||
DISTNAME= bochs-2.7
|
||||
REVISION= 0
|
||||
CATEGORIES= emulators
|
||||
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=bochs/}
|
||||
|
||||
HOMEPAGE= https://bochs.sourceforge.net/
|
||||
HOMEPAGE= https://bochs.sourceforge.io/
|
||||
|
||||
# LGPLv2.1+ and MIT
|
||||
PERMIT_PACKAGE= Yes
|
||||
|
||||
WANTLIB += ${COMPILER_LIBCXX} c curses m pthread
|
||||
|
||||
COMPILER = base-clang ports-gcc base-gcc
|
||||
COMPILER = base-clang ports-gcc base-gcc
|
||||
|
||||
CONFIGURE_STYLE= gnu autoconf no-autoheader
|
||||
CONFIGURE_ARGS= --enable-all-optimizations \
|
||||
CONFIGURE_ARGS= --disable-docbook \
|
||||
--enable-all-optimizations \
|
||||
--enable-avx \
|
||||
--enable-e1000 \
|
||||
--enable-es1370 \
|
||||
|
23
emulators/bochs/patches/patch-cpu_apic_cc
Normal file
23
emulators/bochs/patches/patch-cpu_apic_cc
Normal file
@ -0,0 +1,23 @@
|
||||
fix format string
|
||||
|
||||
Index: cpu/apic.cc
|
||||
--- cpu/apic.cc.orig
|
||||
+++ cpu/apic.cc
|
||||
@@ -26,6 +26,8 @@
|
||||
#include "scalar_arith.h"
|
||||
#include "iodev/iodev.h"
|
||||
|
||||
+#include <inttypes.h>
|
||||
+
|
||||
#if BX_SUPPORT_APIC
|
||||
|
||||
extern bool simulate_xapic;
|
||||
@@ -1176,7 +1178,7 @@ void bx_local_apic_c::set_vmx_preemption_timer(Bit32u
|
||||
vmx_preemption_timer_value = value;
|
||||
vmx_preemption_timer_initial = bx_pc_system.time_ticks();
|
||||
vmx_preemption_timer_fire = ((vmx_preemption_timer_initial >> vmx_preemption_timer_rate) + value) << vmx_preemption_timer_rate;
|
||||
- BX_DEBUG(("VMX Preemption timer: value = %u, rate = %u, init = %u, fire = %u", value, vmx_preemption_timer_rate, vmx_preemption_timer_initial, vmx_preemption_timer_fire));
|
||||
+ BX_DEBUG(("VMX Preemption timer: value = %u, rate = %u, init = %" PRIu64 ", fire = %" PRIu64, value, vmx_preemption_timer_rate, vmx_preemption_timer_initial, vmx_preemption_timer_fire));
|
||||
bx_pc_system.activate_timer_ticks(vmx_timer_handle, vmx_preemption_timer_fire - vmx_preemption_timer_initial, 0);
|
||||
vmx_timer_active = 1;
|
||||
}
|
14
emulators/bochs/patches/patch-cpu_paging_cc
Normal file
14
emulators/bochs/patches/patch-cpu_paging_cc
Normal file
@ -0,0 +1,14 @@
|
||||
fix format string
|
||||
|
||||
Index: cpu/paging.cc
|
||||
--- cpu/paging.cc.orig
|
||||
+++ cpu/paging.cc
|
||||
@@ -804,7 +804,7 @@ bx_phy_address BX_CPU_C::translate_linear_long_mode(bx
|
||||
// - R/W bit=0 and Dirty=1 for leaf entry
|
||||
bool shadow_stack_page = ((combined_access & BX_COMBINED_ACCESS_WRITE) != 0) && ((entry[leaf] & 0x40) != 0) && ((entry[leaf] & 0x02) == 0);
|
||||
if (!shadow_stack_page) {
|
||||
- BX_DEBUG(("shadow stack access to not shadow stack page CA=%x entry=%lx\n", combined_access, Bit32u(entry[leaf] & 0xfff)));
|
||||
+ BX_DEBUG(("shadow stack access to not shadow stack page CA=%x entry=%x\n", combined_access, Bit32u(entry[leaf] & 0xfff)));
|
||||
page_fault(ERROR_PROTECTION, laddr, user, rw);
|
||||
}
|
||||
|
41
emulators/bochs/patches/patch-iodev_hdimage_vbox_cc
Normal file
41
emulators/bochs/patches/patch-iodev_hdimage_vbox_cc
Normal file
@ -0,0 +1,41 @@
|
||||
fix format string
|
||||
|
||||
Index: iodev/hdimage/vbox.cc
|
||||
--- iodev/hdimage/vbox.cc.orig
|
||||
+++ iodev/hdimage/vbox.cc
|
||||
@@ -229,7 +229,7 @@ ssize_t vbox_image_t::read(void *buf, size_t count)
|
||||
while (count > 0) {
|
||||
off_t readable = perform_seek();
|
||||
if (readable == INVALID_OFFSET) {
|
||||
- BX_ERROR(("vbox disk image read failed on %u bytes at " FMT_LL "d", (unsigned)count, current_offset));
|
||||
+ BX_ERROR(("vbox disk image read failed on %u bytes at %lld", (unsigned)count, (long long)current_offset));
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -253,7 +253,7 @@ ssize_t vbox_image_t::write(const void *buf, size_t co
|
||||
while (count > 0) {
|
||||
off_t writable = perform_seek();
|
||||
if (writable == INVALID_OFFSET) {
|
||||
- BX_ERROR(("vbox disk image write failed on %u bytes at " FMT_LL "d", (unsigned)count, current_offset));
|
||||
+ BX_ERROR(("vbox disk image write failed on %u bytes at %lld", (unsigned)count, (long long)current_offset));
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -389,7 +389,7 @@ void vbox_image_t::read_block(const Bit32u index)
|
||||
offset = dtoh32(mtlb[index]) * header.block_size;
|
||||
bx_read_image(file_descriptor, header.offset_data + offset, block_data, header.block_size);
|
||||
|
||||
- BX_DEBUG(("reading block index %d (%d) " FMT_LL "d", index, dtoh32(mtlb[index]), offset));
|
||||
+ BX_DEBUG(("reading block index %d (%d) %lld", index, dtoh32(mtlb[index]), (long long)offset));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -415,7 +415,7 @@ void vbox_image_t::write_block(const Bit32u index)
|
||||
|
||||
offset = dtoh32(mtlb[index]) * header.block_size;
|
||||
|
||||
- BX_DEBUG(("writing block index %d (%d) " FMT_LL "d", index, dtoh32(mtlb[index]), offset));
|
||||
+ BX_DEBUG(("writing block index %d (%d) %lld", index, dtoh32(mtlb[index]), (long long)offset));
|
||||
|
||||
bx_write_image(file_descriptor, header.offset_data + offset, block_data, header.block_size);
|
||||
}
|
23
emulators/bochs/patches/patch-iodev_hdimage_vmware4_cc
Normal file
23
emulators/bochs/patches/patch-iodev_hdimage_vmware4_cc
Normal file
@ -0,0 +1,23 @@
|
||||
fix format string
|
||||
|
||||
Index: iodev/hdimage/vmware4.cc
|
||||
--- iodev/hdimage/vmware4.cc.orig
|
||||
+++ iodev/hdimage/vmware4.cc
|
||||
@@ -180,7 +180,7 @@ ssize_t vmware4_image_t::read(void * buf, size_t count
|
||||
while (count > 0) {
|
||||
off_t readable = perform_seek();
|
||||
if (readable == INVALID_OFFSET) {
|
||||
- BX_DEBUG(("vmware4 disk image read failed on %u bytes at " FMT_LL "d", (unsigned)count, current_offset));
|
||||
+ BX_DEBUG(("vmware4 disk image read failed on %u bytes at %lld", (unsigned)count, (long long)current_offset));
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -202,7 +202,7 @@ ssize_t vmware4_image_t::write(const void * buf, size_
|
||||
while (count > 0) {
|
||||
off_t writable = perform_seek();
|
||||
if (writable == INVALID_OFFSET) {
|
||||
- BX_DEBUG(("vmware4 disk image write failed on %u bytes at " FMT_LL "d", (unsigned)count, current_offset));
|
||||
+ BX_DEBUG(("vmware4 disk image write failed on %u bytes at %lld", (unsigned)count, (long long)current_offset));
|
||||
return -1;
|
||||
}
|
||||
|
21
emulators/bochs/patches/patch-iodev_network_netutil_cc
Normal file
21
emulators/bochs/patches/patch-iodev_network_netutil_cc
Normal file
@ -0,0 +1,21 @@
|
||||
fix format string
|
||||
|
||||
Index: iodev/network/netutil.cc
|
||||
--- iodev/network/netutil.cc.orig
|
||||
+++ iodev/network/netutil.cc
|
||||
@@ -1671,11 +1671,11 @@ void vnet_server_c::ftp_list_directory(tcp_conn_t *tcp
|
||||
strftime(tmptime, 20, "%b %d %H:%M", localtime(&st.st_mtime));
|
||||
}
|
||||
if (S_ISDIR(st.st_mode)) {
|
||||
- sprintf(linebuf, "drwxrwxr-x 1 ftp ftp %ld %s %s%c%c", st.st_size,
|
||||
- tmptime, dent->d_name, 13, 10);
|
||||
+ sprintf(linebuf, "drwxrwxr-x 1 ftp ftp %lld %s %s%c%c",
|
||||
+ (long long) st.st_size, tmptime, dent->d_name, 13, 10);
|
||||
} else {
|
||||
- sprintf(linebuf, "-rw-rw-r-- 1 ftp ftp %ld %s %s%c%c", st.st_size,
|
||||
- tmptime, dent->d_name, 13, 10);
|
||||
+ sprintf(linebuf, "-rw-rw-r-- 1 ftp ftp %lld %s %s%c%c",
|
||||
+ (long long)st.st_size, tmptime, dent->d_name, 13, 10);
|
||||
}
|
||||
}
|
||||
} else {
|
Loading…
Reference in New Issue
Block a user