Re: GCC 3.4.4 for MSYS

Charles Wilson <[email protected]>
Newsgroups gmane.comp.gnu.mingw.msys
Message-ID <[email protected]>
Cesar Strauss wrote:
> Yes, I also succeeded to build GCC 3.4.4 for MSYS (C and C++), by using 
> the Cygwin patches found on the Cygwin source package for GCC 3.4.4. I 
> also took the chance to update binutils as well.
> 
> Lately, I am focusing on creating suitable source packages (original 
> sources + cygwin patches + msys patches + build script). I plan to offer 
> them as an optional add-ons to the msysDVLPR environment.
> 
> The compiler is able to bootstrap itself, so there is a good chance it 
> is really fully functional.

Good news!

>> GCC 3.2.3 on Phoenix' website works quite nicely as I've managed
>> to build a working MSYS dll with it.
> 
> This, I wasn't able to do. With my self-built GCC 3.4.4, the dll is 
> built, but existing MSYS applications just exit immediately when run. I 
> will try your suggestion of using the GCC 3.2.3 on Phoenix site.

Actually, this doesn't surprise me.  There was a large ABI change
between gcc 2.95.3 and gcc-3.0, and another between at least one of the
gcc-3.x / gcc-3.x+1 transitions.  Although cygwin/msys has a strictly
C-style ABI, it IS written in C++, and is linked against libgcc.a (EH is
disabled, so none of the EH personality stuff is ever pulled in, when
built with modern g++ -- but I'm not sure that old obsolete gcc was that
smart).

I'm more surprised that Teemu's gcc-3.2-built msys WAS usuable by
gcc-2.95-built client apps, than I am that your gcc-3.4-built msys was
NOT usable.

This is part of what I meant when I said that I believed the whole msys
schmeil would need to be bootstrapped using the new compiler -- a
non-trivial undertaking.  Basically, you build
  msys-gcc (against CURR-MSYS)
  msys-binutils (ditto)
then, build MSYS. Install into /tmp/staging, but go ahead and copy all
the /tmp/staging/include/ and /tmp/staging/lib/ files into /[include|lib]/.

Then, start compiling all your client packages (coreutils, bash, etc) --
always installing into /tmp/staging/, but copying any headers/libs back
to /[include|lib]/

Eventually, /tmp/staging/* will have a complete-enough installation that
 you might be able to test THOSE apps in /tmp/staging/bin/, and the
"new" msys-1.0.dll in /tmp/staging/bin/, by running them directly from a
CMD box (without CURR-MSYS-BASH running!!)

Then, I'd three-card monty my installation directories:

  C:\msys\1.0\tmp\staging C:\msys-new
  C:\msys -> C:\msys-old
  C:\msys-new C:\msys

And THEN, rebuild gcc AGAIN (so this time, it links against MSYS-NEW),
and repeat the whole exercise (but this time, no need to futz with
/tmp/staging/).

Yep, a WHOLE lotta work...

--
Chuck





------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.