Hi all; autofs's configure.in is not properly set up to allow for
cross-compiling. It fails trying to detect -fPIE, because configure.in
runs AC_RUN_IFELSE to run a program (which of course can't work during
cross-compilation) and does not provide a cross-compilation result.
I'm not sure why this test for PIE exists or if it's really needed, but
if you want to keep it please add an argument for cross-compilation.
Patch is attached, against 4.1.4 (but I checked 5.00beta1 and it had the
same issue). As recommended by the autoconf manual, this patch is
pessimistic and assumes no PIE support for all cross-compilation
environments.
I've split the patch into two: one for configure.in and one for
configure itself (I'm not sure if you source code control the configure
script: some projects do and some don't).
Cheers!
--
-----------------------------------------------------------------------------
Paul D. Smith <[EMAIL PROTECTED]> http://netezza.com
"Please remain calm--I may be mad, but I am a professional."--Mad Scientist
-----------------------------------------------------------------------------
These are my opinions--Netezza takes no responsibility for them.
--- autofs-4.1.4-old/configure.in 2005-04-06 11:24:37.000000000 -0400
+++ autofs-4.1.4/configure.in 2006-11-07 13:59:42.895680583 -0500
@@ -140,7 +140,8 @@
DAEMON_LDFLAGS=
AC_MSG_CHECKING([whether gcc -fPIE works])
AC_RUN_IFELSE([AC_LANG_PROGRAM([[]], [[int main(void) {return 0;}]])],
- [gcc_supports_pie=yes], [gcc_supports_pie=no])
+ [gcc_supports_pie=yes], [gcc_supports_pie=no],
+ [gcc_supports_pie=no])
AC_MSG_RESULT([$gcc_supports_pie])
if test $gcc_supports_pie = yes ; then
DAEMON_CFLAGS="-fPIE"
--- autofs-4.1.4-old/configure 2005-04-06 11:24:37.000000000 -0400
+++ autofs-4.1.4/configure 2006-11-07 14:07:37.896113601 -0500
@@ -4219,11 +4219,7 @@
echo "$as_me:$LINENO: checking whether gcc -fPIE works" >&5
echo $ECHO_N "checking whether gcc -fPIE works... $ECHO_C" >&6
if test "$cross_compiling" = yes; then
- { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
+ gcc_supports_pie=no
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_______________________________________________
autofs mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/autofs