public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: [RFA]: contrib/i386/cygwin.h
  2001-11-13 15:03 [RFA]: contrib/i386/cygwin.h Corinna Vinschen
@ 2001-11-13 15:03 ` Christopher Faylor
  0 siblings, 0 replies; 2+ messages in thread
From: Christopher Faylor @ 2001-11-13 15:03 UTC (permalink / raw)
  To: Corinna Vinschen; +Cc: gcc-patches

On Sat, Nov 17, 2001 at 06:06:06PM +0100, Corinna Vinschen wrote:
>Hi,
>
>I would like to propose the following patch to config/i386/cygwin.h.
>[snip]

No need for a long explanation.  The majority of the patch came from
me and since I'm the maintainer, I'll check it in.

I was just waiting for feedback that it worked correctly.  I see that
you added some required bits to my original patch, so I've put both
of our names on the ChangeLog.

cgf

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [RFA]: contrib/i386/cygwin.h
@ 2001-11-13 15:03 Corinna Vinschen
  2001-11-13 15:03 ` Christopher Faylor
  0 siblings, 1 reply; 2+ messages in thread
From: Corinna Vinschen @ 2001-11-13 15:03 UTC (permalink / raw)
  To: gcc-patches

Hi,

I would like to propose the following patch to config/i386/cygwin.h.

The reason for that patch is that when building a native Cygwin
toolchain which should install into a non-standard location (say,
/usr/local/...) the include and library paths for the w32api headers
and libs are unfortunately only set to the standard paths as
/usr/include/w32api and /usr/lib/w32api.  That's obviously not correct
when installing into some other location since that's mostly done to
not collide with the standard toolchain installation. 

For that reason, the patch adds the location of the installed w32api
paths even if not build as cross compiler.

Testing the installation requires to invalidate the system standard
include and lib paths (renaming).  After installing a natively build
toolchain including gcc into a non-standard location calling a
following `configure' fails with the error message

  <non-standard-path>/ld: cannot find -luser32
  collect2: ld returned 1 exit status
  *** The command 'gcc -o conftest -g   conftest.c' failed.
  *** You must set the environment variable CC to a working compiler.

if the below patch hasn't been applied.  The reason is that the Win32
link libraries aren't in the standard path which is only available.
Applying the below patch before building and installing the toolchain
results in a working configuration.

Please keep me Cc'd since I'm not subscribed.

Thanks,
Corinna

2001-11-17  Corinna Vinschen  <vinschen@redhat.com>

	* config/i386/cygwin.h: Change standard include and link path lists
	to contain the install path even if not build as cross comiler.

Index: config/i386/cygwin.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/cygwin.h,v
retrieving revision 1.57
diff -u -p -r1.57 cygwin.h
--- cygwin.h	2001/10/31 14:32:27	1.57
+++ cygwin.h	2001/11/17 17:04:15
@@ -78,8 +78,10 @@ Boston, MA 02111-1307, USA.  */
 #define CYGWIN_INCLUDES "%{!nostdinc:-isystem /usr/local/include "\
 		           "-idirafter " CYGWIN_CROSS_DIR "/include "\
 		           "-idirafter /usr/include}"
-#define W32API_INC "%{!nostdinc:-idirafter /usr/include/w32api}"
-#define W32API_LIB "-L/usr/lib/w32api/"
+#define W32API_INC "%{!nostdinc:"\
+		   "-idirafter " CYGWIN_CROSS_DIR "/include/w32api "\
+		   "-idirafter /usr/include/w32api}"
+#define W32API_LIB "-L" CYGWIN_CROSS_DIR "/lib/w32api/ -L/usr/lib/w32api/"
 #define CYGWIN_LIB "/usr/lib"
 #define MINGW_LIBS "-L/usr/local/lib/mingw -L/usr/lib/mingw"
 #define MINGW_INCLUDES "%{!nostdinc:-isystem /usr/include/mingw/g++-3 "\

-- 
Corinna Vinschen
Cygwin Developer
Red Hat, Inc.
mailto:vinschen@redhat.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-11-17 17:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-13 15:03 [RFA]: contrib/i386/cygwin.h Corinna Vinschen
2001-11-13 15:03 ` Christopher Faylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).