Discussion:
announce: "ReactOW" project: attempt to build ReactOS with OW
(too old to reply)
Jens Staal
2014-02-25 08:52:18 UTC
Permalink
Dear all,
I hope these things are stuff that interests readers of the "users" group.

*Background:*
As an experiment I have been trying to add Open Watcom as a 3rd compiler
option (next to MinGW and VS) for building ReactOS (an open source clone of
Windows). The build system is CMake-based and I noticed that CMake running
on Linux (my OS) could not generate Wmake files, so using OW natively on a
Linux host cross-compiling for NT is still a work-in progress (using unix
makefiles). I have no idea if the upstream would be interested in a 3rd
option, but having the proof-of-concept port would at least be cool and it
is a learning experience :)

Initially, I started experimenting on the build using OW (the v2 fork, but
the official 1.9 might also work) and CMake under Wine. This works, but
CMake sometimes confuses path names under Wine (uses / instead of expected
\). Now I have XP running in a VM to do most of the experiments.

The ammount of "play time" that I got is usually very limited (about half an
hour early in the morning before the kids wake up) so I am trying to aim at
low hanging fruits first in the porting effort, which is why I went public
with this thing before it is finished because some of the problems are not
easy to figure out in a short time (see the GNU inline ASM issues below).

*Dependencies:*
- an SVN client (for some reason CMake looks for one during configuration)
- MinGW binutils (to use the "windmc" message compiler - I am currently
trying to make a stand-alone message compiler to avoid the need to install
all of binutils: https://github.com/staalmannen/owmc )
Make sure that binutils is in your PATH

*Status:*

The currently patched variant can be found here:
https://github.com/staalmannen/reactos/tree/reactow

the multiple commits were mostly to fix errors that occured during patching
from my local variant of the ReactOS sources to the more recent git clone of
the SVN repository.

to configure/build (on Windows):
make a build directory (reactow-build) next to the checked out sources
(reactos)
cd to build directory
: ..\reactos\configure.cmd
cd host-tools
wmake
cd ..\reactos
wmake

Right now I am stuck on the "intrin.h" compatibility header (implementing
VS-style intrinsics). I have been trying to copy/modify the GCC header for
Watcom, but it is heavily dependent on inline ASM which is quite tricky to
understand.

here is the original GCC-variant for x86
https://github.com/staalmannen/reactos/blob/reactow/include/crt/mingw32/intrin_x86.h

... and my current attempt to convert to Watcom-style (incomplete and poor)
https://github.com/staalmannen/reactos/blob/reactow/include/crt/watcom/intrin_x86.h

So if someone got experience with inline ASM and understand the very cryptic
GCC-style inline ASMs used in the header above, it would be awesome with
some help getting this translated to Watcom-style...
Jens Staal
2014-02-28 08:20:09 UTC
Permalink
Post by Jens Staal
So if someone got experience with inline ASM and understand the very
cryptic GCC-style inline ASMs used in the header above, it would be
awesome with some help getting this translated to Watcom-style...
Thanks to Jiri Malak's great contribution I have managed to get past this
issue and I now have more "normal" issues that I can handle.

*TODOs*
- get ReactOS to build (or send a new message here next time I hit an
obstacle beyond my ability :) )
- try to get cross-compiling on Linux to work (seems to be a CMake
limitaion - but might just as well just be me not understanding it good
enough)
- publish a bootable live image ("images or it did not happen")
- update patches to latest SVN and send to upstream project (hopefully they
will be interested). Using git, keeping the patch/diff up-to-date is easy.
Loading...