Skip to content

Commit b8ae30a

Browse files
arndbgregkh
authored andcommitted
vbox: fix link error with 'gcc -Og'
With the new CONFIG_CC_OPTIMIZE_FOR_DEBUGGING option, we get a link error in the vboxguest driver, when that fails to optimize out the call to the compat handler: drivers/virt/vboxguest/vboxguest_core.o: In function `vbg_ioctl_hgcm_call': vboxguest_core.c:(.text+0x1f6e): undefined reference to `vbg_hgcm_call32' Another compile-time check documents better what we want and avoids the error. Acked-by: Randy Dunlap <rdunlap@infradead.org> Tested-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 9e9a615 commit b8ae30a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/virt/vboxguest/vboxguest_core.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1312,7 +1312,7 @@ static int vbg_ioctl_hgcm_call(struct vbg_dev *gdev,
13121312
return -EINVAL;
13131313
}
13141314

1315-
if (f32bit)
1315+
if (IS_ENABLED(CONFIG_COMPAT) && f32bit)
13161316
ret = vbg_hgcm_call32(gdev, client_id,
13171317
call->function, call->timeout_ms,
13181318
VBG_IOCTL_HGCM_CALL_PARMS32(call),

0 commit comments

Comments
 (0)