New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NetBSD support #1247
NetBSD support #1247
Conversation
@@ -39,7 +39,7 @@ | |||
*/ | |||
|
|||
#if !IN_LLVM | |||
//#if TARGET_LINUX || TARGET_OSX || TARGET_FREEBSD || TARGET_OPENBSD || TARGET_SOLARIS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why add to a commented out list? What is this even for?
Update: never mind, David explained it below.
Would be better if all the dmd2/ modifications were submitted upstream. |
@@ -385,6 +385,11 @@ int tryMain(size_t argc, const char *argv[]) | |||
VersionCondition::addPredefinedGlobalIdent("OpenBSD"); | |||
VersionCondition::addPredefinedGlobalIdent("ELFv1"); | |||
global.params.isFreeBSD = true; | |||
#elif TARGET_NETBSD |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A large part of the code in this file is DMD-only; we don't use it (see the IN_LLVM conditionals). Please either drop those changes or submit them to upstream DMD (although the file has been converted to D there), as it just increases the size of the upstream diff we have to manage for no benefit.
I have restarted the Travis build for LLVM 3.5. I think it was some spurious error. |
See also #1248. |
Thanks everybody. I will fix issues on this week (I hope). |
@@ -977,6 +977,7 @@ int main(int argc, char **argv) { | |||
global.params.isWindows = triple.isOSWindows(); | |||
global.params.isFreeBSD = triple.getOS() == llvm::Triple::FreeBSD; | |||
global.params.isOpenBSD = triple.getOS() == llvm::Triple::OpenBSD; | |||
global.params.isNetBSD = triple.getOS() == llvm::Triple::NetBSD; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no need for this with #1249 . Just use global.params.targetTriple
if needed.
0c6cf14
to
cda773e
Compare
Please take look to my fixes |
Hi Nikolay, could you please remove the unused |
klickverbot: ...to define the NetBSD version identifier when compiling for NetBSD, see registerPredefinedTargetVersions() in driver/main.cpp. https://github.com/ldc-developers/ldc/blob/master/driver/main.cpp already contains NetBSD section on line 770 |
I remove the unused isNetBSD declaration |
@@ -83,6 +83,7 @@ else() | |||
endif() | |||
file(GLOB_RECURSE CORE_D_UNIX ${RUNTIME_DIR}/src/core/sys/posix/*.d) | |||
file(GLOB_RECURSE CORE_D_FREEBSD ${RUNTIME_DIR}/src/core/sys/freebsd/*.d) | |||
file(GLOB_RECURSE CORE_D_NETBSD ${RUNTIME_DIR}/src/core/sys/netbsd/*.d) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you planning on adding any NetBSD-specific declarations to this druntime directory? If not, better to leave this out until you need it.
Are you able to get ldc passing the druntime/phobos tests with only this patch to ldc? If not, you might want to get that working first, then finish this ldc PR after you're sure it's working.
Are you planning on adding any NetBSD-specific declarations to this druntime directory? ... Are you able to get ldc passing the druntime/phobos tests with only this patch to ldc? Yes. core/sys/netbsd is necessary for passing unit tests. |
OK, looks like you just copied the contents of core.sys.freebsd over. What is the status of the druntime/phobos tests for you on NetBSD, everything passes? |
NetBSD support (compiler parts)
Thanks! Getting all of the test suite to pass will of course be the next challenge. ;) |
No description provided.