On Tue, 11 May 2004, Jeff Moyer wrote:
>
> Okay, change that -fpie to -fPIE (at least for sparc, don't think it hurts
> if we do this for everyone). And I just confirmed with Jakub, that it is
> better to actually try to run the program:
>
> <jakub> phro: if you have old glibc on sparc, it will compile and link,
> but not run e.g.
>
This would be the final patch on this issue then, yes.
--- autofs-4.1.3.orig/configure.in 2004-05-02 16:31:40.000000000 +0800
+++ autofs-4.1.3/configure.in 2004-05-11 22:12:59.000000000 +0800
@@ -134,15 +134,16 @@
cat > pietest.c <<EOF
int main(void) { return 0; }
EOF
-CFLAGS=-fpie
+CFLAGS=-fPIE
+LDFLAGS=-pie
DAEMON_CFLAGS=
DAEMON_LDFLAGS=
-AC_MSG_CHECKING([whether gcc accepts -fpie])
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[int main(void) {return 0;}]])],
- [gcc_supports_pie=yes], [gcc_supports_pie=no])
+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])
AC_MSG_RESULT([$gcc_supports_pie])
if test $gcc_supports_pie = yes ; then
- DAEMON_CFLAGS="-fpie"
+ DAEMON_CFLAGS="-fPIE"
DAEMON_LDFLAGS="-pie"
fi
rm -f pietest.c
_______________________________________________
autofs mailing list
[EMAIL PROTECTED]
http://linux.kernel.org/mailman/listinfo/autofs