Provide od+sed replacement for the bin2char helper
Using custom build-time tools is always more problematic, especially for cross-compiling. This alternative implementation assumes "od" (IEEE Std 1003.1-2001) and sed are available which should be the case for any reasonably modern system. Change-Id: I0208f475648c78e7dca127ff4bab60d314b2bf53 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2139 Tested-by: jenkins Reviewed-by: Fatih Aşıcı <fatih.asici@gmail.com> Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
This commit is contained in:
committed by
Andreas Fritiofson
parent
e03eb89cfb
commit
f1b04a20dc
41
configure.ac
41
configure.ac
@@ -1248,47 +1248,6 @@ if test $gcc_warnings = yes; then
|
||||
CFLAGS="$CFLAGS $GCC_WARNINGS"
|
||||
fi
|
||||
|
||||
# Setup for compiling build tools
|
||||
AC_MSG_CHECKING([for a C compiler for build tools])
|
||||
if test $cross_compiling = yes; then
|
||||
AC_CHECK_PROGS(CC_FOR_BUILD, gcc cc)
|
||||
CFLAGS_FOR_BUILD="-g -O2 $GCC_WARNINGS"
|
||||
else
|
||||
CC_FOR_BUILD=$CC
|
||||
CFLAGS_FOR_BUILD=$CFLAGS
|
||||
fi
|
||||
|
||||
AC_MSG_RESULT([$CC_FOR_BUILD])
|
||||
AC_SUBST([CC_FOR_BUILD])
|
||||
AC_SUBST([CFLAGS_FOR_BUILD])
|
||||
|
||||
AC_MSG_CHECKING([for suffix of executable build tools])
|
||||
if test $cross_compiling = yes; then
|
||||
cat >conftest.c <<\_______EOF
|
||||
int main ()
|
||||
{
|
||||
exit (0);
|
||||
}
|
||||
_______EOF
|
||||
for i in .exe ""; do
|
||||
compile="$CC_FOR_BUILD conftest.c -o conftest$i"
|
||||
if AC_TRY_EVAL(compile); then
|
||||
if (./conftest) 2>&AC_FD_CC; then
|
||||
EXEEXT_FOR_BUILD=$i
|
||||
break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
rm -f conftest*
|
||||
if test "${EXEEXT_FOR_BUILD+set}" != set; then
|
||||
AC_MSG_ERROR([Cannot determine suffix of executable build tools])
|
||||
fi
|
||||
else
|
||||
EXEEXT_FOR_BUILD=$EXEEXT
|
||||
fi
|
||||
AC_MSG_RESULT([$EXEEXT_FOR_BUILD])
|
||||
AC_SUBST([EXEEXT_FOR_BUILD])
|
||||
|
||||
AC_CONFIG_FILES([
|
||||
Makefile
|
||||
src/Makefile
|
||||
|
||||
Reference in New Issue
Block a user