|
From: Andriy G. <av...@ic...> - 2013-01-27 19:59:08
|
configure.in script contains this snippet:
if test "${build}" !="${host}"
then
... setup compilers and flags for cross-compilation
else
... ditto for native compilation
fi
I am not sure if the "${build}" !="${host}" check is correct.
The generated configure script seems to use set and use $cross_compiling
variable for this purpose. And when it sets the variable it checks not only for
equality/inequality, but also if $build and $host are in fact set.
At least on FreeBSD (with a FreeBSD port gnuplot) I observe that $build is set
but $host is not set and for that reason the above check makes an incorrect
decision that a cross-compilation is done. But $cross_compiling is set to "no",
which is correct.
Maybe the check should be changed to use $cross_compiling or to check that both
of the host/build variables are set.
A possible patch for the first approach:
--- configure.in.orig 2012-11-23 22:49:50.768450173 +0200
+++ configure.in 2012-11-23 22:52:14.986450016 +0200
@@ -33,7 +33,7 @@ AC_C_INLINE
AC_C_STRINGIZE
AC_PROG_LN_S
-if test "${build}" != "${host}"
+if test "${cross_compiling}" = "yes"
then
CC=${CC-${host_alias}-gcc}
CFLAGS=${CFLAGS-"-g -O2"}
What do you think?
P.S. Judging from config.log the FreeBSD port runs configure with the following
arguments:
./configure --with-lasergnu --with-readline=gnu --without-linux-vga
--without-lisp-files --without-tutorial --with-bitmap-terminals
--with-gd=/usr/local --disable-h3d-quadtree --enable-h3d-gridbox
--with-pdf=/usr/local --with-plot=/usr/local --with-kpsexpand
--with-texdir=/usr/local/share/texmf/tex/latex/gnuplot --disable-thin-splines
--with-wx-config=/usr/local/bin/wxgtk2-2.8-config --x-libraries=/usr/local/lib
--x-includes=/usr/local/include --prefix=/usr/local --mandir=/usr/local/man
--infodir=/usr/local/info/ --build=amd64-portbld-freebsd10.0
(On FreeBSD 10 amd64)
--
Andriy Gapon
|