DescriptionRefs #10260 OpenBSD support #25327
This branch adds support for the OpenBSD platform form issue #10260
For current status update please see:
https://github.com/dart-lang/sdk/issues/10260#issuecomment-168332554
At the time of opening this pull request:
- the runtime can be built
- the sdk can be built
- 3780 passed; 5 failed; - see #10260 for details.
- ongoing work to build the 'all' target
Full test run:
- 13514 passed; 71 failed
- SDK path failures are related to a still not implemented workaround for procfs
All tests & porting done on OpenBSD -current snapshot from Dec 19th 2015 amd64
---- changelog follows ----
Merge branch 'OpenBSD-support' into upstream-OpenBSD-support
Linter changes
Merge branch 'OpenBSD-support' into upstream-OpenBSD-support
More linter changes
Merge branch 'OpenBSD-support' into upstream-OpenBSD-support
Make the linter happy
Merge branch 'OpenBSD-support' into upstream-OpenBSD-support
Merge branch 'master' of https://github.com/dart-lang/sdk into OpenBSD-support
Include pthreads in the linking phase
Use Directory::SystemTemp from Linux instead of android hard coded path
Implement cpuinfo for OpenBSD using cpuid path from linux
Add OpenBSD to CheckedInSdkPath
This is used during the build for observatory_tool.py it will attempt
to download an SDK from google but there's none yet for OpenBSD.
This allows the build moving forward with a warning being printed that
this system can't run the SDK and that debug builds will be slow with
the bootstrap dart.
Assuming that upstream will pick up the port this should not be the case
in the future.
Enable building boringssl for OpenBSD using the linux sources
Add stdio_openbsd.cc based on stdio_android.cc
Implement a stub file system watcher for OpenBSD
There is no inotify like API available on OpenBSD
Follow upstream and add Utils::StrError based on Android implementation
Follow upstream extensions_openbsd changes
Follow upstream os_openbsd changes
Follow upstream by adding Platform::Exit for OpenBSD
Follow upstream refactorings
- using Utils::StrError
- renaming GetCurrentTimeMilliseconds -> GetCurrentMonotonicMillis etc.
Adjust to upstream os_thread & thread_interrupter changes
Merge branch 'master' into OpenBSD-support
Merge branch 'master' into OpenBSD-support
Add runtime/vm/native_symbol_openbsd.cc based on android
Add runtime/bin/utils_openbsd.cc based on android
Fix typo
Fix ifdef guard
Add runtime/vm/signal_handler_openbsd.cc based on linux
Use mcontext.sc_eip/rip etc instead of gregs
Add runtime/vm/virtual_memory_openbsd.cc based on android
Handle obtaining mcontext_t in thread_interrupter
Add runtime/vm/thread_interrupter_openbsd.cc based on linux
Add runtime/bin/fdutils_openbsd.cc based on fdutils_linux.cc
Implement debuginfo & gdbjit based on linux
Change if guardst
Add runtime/bin/process_openbsd.cc based on process_android.cc
Mark whole cpuinfo_openbsd.cc as UNIMPLEMENTED();
Add runtime/vm/cpuinfo_openbsd.cc based on cpuinfo_linux.cc
Add runtime/bin/extensions_openbsd.cc based on extensions_linux.cc
Add crypto_openbsd.cc and mark a FIXME for getentropy(2)
Include platform_openbsd.cc in build files
Handle environ for OpenBSD, add FIXME for procfs & minor tweaks
execve(2) makes environ available when a process begins
the handling matches what process_android does.
Add runtime/bin/platform_openbsd.cc based on platform_linux.cc
Proper OS::Name() & if preprocessor guard
Switch to posix_memalign & use getthrid() instead of a syscall
Add runtime/vm/os_openbsd.cc based on os_linux.cc
Reinterpret cast on ThreadIdFromIntPtr
Include os_thread_openbsd.{h,cc} in the build
Add runtime/bin/log_openbsd.cc based on log_linux.cc
Fix conditional include copy pasta
OpenBDS does have mkdtemp so drop the helper function
Add missing include for sys/socket.h
Add runtime/bin/file_openbsd.cc based on android
Add runtime/bin/directory_openbsd.cc based on android
More gypi sources to update
Add runtime/dart-runtime.gyp for openbsd based on linux
Drop -lrt & -ldl for OpenBSD in vm.gypi
Add OpenBSD to vm.gypi
Add runtime/bin/eventhandler_openbsd.{h,cc} based on macos for kqueue
Add runtime/bin/socket_openbsd.{h,cc} based on macos
Add runtime/bin/dbg_connection.{h,cc} based on macos for kqueue
Account for thread API differences between Android & OpenBSD
Add runtime/bin/thread_openbsd.cc based on thread_android.cc
Add runtime/bin/thread_openbsd.h based on thread_android.h
Merge branch 'master' into OpenBSD-support
Handle ucontext.h in signal_handler.h
Add runtime/vm/atomic.h & atomic_openbsd.h
Based on atomic_linux.h
Add platform/utils_openbsd.cc based on utils_linux.cc
Add os_thread for OpenBSD based on Android
Fix case for the OpenBSD platform
Define OpenBSD target OS in runtime/platform/globals.h
Make the build tool recognize OpenBSD
We use `gmake` like FreeBSD to use the GNU Make
Add configurations_openbsd.gypi
With this step we can generate Makefiles from a fresh gclient sync call:
/usr/local/bin/python sdk/tools/gyp_dart.py
The file is a 1:1 copy of configurations_make.gypi which contained
Linux only targets but previous attempts at porting the software to
OpenBSD have shown that one can get really far with that setup using
those defaults.
Add OpenBSD as a dart target os
This opens up a can of worms of course but let's do things properly
and one small step at a time.
This change impacts:
/usr/local/bin/python sdk/tools/gyp_dart.py
which is automatically called by gclient sync and now will faile with
missing configuration targets for Dart_OpenBSD_Base. Without the change
the error would just slap you with a generic unsupported os message.
One can of course set the target os to Linux which would get you much
further along with far less effort but that's a bit ugly solution.
BUG=
Patch Set 1 #
Total comments: 21
Patch Set 2 : Address code review comments #Patch Set 3 : Replace // FIXME with // TODO(mulander) #
Total comments: 25
Patch Set 4 : Address code review issues #
Messages
Total messages: 9 (1 generated)
|