Fix for XFree86

Takayuki Tamura ttamura@icc.melco.co.jp
Thu Jun 3 06:01:00 GMT 1999


Hi, Suhaib.

First of all, thanks to your great job!

I found and fixed three problems in your XFree86 port, including
'gcc -E -' hang.
(I use xfree86-3331.tar.gz single tarball and cf.tar.gz as of May 27.)

Though I finally encountered
'Full build of Release 6.3(4?) of the X Window System complete.'
message, I'm still with many errors.

Anyway, here is the description, followed by the patch attached.

(1) 'gcc -E -' problem

In cygwin.cf, we have,

  #define CcCmd  gcc
  #define CppCmd CcCmd -E -

However, 'gcc -E' isn't fully compatible with direct invocation of cpp.

	Value of CPP:	/lib/cpp   'gcc -E'   'gcc -E -'
	$(CPP) < file:     OK         NG          OK
	$(CPP) file:       OK         OK          NG

Unfortunately, the latter style was used in CPPOnlyAsm macro, which is
defined in xf86.rules.
So, we need to override this in cygwin.rules.


(2) xc/exports/bin/*.exe must run without preinstalled X

When building in program/xkbcomp/SUBDIR, xkbcomp in xc/exports/bin is run.
However, if you don't have preexisting X environment, it fails with
'missing libX11.dll'.
We need *.dll in xc/exports/bin for cleaner compilation.

In addition, we have to avoid symlinking .exe and .dll under xc/exports/bin,
because Win32 can't handle symlinks.

I added LinkBuildDLL and LinkBuildBinary in cygwin.rules.


(3) StdIncDir and PostIncDir settings

In cygwin.cf, you have,

  #define StdIncDir `CcCmd --print-libgcc-file-name | sed ':libgcc.a:../../../../i586-cygwin32/include:/cygnus/cygwin-b20/local/include:/cygnus/cygwin-b20/include:/cygnus/cygwin-b20/H-i586-cygwin32/i586-cygwin32/include:'|sed 's,\\\\,/,g'`
  #define PostIncDir `CcCmd --print-libgcc-file-name | sed ':libgcc.a:/include:'|sed 's,\\\\,/,g'`

But I can't understand the above sed command.
Doesn't this suffice?

  #define StdIncDir `CcCmd --print-libgcc-file-name | sed 's,\\\\,/,g' | sed 's,libgcc.a,../../../../i586-cygwin32/include,'`
  #define PostIncDir `CcCmd --print-libgcc-file-name | sed 's,\\\\,/,g' | sed 's,libgcc.a,include,'`


I hope it helps.

Regards,
---------------
Takayuki TAMURA (ttathome@remus.dti.ne.jp)


More information about the Cygwin-xfree mailing list