Some portability issues

Kean Johnston kean at armory.com
Wed Oct 11 07:26:39 PDT 2006


All,

I am freshening the SCO port for Xorg (making my first attempt at
getting the modular X working) and I have run into a few issues.
Note, however, that few of these are SCO-specific, these seem to
be general porting issues.

The first issue seems to be a remnant of the old Imake world.
Excluding files found in xorg-cf-files, a casual grep through
the sources reveal 204 files that sill use SVR4 or SYSV as
conditionals. That figure has a bit of noise in it, as my tree
I am building includes xterm, which includes 13 files thus
affected. The way I see it, there are two ways to fix this.
The first would be to add a new standard XORG configure macro
for system-specific defines. This may also make it easier to
revive other platform ports. Something along the lines of
XORG_PLATFORM_DEFINES as a macro, which can be added to the
configure scripts, and which will add platform specific flags
to CFLAGS. I can see problems with this approach though,
unless we also provide some suitable .pc file that can produce
those same flags for other applications to use, as they are needed
for ALL compiles (because some of the files that contain these
conditionals are in proto). I believe that the better approach
would be to eradicate from all the sources such conditionals,
or possibly set them in Xos.h or Xosdefs.h (which of the two
would be the most appropriate?).

A second issue is a minor nit, but it can be disastrous too.
I am building from the tarballs in individual/, because I wanted
a stable platform (not top of tree which may be broken for other
reasons not relating to the port). I have encountered a few
tarballs which include pre-generated header files based on a
.in file. As an example, in the xserver tarball, there is an
include/dix-config.h file, which shouldn't be there, as it is
supposed to be generated from dix-config.h.in. I will provide
a list of all such cases, when I am done. Note that this only
appears as a problem when you are compiling with builddir != srcdir.

A third issue I found when building the xserver was in the
building of hw/xfree86/xf1bpp. Makefile.am uses a gcc-specific
option (-include mfbmap.h). This is highly non-portable. Even
if the decision was to only ever support gcc, at the very least
that needs to change to -include $(srcdir)/mfbmap.h so that
you can build outside of the source tree, but I don't think that
GCC is the only supported compiler is it?

I'm very close to getting all of these resolved (except for the
first issue, which I would like guidance on) and would like to try
and get patches in for the upcoming 7.2 release. Have I missed the
boat on that? If so its no big deal, but it sure would be nice.

TIA.
Kean
-- 
"Your self-crippling is your own business just as your limitations
  are society’s burden" -- Dan Simmons



More information about the xorg mailing list