delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/07/22/11:01:02

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
Message-ID: <379731AB.3E30847A@acm.org>
Date: Thu, 22 Jul 1999 10:58:51 -0400
From: "D. Richard Hipp" <drh AT acm DOT org>
Organization: Hwaci
X-Mailer: Mozilla 3.0Gold (X11; U; Linux 2.0.36 i686)
MIME-Version: 1.0
To: cygwin AT sourceware DOT cygnus DOT com
Subject: Patch to build cross compiler: RedHat6.0 -> Cygwin20.1

I've been working on getting Cygwin20.1 to build as a cross-compiler
on a new RedHat 6.0 server.  I had two problems, one of which
involved a patch to the source tree.  I'm posted the patch here
on the off chance that someone might be interested.

The problem is in the file src/make/arscan.c.  It appears that
in RedHat 6.0 the strncmp() function is really a macro, and that
preprocessor directives like "#if" are no allowed within the
arguments to a macro.  Hence:

--------------- BEGIN PATCH ------------------
*** arscan.c    Thu Jul 22 10:05:37 1999
--- arscan.c.orig       Thu Jul 22 10:05:21 1999
***************
*** 434,446 ****
        abort ();
  #else
        struct ar_hdr hdr;
!       int n;
  #if !defined (__hpux) && !defined (cray)
!       n = 1;
  #else
!       n = 2;
  #endif /* !__hpux && !cray */
!       return !strncmp (name, mem, sizeof (hdr.ar_name) - n);
  #endif
      }
  
--- 434,447 ----
        abort ();
  #else
        struct ar_hdr hdr;
!       return !strncmp (name, mem,
!                      sizeof (hdr.ar_name) - 
  #if !defined (__hpux) && !defined (cray)
!                      1
  #else
!                      2
  #endif /* !__hpux && !cray */
!                      );
  #endif
      }
----------------- END PATCH ------------------

The other problem I had was that the cross-compiler will not
build if "." is anywhere on your PATH environment variable.
If "." is on your path, then target tools sometimes get used
in place of host tools.

I'm not a subscriber to this group.  Please let me know if
I have posted this bug report to the wrong place.

-- 
D. Richard Hipp -- drh AT acm DOT org -- http://www.hwaci.com/drh/

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019