Add DragonFly bootstrap support (ltsmaster)#2461
Add DragonFly bootstrap support (ltsmaster)#2461joakim-noah merged 1 commit intoldc-developers:ltsmasterfrom
Conversation
|
Current status (Together with the other related PR's : |
tests/d2/CMakeLists.txt
Outdated
| # given set of flags without trying all combinations of them. | ||
| add_test(NAME ${name} | ||
| COMMAND make -k -C ${PROJECT_SOURCE_DIR}/tests/d2/dmd-testsuite RESULTS_DIR=${outdir} DMD=$<TARGET_FILE:ldmd2> DFLAGS=${dflags} MODEL=${model} quick | ||
| COMMAND ${CMAKE_MAKE_PROGRAM} -k -C ${PROJECT_SOURCE_DIR}/tests/d2/dmd-testsuite RESULTS_DIR=${outdir} DMD=$<TARGET_FILE:ldmd2> DFLAGS=${dflags} MODEL=${model} quick |
There was a problem hiding this comment.
As Travis shows, ninja as CMAKE_MAKE_PROGRAM doesn't accept -k without numeric argument. It's also not able to run Makefiles.
There was a problem hiding this comment.
@kinke Thanks for pointing out the issue. Hoping this solves the issue, nicely.
There was a problem hiding this comment.
ci/cicleci seems to be doing the right thing now
I think semaphoreci is failing because it is expecting to run against ldc:master and ltsmaster. The CMakeList.txt it is having trouble with was not changed by this PR and unrelatd to the GNUMAKE change i made.
|
Little question: Should i be committing the updated directory links runtime/druntime and runtime/phohos, which should be pointing to the other PR's or will this cause issues during merging later on ? |
|
It would cause inconvenience due to the 3 parallel druntime PRs; but as the submodules are still in your repo, you cannot update them here anyway until they've been merged (need to be in our respective repo). |
|
@kinke Thanks for the reply. Will not commit the links (as per your explanation). I thought it a good idea to split up the druntime PR to reduce the size (which was requested when the druntime master PR was pushed to dlang/druntime). It's a bit annoying to deal with when running tests, but i manage. Locally running cmake + make and/or cmake + ninja works fine now and finishes with 0 errors, so that is pretty good news. |
joakim-noah
left a comment
There was a problem hiding this comment.
You can take out a lot of this, only need a few of these tweaks.
dmd2/cppmangle.c
Outdated
|
|
||
| #if !IN_LLVM | ||
| //#if TARGET_LINUX || TARGET_OSX || TARGET_FREEBSD || TARGET_OPENBSD || TARGET_SOLARIS | ||
| //#if TARGET_LINUX || TARGET_OSX || TARGET_FREEBSD || TARGET_OPENBSD || TARGET_DRAGONFLYBSD || TARGET_SOLARIS |
There was a problem hiding this comment.
Take all these TARGET_DRAGONFLYBSD additions out, as this is unused in ldc, as can be seen by the !IN_LLVM above. We could probably rip all these !IN_LLVM sections out altogether, as it's unlikely we'll ever need to sync against an updated dmd 2.068 frontend again, but certainly no reason to add to it.
dmd2/mars.c
Outdated
| #include <cstdarg> | ||
|
|
||
| #if __linux__ || __APPLE__ || __FreeBSD__ || __OpenBSD__ || __sun | ||
| #if __linux__ || __APPLE__ || __FreeBSD__ || __OpenBSD__ || __DragonFly__ || __sun |
There was a problem hiding this comment.
Almost everything after this is not compiled in because of a giant #if !IN_LLVM block starting about 5% into this file, so you can just drop all your edits below.
dmd2/root/object.h
Outdated
|
|
||
| #if !IN_LLVM | ||
| #define POSIX (__linux__ || __APPLE__ || __FreeBSD__ || __OpenBSD__ || __sun) | ||
| #define POSIX (__linux__ || __APPLE__ || __FreeBSD__ || __OpenBSD__ || __DragonFly__ || __sun) |
dmd2/globals.h
Outdated
| bool isFreeBSD; // generate code for FreeBSD | ||
| bool isOpenBSD; // generate code for OpenBSD | ||
| bool isSolaris; // generate code for Solaris | ||
| bool isDragonFlyBSD;// generate code for DragonFlyBSD |
There was a problem hiding this comment.
Unused for almost two years now, see !IN_LLVM one line up, no need to add this.
dmd2/mars.h
Outdated
| __APPLE__ Mac OSX | ||
| __FreeBSD__ FreeBSD | ||
| __OpenBSD__ OpenBSD | ||
| __DragonFly__ DragonFlyBSD |
There was a problem hiding this comment.
Sorry, missed this, think you should just remove all these comment edits in this header file. This one is obvious and the later TARGET_* stuff is unused by ldc.
There was a problem hiding this comment.
Thanks Joakim for pointing these out. The use of !IN_LLVM was not clear to me. Reverting all of the above.
dmd2/globals.c
Outdated
| #if TARGET_WINDOS | ||
| obj_ext = "obj"; | ||
| #elif TARGET_LINUX || TARGET_OSX || TARGET_FREEBSD || TARGET_OPENBSD || TARGET_SOLARIS | ||
| #elif TARGET_LINUX || TARGET_OSX || TARGET_FREEBSD || TARGET_OPENBSD || TARGET_DRAGONFLYBSD || TARGET_SOLARIS |
There was a problem hiding this comment.
As noted before, TARGET_* are unused in ldc: note the IN_LLVM 9 lines up, which puts this in the #else, meaning it's taken out. All changes to this file can be removed.
| if (HAVE_UNISTD_H) | ||
| # Needed for zlib | ||
| append("-DHAVE_UNISTD_H" CMAKE_C_FLAGS_RELEASE) | ||
| endif() |
There was a problem hiding this comment.
Remove this and rebase, already added it.
There was a problem hiding this comment.
I already rebased and the change is in.
@JohanEngelen
BTW: line 269 doesn't work well when compiling with -DCMAKE_BUILD_TYPE=xxxx other than release. It does work fine if i change it to:
append("-DHAVE_UNISTD_H" CMAKE_C_FLAGS)
Send the same comment to #2317 (which was already merged).
There was a problem hiding this comment.
Johan's PR for this has been merged, you can remove your change.
67cc175 to
9715ede
Compare
|
@joakim-noah Thanks joakim for reviewing a approving ! |
|
Thanks everyone for your reviews and merging this port into ldc ! |
Note: This port only supports 64-bit, because DragonFlyBSD is currently x86_64 only (i386 support removed a while back).
Related PR's:
ldc
dlang: