public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Re: Building mingw32-x-h8300 tools
@ 1999-09-16 19:52 Earnie Boyd
  1999-09-30 23:42 ` Earnie Boyd
  0 siblings, 1 reply; 4+ messages in thread
From: Earnie Boyd @ 1999-09-16 19:52 UTC (permalink / raw)
  To: Michael K. Elwood

--- "Michael K. Elwood" <mkelwood@qsicorp.com> wrote:
> Well, since nobody wanted to solve my problem for me, I had to go solve it
> myself. But the problem (and solution) may be interesting to people trying
> to build mingw32-hosted cross tools, or to mingw32 people in general.
-8<-
> lib/gcc-lib/h8300-hms/2.95/ directory) contains some cpp arguments like
> 
> -D__SIZE_TYPE__=unsigned\ int
> 
> cpp hates that space in the value, so you really need double quotes around
> the "unsigned\ int" part. So I fixed the specs file by surrounding these
> values with double quotes. Everything seemed great...only it didn't fix the
> problem. Back to GDB.

I wonder if you'd used -D__SIZE_TYPE__=unsigned^ int if it would have worked. 
It has to do with M$ character quoting and the \ character only character
quotes the " character and the \ character.  To quote anything else you need to
use the ^ character.

> 
> When gcc goes to spawn cpp, it calls pexecute() in libiberty, which in turn
> calls the Win32 _spawnv or _spawnvp function. Just before it does this, the
> mingw32 pexecute() calls fix_argv(), which scans every string in the argv
> array and escapes any double quotes with a preceding \. Instead of helping,
> though, this just confused cpp. So i took out the call to fix_argv().
> Presto! Everything worked. :)
> 

Hey, it feels good to have done a splendid job.

> I now have a working mingw32-hosted h8300-targeted GNU cross compiler
> (version 2.95). Many thanks to Mumit Khan and others who have helped along
> the way. I can provide a patch for the changed files if anybody is
> interested.
> 
> Now a question: Is fix_argv() still necessary? It seems to be causing more
> harm than good.
> 

I don't know the answer.
===
Earnie Boyd < mailto:earnie_boyd@yahoo.com >

Newbies, please visit
< http://www.freeyellow.com/members5/gw32/index.html >

(If you respond to the list, then please don't cc me)
__________________________________________________
Do You Yahoo!?
Bid and sell for free at http://auctions.yahoo.com

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

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

* Re: Building mingw32-x-h8300 tools
  1999-09-16 19:52 Building mingw32-x-h8300 tools Earnie Boyd
@ 1999-09-30 23:42 ` Earnie Boyd
  0 siblings, 0 replies; 4+ messages in thread
From: Earnie Boyd @ 1999-09-30 23:42 UTC (permalink / raw)
  To: Michael K. Elwood, cygwin cygwin, crossgcc

--- "Michael K. Elwood" <mkelwood@qsicorp.com> wrote:
> Well, since nobody wanted to solve my problem for me, I had to go solve it
> myself. But the problem (and solution) may be interesting to people trying
> to build mingw32-hosted cross tools, or to mingw32 people in general.
-8<-
> lib/gcc-lib/h8300-hms/2.95/ directory) contains some cpp arguments like
> 
> -D__SIZE_TYPE__=unsigned\ int
> 
> cpp hates that space in the value, so you really need double quotes around
> the "unsigned\ int" part. So I fixed the specs file by surrounding these
> values with double quotes. Everything seemed great...only it didn't fix the
> problem. Back to GDB.

I wonder if you'd used -D__SIZE_TYPE__=unsigned^ int if it would have worked. 
It has to do with M$ character quoting and the \ character only character
quotes the " character and the \ character.  To quote anything else you need to
use the ^ character.

> 
> When gcc goes to spawn cpp, it calls pexecute() in libiberty, which in turn
> calls the Win32 _spawnv or _spawnvp function. Just before it does this, the
> mingw32 pexecute() calls fix_argv(), which scans every string in the argv
> array and escapes any double quotes with a preceding \. Instead of helping,
> though, this just confused cpp. So i took out the call to fix_argv().
> Presto! Everything worked. :)
> 

Hey, it feels good to have done a splendid job.

> I now have a working mingw32-hosted h8300-targeted GNU cross compiler
> (version 2.95). Many thanks to Mumit Khan and others who have helped along
> the way. I can provide a patch for the changed files if anybody is
> interested.
> 
> Now a question: Is fix_argv() still necessary? It seems to be causing more
> harm than good.
> 

I don't know the answer.
===
Earnie Boyd < mailto:earnie_boyd@yahoo.com >

Newbies, please visit
< http://www.freeyellow.com/members5/gw32/index.html >

(If you respond to the list, then please don't cc me)
__________________________________________________
Do You Yahoo!?
Bid and sell for free at http://auctions.yahoo.com

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

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

* Building mingw32-x-h8300 tools
  1999-09-16 16:14 Michael K. Elwood
@ 1999-09-30 23:42 ` Michael K. Elwood
  0 siblings, 0 replies; 4+ messages in thread
From: Michael K. Elwood @ 1999-09-30 23:42 UTC (permalink / raw)
  To: cygwin cygwin, crossgcc

Well, since nobody wanted to solve my problem for me, I had to go solve it
myself. But the problem (and solution) may be interesting to people trying
to build mingw32-hosted cross tools, or to mingw32 people in general.

To recap, after Mumit pointed out that collect2 should never get built when
compiling mingw32-hosted tools, I justed edited the makefile in the gcc
directory to empty the USE_COLLECT2 variable. The tools then built without
complaint. I installed the compiler on my WinNT partition and fired it up
with some simple code (known be build properly). CPP.EXE kept puking with
the message "Too many arguments".

If all else fails...try GDB, right?

It turns out that the specs file for the h8300 target (which, as of GCC
2.95, apparently lives outside the compiler in the
lib/gcc-lib/h8300-hms/2.95/ directory) contains some cpp arguments like

-D__SIZE_TYPE__=unsigned\ int

cpp hates that space in the value, so you really need double quotes around
the "unsigned\ int" part. So I fixed the specs file by surrounding these
values with double quotes. Everything seemed great...only it didn't fix the
problem. Back to GDB.

When gcc goes to spawn cpp, it calls pexecute() in libiberty, which in turn
calls the Win32 _spawnv or _spawnvp function. Just before it does this, the
mingw32 pexecute() calls fix_argv(), which scans every string in the argv
array and escapes any double quotes with a preceding \. Instead of helping,
though, this just confused cpp. So i took out the call to fix_argv().
Presto! Everything worked. :)

I now have a working mingw32-hosted h8300-targeted GNU cross compiler
(version 2.95). Many thanks to Mumit Khan and others who have helped along
the way. I can provide a patch for the changed files if anybody is
interested.

Now a question: Is fix_argv() still necessary? It seems to be causing more
harm than good.

Best regards,

MKE


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

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

* Building mingw32-x-h8300 tools
@ 1999-09-16 16:14 Michael K. Elwood
  1999-09-30 23:42 ` Michael K. Elwood
  0 siblings, 1 reply; 4+ messages in thread
From: Michael K. Elwood @ 1999-09-16 16:14 UTC (permalink / raw)
  To: cygwin cygwin

Well, since nobody wanted to solve my problem for me, I had to go solve it
myself. But the problem (and solution) may be interesting to people trying
to build mingw32-hosted cross tools, or to mingw32 people in general.

To recap, after Mumit pointed out that collect2 should never get built when
compiling mingw32-hosted tools, I justed edited the makefile in the gcc
directory to empty the USE_COLLECT2 variable. The tools then built without
complaint. I installed the compiler on my WinNT partition and fired it up
with some simple code (known be build properly). CPP.EXE kept puking with
the message "Too many arguments".

If all else fails...try GDB, right?

It turns out that the specs file for the h8300 target (which, as of GCC
2.95, apparently lives outside the compiler in the
lib/gcc-lib/h8300-hms/2.95/ directory) contains some cpp arguments like

-D__SIZE_TYPE__=unsigned\ int

cpp hates that space in the value, so you really need double quotes around
the "unsigned\ int" part. So I fixed the specs file by surrounding these
values with double quotes. Everything seemed great...only it didn't fix the
problem. Back to GDB.

When gcc goes to spawn cpp, it calls pexecute() in libiberty, which in turn
calls the Win32 _spawnv or _spawnvp function. Just before it does this, the
mingw32 pexecute() calls fix_argv(), which scans every string in the argv
array and escapes any double quotes with a preceding \. Instead of helping,
though, this just confused cpp. So i took out the call to fix_argv().
Presto! Everything worked. :)

I now have a working mingw32-hosted h8300-targeted GNU cross compiler
(version 2.95). Many thanks to Mumit Khan and others who have helped along
the way. I can provide a patch for the changed files if anybody is
interested.

Now a question: Is fix_argv() still necessary? It seems to be causing more
harm than good.

Best regards,

MKE


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

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

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

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-09-16 19:52 Building mingw32-x-h8300 tools Earnie Boyd
1999-09-30 23:42 ` Earnie Boyd
  -- strict thread matches above, loose matches on Subject: below --
1999-09-16 16:14 Michael K. Elwood
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).