Comment 7 for bug 894528

Revision history for this message
Michael Hope (michaelh1) wrote :

I think there's something going on here with GCC's automatic install prefix detection. Here's building a program from the command line using the default name:

C:\Users\cbuild\tests\misc>set PATH=c:\Users\cbuild\Desktop\gcc-linaro-arm-linux-gnueabi-2012.01-20120125_win32\bin;%PATH%

C:\Users\cbuild\tests\misc>arm-linux-gnueabi-gcc -O -o hello hello.c

(builds OK)

Rename the directory to 'gcc foo'

C:\Users\cbuild\tests\misc>set PATH="c:\Users\cbuild\Desktop\gcc foo"\bin;%PATH%

C:\Users\cbuild\tests\misc>arm-linux-gnueabi-gcc -O -o hello hello.c
arm-linux-gnueabi-gcc: error: CreateProcess: No such file or directory

Note that the error comes from GCC itself, not the shell.

Run again with a -v to show the command being run:

COLLECT_GCC_OPTIONS='-v' '-O' '-o' 'hello' '-march=armv7-a' '-mtune=cortex-a9' '-mfloat-abi=softfp' '-mfpu=vfpv3-d16' '-mthumb'
 cc1 -quiet -v -imultilib . -imultiarch arm-linux-gnueabi -iprefix c:\users\cbuild\tests\misc\../lib/gcc/arm-linux-gnueabi/4.6.3/ hello.c -quiet -dumpbase hello
.c -march=armv7-a -mtune=cortex-a9 -mfloat-abi=softfp -mfpu=vfpv3-d16 -mthumb -auxbase hello -O -version -o C:\Users\cbuild\AppData\Local\Temp\cc9zPhPn.s
arm-linux-gnueabi-gcc: error: CreateProcess: No such file or directory

Rename the directory to 'gcc' and re-run with -v:

C:\Users\cbuild\tests\misc>set PATH=c:\Users\cbuild\Desktop\gcc\bin;%PATH%

COLLECT_GCC_OPTIONS='-v' '-O' '-o' 'hello' '-march=armv7-a' '-mtune=cortex-a9' '-mfloat-abi=softfp' '-mfpu=vfpv3-d16' '-mthumb'
 c:/users/cbuild/desktop/gcc/bin/../libexec/gcc/arm-linux-gnueabi/4.6.3/cc1.exe
-quiet -v -imultilib . -imultiarch arm-linux-gnueabi -iprefix c:\users\cbuild\desktop\gcc\bin\../lib/gcc/arm-linux-gnueabi/4.6.3/ -isysroot c:\users\cbuild\desktop\gcc\bin\../arm-linux-gnueabi/libc hello.c -quiet -dumpbase hello.c -march=armv7-a -mtune=cortex-a9 -mfloat-abi=softfp -mfpu=vfpv3-d16 -mthumb -auxbase hello
 -O -version -o C:\Users\cbuild\AppData\Local\Temp\ccsHl3Vf.s

Note that with the space GCC tries to call 'cc1' where without the
space it calls 'c:/users/cbuild/desktop/gcc/bin/../libexec/gcc/arm-linux-gnueabi/4.6.3/cc1.exe'