Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
16 years ago

Building crossGcc / gcc tools for Windows?

I see on the nioswiki that there are instructions for building the crossGcc toolchain on Linux.

My toolflow is currently in Windows so I was hoping to compile crossGcc for Windows. I started with Nios II command shell, which comes with native gcc.

When I do a make, the configure hangs forever with:

finding the maximum length of command line arguments...

Has anyone tried compiling the crossGcc tools on Windows? Should I be using mingw, etc? Hopefully I don't have to jump through a ton of hoops!

I'm compiling the cross tools because I want to improve on the lack of Nios II micro optimizations in crossGcc.

Any info/suggestions greatly appreciated.

Thanks, Peter

1 Reply

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Just in case someone tries to compile crossGcc under cygwin in the future (yes I know cygwin builds are not my first choice either), here's what I had to change to get it to compile:

    In the file binutils/ltconfig, beginning at line 791:

      while test "X"`$CONFIG_SHELL $0 --fallback-echo "X$testring" 2>/dev/null` 
                 = "XX$testring" &&
              new_result=`expr "X$testring" : ".*" 2>&1` &&
              lt_cv_sys_max_cmd_len=$new_result &&
              test $i != 17#  1/2 MB should be enough
      do
        i=`expr $i + 1`
        testring=$testring$testring
      done
    needs to be changed to:

      while test "X"`$CONFIG_SHELL $0 --fallback-echo "X$testring"  2>/dev/null` 
                 = "XX$testring" &&
              new_result=`expr "X$testring" : ".*" 2>&1` &&
              lt_cv_sys_max_cmd_len=$new_result &&
              test $i != 11#  PREVENT CYGWIN HANG, hopefully 11 iterations is still enough
      do
        i=`expr $i + 1`
        testring=$testring$testring
      done