--- src/recompiler/Makefile.kmk.orig 2020-08-23 13:13:29.327043000 +1000 +++ src/recompiler/Makefile.kmk 2020-08-20 23:18:42.992762000 +1000 @@ -41,6 +41,8 @@ # ifneq ($(KBUILD_TARGET),win) VBoxRemPrimary_TEMPLATE = VBOXR3NP + VBoxRemPrimary_TOOL.freebsd = VBoxGccFreeBSD + VBoxRemPrimary_TOOL.bsdsunix = VBoxGccBSDSUniX # workaround the regparm bug in gcc <= 3.3 VBoxRemPrimary_DEFS = $(if $(VBOX_GCC_BUGGY_REGPARM),GCC_WITH_BUGGY_REGPARM,) else @@ -63,6 +65,10 @@ # Missing fpclassify. Is there a better define or flag for this? VBoxRemPrimary_DEFS.solaris += __C99FEATURES__ endif # win +# XXX Work around a linker issue with GCC 8.x & LLD: +# ld: error: translate.c:(.debug_loc+0xA40FD): has non-ABS relocation R_386_GOTOFF against symbol 'cpu_regs' +VBoxRemPrimary_CFLAGS.freebsd.x86 += -g0 +VBoxRemPrimary_CFLAGS.bsdsunix.x86 += -g0 VBoxRemPrimary_DEFS += IN_REM_R3 REM_INCLUDE_CPU_H NEED_CPU_H #VBoxRemPrimary_DEFS += REM_PHYS_ADDR_IN_TLB #VBoxRemPrimary_DEFS += DEBUG_ALL_LOGGING DEBUG_DISAS DEBUG_PCALL CONFIG_DEBUG_EXEC DEBUG_FLUSH DEBUG_IOPORT DEBUG_SIGNAL DEBUG_TLB_CHECK DEBUG_TB_INVALIDATE DEBUG_TLB # Enables huge amounts of debug logging. @@ -83,6 +89,7 @@ VBoxRemPrimary_DEFS.solaris = CONFIG_SOLARIS_VERSION=11 endif VBoxRemPrimary_DEFS.freebsd += _BSD +VBoxRemPrimary_DEFS.bsdsunix += _BSD VBoxRemPrimary_DEFS.amd64 += __x86_64__ VBoxRemPrimary_DEFS.x86 += __i386__