Loading ...
Sorry, an error occurred while loading the content.

Vim 7.2 configure.in breaks silently when cross-compiling

Expand Messages
  • Thilo Fromm
    Hello list, I found this bug while trying to cross-compile vim-7.2 using the OpenEmbedded build framework (
    Message 1 of 1 , Oct 1, 2010
      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/

      configure.in features quotes around some calls to $CC (i.e. it calls
      "$CC"). CC is, however, not always just the compiler name. In
      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/
      line 11329: test: : integer expression expected
      checking whether we need -D_FORTIFY_SOURCE=1... /SCRATCH/maniac/oe-
      vim72/src/configure: line 11339: test: : integer expression expected

      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

      This patch removes the quotes around the CC variable in configure.in,
      which unbreaks the configure step.

      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 @@
      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
      + gccversion=`$CC --version | sed -e '2,$d' -e 's/darwin.//' -e 's/
      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

      You received this message from the "vim_dev" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php
    Your message has been successfully submitted and would be delivered to recipients shortly.