Hello list,
I found this bug while trying to cross-compile vim-7.2 using the
OpenEmbedded build framework (<
http://wiki.openembedded.net/index.php/
Main_Page>).
configure.in features quotes around some calls to $CC (i.e. it calls
"$CC"). CC is, however, not always just the compiler name. In
OpenEmbedded
CC might look more like "arm-angstrom-linux-gnueabi-gcc -march=armv5te
-mtune=arm926ej-s -mthumb-interwork -mno-thumb".
configure executes tests in a form like res=`"$CC" --some-arg`
The quotes make the shell try to execute the whole contents of the CC
variable -
compiler and options - as _one single_ binary, which will fail.
However, these errors remain unnoticed during the configure run:
...
configure: line 3707: arm-angstrom-linux-gnueabi-gcc -march=armv5te -
mtune=arm926ej-s -mthumb-interwork -mno-thumb: command not found
...
checking for setjmp.h... yes
checking for GCC 3 or later... /SCRATCH/maniac/oe-merge-test/OE/tmp.6/
work/armv5te-angstrom-linux-gnueabi/vim-7.2-r7.1/vim72/src/configure:
line 11329: test: : integer expression expected
no
checking whether we need -D_FORTIFY_SOURCE=1... /SCRATCH/maniac/oe-
merge-test/OE/tmp.6/work/armv5te-angstrom-linux-gnueabi/vim-7.2-r7.1/
vim72/src/configure: line 11339: test: : integer expression expected
no
...
But finally:
...
configure: creating ./config.status
config.status: creating auto/
config.mk
config.status: creating auto/config.h
So the configure step had errors, but didn't report any in the return
code.
This patch removes the quotes around the CC variable in
configure.in,
which unbreaks the configure step.
Regards,
Thilo Fromm
--- vim72-orig/src/
configure.in 2010-09-29 19:13:33.000000000 +0200
+++ vim72/src/
configure.in 2010-09-29 19:17:07.000000000 +0200
@@ -35,10 +35,10 @@
fi
if test "$GCC" = yes; then
dnl method that should work for nearly all versions
- gccversion=`"$CC" -dumpversion`
+ gccversion=`$CC -dumpversion`
if test "x$gccversion" = "x"; then
dnl old method; fall-back for when -dumpversion doesn't work
- gccversion=`"$CC" --version | sed -e '2,$d' -e 's/darwin.//' -e
's/^[[^0-9]]*\([[0-9]]\.[[0-9.]]*\).*$/\1/g'`
+ gccversion=`$CC --version | sed -e '2,$d' -e 's/darwin.//' -e 's/
^[[^0-9]]*\([[0-9]]\.[[0-9.]]*\).*$/\1/g'`
fi
dnl version 4.0.1 was reported to cause trouble on Macintosh by
Marcin Dalecki
if test "$gccversion" = "3.0.1" -o "$gccversion" = "3.0.2" -o
"$gccversion" = "4.0.1"; then