public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Building native Mingw32 tools
@ 1999-09-13  9:28 Michael K. Elwood
  1999-09-13 13:58 ` Mumit Khan
  1999-09-30 23:42 ` Michael K. Elwood
  0 siblings, 2 replies; 6+ messages in thread
From: Michael K. Elwood @ 1999-09-13  9:28 UTC (permalink / raw)
  To: cygwin

Mumit, I know you hate answering questions about this stuff. Maybe the
answer is quick and easy, or perhaps somebody else knows how to fix this.

I have been following the howto posted at
http://www.xraylith.wisc.edu/~khan/software/gnu-win32/mingw-cross-howto.txt
to attempt to build mingw32-hosted tools on a linux (Mandrake 6.0) box. I am
using the gcc 2.95 source, the 1999-07-31 runtime and your win32 patch for
gcc 2.95. The linux-x-mingw32 compiler built without a hitch and seems to
work very nicely. I then built binutils for a mingw32 host -- again no
problem.

But when I try to build the mingw32 hosted compiler using the linux-x-ming32
cross compiler, the build croaks when it tries to link collect2. It
complains that it can't find functions for certain system calls,
specifically pipe, kill and fork. I know that mingw32 doesn't implement all
POSIX system calls, but your howto seems to indicate that gcc should build
properly (i.e. that this should not be a problem). I searched your patch,
and collect2.c (where the calls are located) isn't touched.

Am I missing something here? Any help greatly appreciated. Please let me
know if you need more specification information about the configure, build,
etc.

Best regards,

MKE



--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

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

* Re: Building native Mingw32 tools
  1999-09-13  9:28 Building native Mingw32 tools Michael K. Elwood
@ 1999-09-13 13:58 ` Mumit Khan
  1999-09-14 13:21   ` Michael K. Elwood
  1999-09-30 23:42   ` Mumit Khan
  1999-09-30 23:42 ` Michael K. Elwood
  1 sibling, 2 replies; 6+ messages in thread
From: Mumit Khan @ 1999-09-13 13:58 UTC (permalink / raw)
  To: Michael K. Elwood; +Cc: cygwin

"Michael K. Elwood" <mkelwood@qsicorp.com> writes:
> Mumit, I know you hate answering questions about this stuff. Maybe the
> answer is quick and easy, or perhaps somebody else knows how to fix this.
> 
> I have been following the howto posted at
> http://www.xraylith.wisc.edu/~khan/software/gnu-win32/mingw-cross-howto.txt
> to attempt to build mingw32-hosted tools on a linux (Mandrake 6.0) box. I am
> using the gcc 2.95 source, the 1999-07-31 runtime and your win32 patch for
> gcc 2.95. The linux-x-mingw32 compiler built without a hitch and seems to
> work very nicely. I then built binutils for a mingw32 host -- again no
> problem.
> 
> But when I try to build the mingw32 hosted compiler using the linux-x-ming32
> cross compiler, the build croaks when it tries to link collect2. It
> complains that it can't find functions for certain system calls,
> specifically pipe, kill and fork. I know that mingw32 doesn't implement all
> POSIX system calls, but your howto seems to indicate that gcc should build
> properly (i.e. that this should not be a problem). I searched your patch,
> and collect2.c (where the calls are located) isn't touched.
> 
> Am I missing something here? Any help greatly appreciated. Please let me
> know if you need more specification information about the configure, build,
> etc.
> 

Something is fishy. The current sources will never build collect2 for Mingw 
hosted binaries simply because collect2 will never build.

Please send me the info on the configure lines you've used to build *both*
the cross-compiler and the canadian cross (ie., native by using cross)
compiler.

If you look inside <objdir>/gcc/Makefile (for the canadian cross), you
should see USE_COLLECT2 to be empty (as opposed to `collect2$(exeext)), 
which is overridden by t-mingw32 file.

I have a feeling your configure options may be incorrect when building the 
canadian cross compiler.

Regards,
Mumit


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

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

* Re: Building native Mingw32 tools
  1999-09-13 13:58 ` Mumit Khan
@ 1999-09-14 13:21   ` Michael K. Elwood
  1999-09-30 23:42     ` Michael K. Elwood
  1999-09-30 23:42   ` Mumit Khan
  1 sibling, 1 reply; 6+ messages in thread
From: Michael K. Elwood @ 1999-09-14 13:21 UTC (permalink / raw)
  To: cygwin cygwin

[Headers cleared to avoid clutter]

Mumit Khan wrote:
> Something is fishy. The current sources will never build collect2 for
Mingw
> hosted binaries simply because collect2 will never build.
>
> Please send me the info on the configure lines you've used to build *both*
> the cross-compiler and the canadian cross (ie., native by using cross)
> compiler.
>
> If you look inside <objdir>/gcc/Makefile (for the canadian cross), you
> should see USE_COLLECT2 to be empty (as opposed to `collect2$(exeext)),
> which is overridden by t-mingw32 file.
>
> I have a feeling your configure options may be incorrect when building the
> canadian cross compiler.

I have given some inaccurate information. (Allow me to pause and clear the
egg off of my face). Your answer has helped me figure out what is going on.

The compiler build that has given me trouble is actually for a
mingw32-hosted h8300-targeted cross compiler. Using your information, I just
edited the <objdir>/gcc/Makefile to empty the USE_COLLECT2 variable. Then
the build seemed to work fine.

Now I have a new problem. I packed up the installed compiler and moved it
over to WinNT to test it. I am using bash 2.02.1(2) and make 3.75 that are
distributed with Cygwin B20. When I try a simple build, CPP croaks. Here is
the output:

mike:/archive/dev/ucosbl$ make main.o
h8300-hms-gcc -Wa,-ahld -x
c -O2 -g -c -Wall -mh -malign-300 -funsigned-char -fs
hort-enums -Ic:/tools/h8newlib/include  -o OBJ/main.o SRC/main.c >
LST/main.lst
cpp.exe: Too many arguments
make: *** [OBJ/main.o] Error 1
mike:/archive/dev/ucosbl$

Also, another bit of weirdness that relates to a recent discussion on this
list: After the compiler was built, make install put a cpp.exe in
<installdir>/bin/ as well as in <installdir>/lib/gcc-lib/h8300-hms/2.95/ AND
__they are different executables__!! Here's the version output

mike:/tools/mingw32-x-h8300/lib/gcc-lib/h8300-hms/2.95$ cpp -v
Reading specs from
c:\tools\mingw32-x-h8300\bin\..\lib\gcc-lib\h8300-hms\2.95\specs gcc version
2.95 19990728 (release)
c:\tools\mingw32-x-h8300\bin\..\lib\gcc-lib\h8300-hms\2.95\cpp.exe -lang-c -
v -iprefix
c:\tools\mingw32-x-h8300\bin\..\lib/gcc-lib/h8300-hms\2.95\ -D__LONG_MAX
__=2147483647L -D__LONG_LONG_MAX__=2147483647L -D__LONG_MAX__=2147483647L -D
__LONG_LONG_MAX__=2147483647L -D__CHAR_UNSIGNED__ -D__H8300__ -D__SIZE_TYPE_
_=unsigned
int -D__PTRDIFF_TYPE__=int -Acpu(h8300) -Amachine(h8300) -D__INT_MAX__=32767
-
GNU CPP version 2.95 19990728 (release) (Hitachi H8/300)
#include "..." search starts here:
#include <...> search starts here:
 c:\tools\mingw32-x-h8300\bin\..\lib\gcc-lib\h8300-hms\2.95\include

c:\tools\mingw32-x-h8300\bin\..\lib\gcc-lib\h8300-hms\2.95\..\..\..\..\h8300
-hm
s\include
End of search list.
The following default directories have been omitted from the search path:

/tmp/gcc295-mingw32-x-h8300/lib/gcc-lib/h8300-hms/2.95/../../../../include/g
++-
3

/tmp/gcc295-mingw32-x-h8300/lib/gcc-lib/h8300-hms/2.95/../../../../h8300-hms
/sy
s-include
End of omitted list.
cpp.exe: int: No such file or directory

mike:/tools/mingw32-x-h8300/lib/gcc-lib/h8300-hms/2.95$ cd
/tools/mingw32-x-h8300/bin
mike:/tools/mingw32-x-h8300/bin$ cpp -v
Reading specs from
c:\tools\mingw32-x-h8300\bin\..\lib\gcc-lib\h8300-hms\2.95\sp
ecs
gcc version 2.95 19990728 (release)

c:\tools\mingw32-x-h8300\bin\..\lib\gcc-lib\h8300-hms\2.95\cpp.exe -lang-c -
v -iprefix
c:\tools\mingw32-x-h8300\bin\..\lib/gcc-lib/h8300-hms\2.95\ -D__LONG_MAX
__=2147483647L -D__LONG_LONG_MAX__=2147483647L -D__LONG_MAX__=2147483647L -D
__LONG_LONG_MAX__=2147483647L -D__CHAR_UNSIGNED__ -D__H8300__ -D__SIZE_TYPE_
_=unsigned
int -D__PTRDIFF_TYPE__=int -Acpu(h8300) -Amachine(h8300) -D__INT_MAX__=32767
-
GNU CPP version 2.95 19990728 (release) (Hitachi H8/300)
#include "..." search starts here:
#include <...> search starts here:
 c:\tools\mingw32-x-h8300\bin\..\lib\gcc-lib\h8300-hms\2.95\include

c:\tools\mingw32-x-h8300\bin\..\lib\gcc-lib\h8300-hms\2.95\..\..\..\..\h8300
-hms\include
End of search list.
The following default directories have been omitted from the search path:

/tmp/gcc295-mingw32-x-h8300/lib/gcc-lib/h8300-hms/2.95/../../../../include/g
++-3

/tmp/gcc295-mingw32-x-h8300/lib/gcc-lib/h8300-hms/2.95/../../../../h8300-hms
/sys-include
End of omitted list.
cpp.exe: int: No such file or directory
mike:/tools/mingw32-x-h8300/bin$

Any ideas what might be going on here? Thanks!

Best regards,

MKE



--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

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

* Re: Building native Mingw32 tools
  1999-09-14 13:21   ` Michael K. Elwood
@ 1999-09-30 23:42     ` Michael K. Elwood
  0 siblings, 0 replies; 6+ messages in thread
From: Michael K. Elwood @ 1999-09-30 23:42 UTC (permalink / raw)
  To: cygwin cygwin

[Headers cleared to avoid clutter]

Mumit Khan wrote:
> Something is fishy. The current sources will never build collect2 for
Mingw
> hosted binaries simply because collect2 will never build.
>
> Please send me the info on the configure lines you've used to build *both*
> the cross-compiler and the canadian cross (ie., native by using cross)
> compiler.
>
> If you look inside <objdir>/gcc/Makefile (for the canadian cross), you
> should see USE_COLLECT2 to be empty (as opposed to `collect2$(exeext)),
> which is overridden by t-mingw32 file.
>
> I have a feeling your configure options may be incorrect when building the
> canadian cross compiler.

I have given some inaccurate information. (Allow me to pause and clear the
egg off of my face). Your answer has helped me figure out what is going on.

The compiler build that has given me trouble is actually for a
mingw32-hosted h8300-targeted cross compiler. Using your information, I just
edited the <objdir>/gcc/Makefile to empty the USE_COLLECT2 variable. Then
the build seemed to work fine.

Now I have a new problem. I packed up the installed compiler and moved it
over to WinNT to test it. I am using bash 2.02.1(2) and make 3.75 that are
distributed with Cygwin B20. When I try a simple build, CPP croaks. Here is
the output:

mike:/archive/dev/ucosbl$ make main.o
h8300-hms-gcc -Wa,-ahld -x
c -O2 -g -c -Wall -mh -malign-300 -funsigned-char -fs
hort-enums -Ic:/tools/h8newlib/include  -o OBJ/main.o SRC/main.c >
LST/main.lst
cpp.exe: Too many arguments
make: *** [OBJ/main.o] Error 1
mike:/archive/dev/ucosbl$

Also, another bit of weirdness that relates to a recent discussion on this
list: After the compiler was built, make install put a cpp.exe in
<installdir>/bin/ as well as in <installdir>/lib/gcc-lib/h8300-hms/2.95/ AND
__they are different executables__!! Here's the version output

mike:/tools/mingw32-x-h8300/lib/gcc-lib/h8300-hms/2.95$ cpp -v
Reading specs from
c:\tools\mingw32-x-h8300\bin\..\lib\gcc-lib\h8300-hms\2.95\specs gcc version
2.95 19990728 (release)
c:\tools\mingw32-x-h8300\bin\..\lib\gcc-lib\h8300-hms\2.95\cpp.exe -lang-c -
v -iprefix
c:\tools\mingw32-x-h8300\bin\..\lib/gcc-lib/h8300-hms\2.95\ -D__LONG_MAX
__=2147483647L -D__LONG_LONG_MAX__=2147483647L -D__LONG_MAX__=2147483647L -D
__LONG_LONG_MAX__=2147483647L -D__CHAR_UNSIGNED__ -D__H8300__ -D__SIZE_TYPE_
_=unsigned
int -D__PTRDIFF_TYPE__=int -Acpu(h8300) -Amachine(h8300) -D__INT_MAX__=32767
-
GNU CPP version 2.95 19990728 (release) (Hitachi H8/300)
#include "..." search starts here:
#include <...> search starts here:
 c:\tools\mingw32-x-h8300\bin\..\lib\gcc-lib\h8300-hms\2.95\include

c:\tools\mingw32-x-h8300\bin\..\lib\gcc-lib\h8300-hms\2.95\..\..\..\..\h8300
-hm
s\include
End of search list.
The following default directories have been omitted from the search path:

/tmp/gcc295-mingw32-x-h8300/lib/gcc-lib/h8300-hms/2.95/../../../../include/g
++-
3

/tmp/gcc295-mingw32-x-h8300/lib/gcc-lib/h8300-hms/2.95/../../../../h8300-hms
/sy
s-include
End of omitted list.
cpp.exe: int: No such file or directory

mike:/tools/mingw32-x-h8300/lib/gcc-lib/h8300-hms/2.95$ cd
/tools/mingw32-x-h8300/bin
mike:/tools/mingw32-x-h8300/bin$ cpp -v
Reading specs from
c:\tools\mingw32-x-h8300\bin\..\lib\gcc-lib\h8300-hms\2.95\sp
ecs
gcc version 2.95 19990728 (release)

c:\tools\mingw32-x-h8300\bin\..\lib\gcc-lib\h8300-hms\2.95\cpp.exe -lang-c -
v -iprefix
c:\tools\mingw32-x-h8300\bin\..\lib/gcc-lib/h8300-hms\2.95\ -D__LONG_MAX
__=2147483647L -D__LONG_LONG_MAX__=2147483647L -D__LONG_MAX__=2147483647L -D
__LONG_LONG_MAX__=2147483647L -D__CHAR_UNSIGNED__ -D__H8300__ -D__SIZE_TYPE_
_=unsigned
int -D__PTRDIFF_TYPE__=int -Acpu(h8300) -Amachine(h8300) -D__INT_MAX__=32767
-
GNU CPP version 2.95 19990728 (release) (Hitachi H8/300)
#include "..." search starts here:
#include <...> search starts here:
 c:\tools\mingw32-x-h8300\bin\..\lib\gcc-lib\h8300-hms\2.95\include

c:\tools\mingw32-x-h8300\bin\..\lib\gcc-lib\h8300-hms\2.95\..\..\..\..\h8300
-hms\include
End of search list.
The following default directories have been omitted from the search path:

/tmp/gcc295-mingw32-x-h8300/lib/gcc-lib/h8300-hms/2.95/../../../../include/g
++-3

/tmp/gcc295-mingw32-x-h8300/lib/gcc-lib/h8300-hms/2.95/../../../../h8300-hms
/sys-include
End of omitted list.
cpp.exe: int: No such file or directory
mike:/tools/mingw32-x-h8300/bin$

Any ideas what might be going on here? Thanks!

Best regards,

MKE



--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

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

* Building native Mingw32 tools
  1999-09-13  9:28 Building native Mingw32 tools Michael K. Elwood
  1999-09-13 13:58 ` Mumit Khan
@ 1999-09-30 23:42 ` Michael K. Elwood
  1 sibling, 0 replies; 6+ messages in thread
From: Michael K. Elwood @ 1999-09-30 23:42 UTC (permalink / raw)
  To: cygwin

Mumit, I know you hate answering questions about this stuff. Maybe the
answer is quick and easy, or perhaps somebody else knows how to fix this.

I have been following the howto posted at
http://www.xraylith.wisc.edu/~khan/software/gnu-win32/mingw-cross-howto.txt
to attempt to build mingw32-hosted tools on a linux (Mandrake 6.0) box. I am
using the gcc 2.95 source, the 1999-07-31 runtime and your win32 patch for
gcc 2.95. The linux-x-mingw32 compiler built without a hitch and seems to
work very nicely. I then built binutils for a mingw32 host -- again no
problem.

But when I try to build the mingw32 hosted compiler using the linux-x-ming32
cross compiler, the build croaks when it tries to link collect2. It
complains that it can't find functions for certain system calls,
specifically pipe, kill and fork. I know that mingw32 doesn't implement all
POSIX system calls, but your howto seems to indicate that gcc should build
properly (i.e. that this should not be a problem). I searched your patch,
and collect2.c (where the calls are located) isn't touched.

Am I missing something here? Any help greatly appreciated. Please let me
know if you need more specification information about the configure, build,
etc.

Best regards,

MKE



--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

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

* Re: Building native Mingw32 tools
  1999-09-13 13:58 ` Mumit Khan
  1999-09-14 13:21   ` Michael K. Elwood
@ 1999-09-30 23:42   ` Mumit Khan
  1 sibling, 0 replies; 6+ messages in thread
From: Mumit Khan @ 1999-09-30 23:42 UTC (permalink / raw)
  To: Michael K. Elwood; +Cc: cygwin

"Michael K. Elwood" <mkelwood@qsicorp.com> writes:
> Mumit, I know you hate answering questions about this stuff. Maybe the
> answer is quick and easy, or perhaps somebody else knows how to fix this.
> 
> I have been following the howto posted at
> http://www.xraylith.wisc.edu/~khan/software/gnu-win32/mingw-cross-howto.txt
> to attempt to build mingw32-hosted tools on a linux (Mandrake 6.0) box. I am
> using the gcc 2.95 source, the 1999-07-31 runtime and your win32 patch for
> gcc 2.95. The linux-x-mingw32 compiler built without a hitch and seems to
> work very nicely. I then built binutils for a mingw32 host -- again no
> problem.
> 
> But when I try to build the mingw32 hosted compiler using the linux-x-ming32
> cross compiler, the build croaks when it tries to link collect2. It
> complains that it can't find functions for certain system calls,
> specifically pipe, kill and fork. I know that mingw32 doesn't implement all
> POSIX system calls, but your howto seems to indicate that gcc should build
> properly (i.e. that this should not be a problem). I searched your patch,
> and collect2.c (where the calls are located) isn't touched.
> 
> Am I missing something here? Any help greatly appreciated. Please let me
> know if you need more specification information about the configure, build,
> etc.
> 

Something is fishy. The current sources will never build collect2 for Mingw 
hosted binaries simply because collect2 will never build.

Please send me the info on the configure lines you've used to build *both*
the cross-compiler and the canadian cross (ie., native by using cross)
compiler.

If you look inside <objdir>/gcc/Makefile (for the canadian cross), you
should see USE_COLLECT2 to be empty (as opposed to `collect2$(exeext)), 
which is overridden by t-mingw32 file.

I have a feeling your configure options may be incorrect when building the 
canadian cross compiler.

Regards,
Mumit


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

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

end of thread, other threads:[~1999-09-30 23:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-09-13  9:28 Building native Mingw32 tools Michael K. Elwood
1999-09-13 13:58 ` Mumit Khan
1999-09-14 13:21   ` Michael K. Elwood
1999-09-30 23:42     ` Michael K. Elwood
1999-09-30 23:42   ` Mumit Khan
1999-09-30 23:42 ` Michael K. Elwood

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).