Problems building gcc cross-compiler under MSYS.

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Problems building gcc cross-compiler under MSYS.

Chris Johns-6
Hello,

I have been building a NIOS2 cross-compiler for RTEMS under MSYS.
Normally I build MinGW cross-compilers using the Canadian cross method
on Linux how-ever this time around I wanted to build under MSYS. I have
discovered a couple of problems.

The NIOS2 GCC is based on GCC 4.1 which is a little older than the
versions have today how-ever I think the issues I have found would
effect builds with current GCC versions.

I am using a fully updated MinGW/MSYS install via the mingw-get tool.

The first issue I get is the "Couldn't commit memory for cygwin heap"
error. This is with the msysCORE-1.0.17-1 package and I think msysinfo
said it was 1.0.18 with a build date of 2011-04-24. A net search turned
up this page http://notabs.org/coreboot/windows-build.htm. Check down
the page under "04/01/2011 win-build-env-005.7z" for the comment about
having fixed the issue. I downloaded and installed DLL from it and did
not get the error. The msysinfo package says it is a 1.0.16 version DLL.
Is this fix know about ?

The second issue relates to the GCC config-ml.in file in GCC. The file
is
http://gcc.gnu.org/viewcvs/trunk/config-ml.in?revision=171302&view=markup.
Scroll to the end of the file to line 861. This eval line does not work.
The code is:

     if eval ${ml_config_env} ${ml_config_shell} ${ml_recprog} \
         --with-multisubdir=${ml_dir} --with-multisrctop=${multisrctop} \
         ${ac_configure_args} ${ml_config_env} ${ml_srcdiroption} ; then
       true
     else
       exit 1
     fi

  (Note, I did not try the latest version of the file)

This file handles the multilib builds and creates a separate dir for
each variant it needs to handle. It alters the various include paths and
flags for each variant and then passes those to the nesting configure
script it invokes via a 'CC' shell variable. The problem with MSYS is
the CC that gets picked up and used in the variant specific configure is
the unmodified one (CC) and not the variant modified one (CC_ set to CC
in the eval).

The 'ml_config_env' variable is the modified variant specific version of
'CC' and friends and I _think_ it is correctly handled and this part of
the eval is working. The problem seems to be ${ac_configure_args} also
contains a 'CC=...' which is the unmodified version and this overrides
the 'CC' in ${ml_config_env}. That is and command looks like:

   'CC=.../xgcc -new' /bin/sh .../configure --target=xxx 'CC=.../xgcc'

What I found is removing the 'CC' from ${ac_configure_args} (after the
configure) fixed the problem. What I do not know is if the first 'CC"
should override the second or the second 'CC' should not have been in
${ac_configure_args}.

Chris

ps: I attempted to send this to the MSYS list which I now see is not
used and this list should be used. I apologise if 2 posts appear.


------------------------------------------------------------------------------
AppSumo Presents a FREE Video for the SourceForge Community by Eric
Ries, the creator of the Lean Startup Methodology on "Lean Startup
Secrets Revealed." This video shows you how to validate your ideas,
optimize your ideas and identify your business strategy.
http://p.sf.net/sfu/appsumosfdev2dev
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Reply | Threaded
Open this post in threaded view
|

Re: Problems building gcc cross-compiler under MSYS.

Earnie Boyd
Chris Johns wrote:
>
> The first issue I get is the "Couldn't commit memory for cygwin heap"
> error. This is with the msysCORE-1.0.17-1 package and I think msysinfo
> said it was 1.0.18 with a build date of 2011-04-24. A net search turned

No, it would say 1.0.17, not 1.0.18.

> up this page http://notabs.org/coreboot/windows-build.htm. Check down
> the page under "04/01/2011 win-build-env-005.7z" for the comment about
> having fixed the issue. I downloaded and installed DLL from it and did
> not get the error. The msysinfo package says it is a 1.0.16 version DLL.
> Is this fix know about ?
>

Uh, no.  You need to convince the author to share the fix.
http://www.mingw.org/wiki/SubmitPatches tells what needs to be done.

--
Earnie
-- http://www.for-my-kids.com

------------------------------------------------------------------------------
AppSumo Presents a FREE Video for the SourceForge Community by Eric
Ries, the creator of the Lean Startup Methodology on "Lean Startup
Secrets Revealed." This video shows you how to validate your ideas,
optimize your ideas and identify your business strategy.
http://p.sf.net/sfu/appsumosfdev2dev
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe