The reason for the compilation failure under -current is revision 1.27 of cpufunc.h, which has a bunch of 'asm volatile' statements. The gcc online documentation states: ... 6.47.1 Basic Asm — Assembler Instructions Without Operands A basic asm statement has the following syntax:
asm asm-qualifiers ( AssemblerInstructions ) The asm keyword is a GNU extension. When writing code that can be compiled with -ansi and the various -std options, use __asm__ instead of asm (see Alternate Keywords). Qualifiers volatile The optional volatile qualifier has no effect. All basic asm blocks are implicitly volatile. .... So I replaced every 'asm volatile' with '__asm__'. Now it compiles and runs fine. This probably is not right if one uses clang for OS building, but I am not there yet. On Fri, 10 May 2019 at 21:06, Kamil Rytarowski <[email protected]> wrote: > > On 10.05.2019 21:04, Mayuresh wrote: > > On Sat, May 11, 2019 at 12:05:03AM +0530, Mayuresh wrote: > >> pxe_call.c:(.text.pxe_api_call+0x12): undefined reference to > >> `__stack_chk_guard' > > > > PKGSRC_USE_SSP=no makes it go away, but that gives rise to following > > errors that weren't present when it was not set. > > > > > > In file included from > > /usr/pkgsrc/wip/virtualbox/work/VirtualBox-5.0.16/src/VBox/HostDrivers/Support/SUPR3HardenedMain.cpp:67:0: > > /usr/pkgsrc/wip/virtualbox/work/VirtualBox-5.0.16/include/VBox/types.h:78:37: > > error: expected unqualified-id before numeric constant > > typedef struct VM *PVM; > > ^ > > /usr/pkgsrc/wip/virtualbox/work/VirtualBox-5.0.16/include/VBox/types.h:78:37: > > error: expected initializer before numeric constant > > kmk: *** > > [/usr/pkgsrc/wip/virtualbox/work/VirtualBox-5.0.16/out/netbsd.amd64/release/obj/SUPR3HardenedStatic/SUPR3HardenedMain.o] > > Error 1 > > > > > > Mayuresh > > > > If you want to install it on NetBSD as host, it won't work. The part is > not finished. > -- ----
