I must write a batch file to call a shell script in cygwin for making GCC toolchains for some purposes. After making binutils successfully, I make gcc-3.4.3 using my batch file...
My batch file: CLS @echo off set MAKE_MODE=UNIX sh ./test.sh test.sh: #!/bin/bash cd /cygdrive/c/toolchains/build-gcc sh ../gcc-3.4.3/configure --target=arm --srcdir=../gcc-3.4.3 --prefix=/usr/local --enable-languages="c" make make install It's work fine (make success) when I directly run test.sh in cygwin, but there are some error as follow when I run my batch file to call test.sh. In file included from ../../gcc-3.4.3/gcc/c-opts.c:39: options.h:25: error: redefinition of `OPT_d' options.h:23: error: `OPT_d' previously defined here ../../gcc-3.4.3/gcc/c-opts.c: In function `c_common_init_options': ../../gcc-3.4.3/gcc/c-opts.c:191: error: `CL_C' undeclared (first use in this function) ../../gcc-3.4.3/gcc/c-opts.c:191: error: (Each undeclared identifier is reported only once ../../gcc-3.4.3/gcc/c-opts.c:191: error: for each function it appears in.) ../../gcc-3.4.3/gcc/c-opts.c:191: error: initializer element is not constant ../../gcc-3.4.3/gcc/c-opts.c:191: error: (near initialization for `lang_flags[0]') ../../gcc-3.4.3/gcc/c-opts.c:191: error: `CL_ObjC' undeclared (first use in this function) ../../gcc-3.4.3/gcc/c-opts.c:191: error: initializer element is not constant ../../gcc-3.4.3/gcc/c-opts.c:191: error: (near initialization for `lang_flags[1]') ../../gcc-3.4.3/gcc/c-opts.c:191: error: `CL_CXX' undeclared (first use in this function) ../../gcc-3.4.3/gcc/c-opts.c:191: error: initializer element is not constant ../../gcc-3.4.3/gcc/c-opts.c:191: error: (near initialization for `lang_flags[2]') ../../gcc-3.4.3/gcc/c-opts.c:191: error: `CL_ObjCXX' undeclared (first use in this function) ../../gcc-3.4.3/gcc/c-opts.c:191: error: initializer element is not constant ../../gcc-3.4.3/gcc/c-opts.c:191: error: (near initialization for `lang_flags[3]') make[1]: *** [c-opts.o] Error 1 make[1]: Leaving directory `/cygdrive/c/toolchains/build-gcc/gcc' make: *** [all-gcc] Error 2 I have set my PATH=c:\cygwin\bin, but it also have error, anyone can give a help? Thanks very much. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/