Bug 198232 - devel/kBuild: fix build with clang [PATCH]
Summary: devel/kBuild: fix build with clang [PATCH]
Status: Closed Works As Intended
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Virtualbox Team (Nobody)
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2015-03-03 17:23 UTC by Matthieu Volat
Modified: 2016-11-24 21:49 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (vbox)


Attachments
Fix building with clang (2.06 KB, text/plain)
2015-03-03 17:23 UTC, Matthieu Volat
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matthieu Volat 2015-03-03 17:23:11 UTC
Created attachment 153717 [details]
Fix building with clang

Hi,

If somebody find the following of interest, browsing through current dev tree of kBuild(1)(2) gave me the answer to fix building the port with clang, even if I could not find how originally gcc worked around a 4th main() parameter...

See patch attached. I allows to build kBuild, and emulators/virtualbox-ose and emulators/virtualbox-ose also build and works fine under amd64 (given the patch, I do not expect issues with i386 either).

(1) http://trac.netlabs.org/kbuild/browser/trunk/src/kmk/kmkbuiltin/test.c
(2) http://trac.netlabs.org/kbuild/browser/trunk/src/kmk/kmkbuiltin.h
Comment 1 Matthieu Volat 2015-03-07 10:59:53 UTC
Sorry, with the last virtualbox-ose, it seems that not using gcc do build kDevel (with or without the rest of the patch) will break virtualbox-ose building with an error:

kBuild: Compiling VBoxRemPrimary - /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.24/src/recompiler/cpu-exec.c
In file included from /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.24/src/recompiler/cpu-exec.c:30:
/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.24/src/recompiler/target-i386/exec.h:41:30: error: 
      global register variables are not supported
register struct CPUX86State *env asm(AREG0);
                             ^

Anybody can close the issue :(