I'm running a makefile in Cygwin. The makefile first calls make_standalone_toolchain.py, which creates all of the toolchains. I think I'm saying this right, but I'm not a Linux person and I'm not sure of the terminology. Regardless, this works.
Then, the makefile calls a shell script which uses one of the toolchains. Here is the code in the shell script that is throwing the error:
cat > $test.c << EOF
int foo() { return 0; }
EOF
echo "Checking for obsessive-compulsive compiler options..." >> configure.log
if try $CC -c $CFLAGS $test.c; then
:
else
echo "Compiler error reporting is too harsh for $0 (perhaps remove -Werror)." | tee -a configure.log
leave 1
fi
And here is the logged error in configure.log:
Checking for obsessive-compulsive compiler options...
=== ztest1530.c ===
int foo() { return 0; }
===
aarch64-linux-android-gcc -c -fstack-protector-all -march=armv8-a -ftree-vectorize -fuse-ld=gold -O3 ztest1530.c
./configure: line 373: aarch64-linux-android-gcc: command not found
(exit code 127)
Compiler error reporting is too harsh for ./configure (perhaps remove -Werror).
** ./configure aborting.
--------------------
In the makefile:
CC=aarch64-linux-android-gcc
And the passed-in CFLAGS:
CFLAGS="-fstack-protector-all -march=armv8-a -ftree-vectorize -fuse-ld=gold -O3"
It says that aarch64-linux-android-gcc: command not found
but I have this in the toolchain/bin folder: aarch64-linux-android-gcc.cmd
and I have the toolchain/bin folder in the PATH Environment Variable.
I think I might have to call this differently:
if try $CC -c $CFLAGS $test.c; then
since it is a .cmd file. I'm not sure if this is the issue or if this is how it should be done. Thanks for any help you can give.
Edit
Thank you @SomethingDark, for pointing out that you cannot run batch files in cygwin, I was overlooking that. However, in the toolchain/bin folder, next to the .cmd file, I also have a aarch64-linux-android-gcc
file. Why does cygwin not see this file even though I have the path set in the Environment Variables?