diff options
| author | Ken Raeburn <raeburn@mit.edu> | 2004-08-08 22:35:02 +0000 |
|---|---|---|
| committer | Ken Raeburn <raeburn@mit.edu> | 2004-08-08 22:35:02 +0000 |
| commit | 818624d17b78f8f3561e8c6b81a0c19c70ad2f23 (patch) | |
| tree | afa0fae28bbdd4339b46b2af667b2660a27d9127 /src | |
| parent | 2aba238ac19a5d15d322fcb146f263f12ce5fb0d (diff) | |
| download | krb5-818624d17b78f8f3561e8c6b81a0c19c70ad2f23.tar.gz krb5-818624d17b78f8f3561e8c6b81a0c19c70ad2f23.tar.xz krb5-818624d17b78f8f3561e8c6b81a0c19c70ad2f23.zip | |
* aclocal.m4 (KRB5_AC_ENABLE_THREADS): Clear PTHREAD_CFLAGS and PTHREAD_LIBS
after adding them to CFLAGS and LIBS respectively, to avoid duplicating the
options later.
(WITH_CC): Add -O on AIX also. Don't add options if similar options are
already present.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16649 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 7 | ||||
| -rw-r--r-- | src/aclocal.m4 | 24 |
2 files changed, 26 insertions, 5 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index b843fdfb0..1271185cf 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,8 +1,11 @@ 2004-08-08 Ken Raeburn <raeburn@mit.edu> * aclocal.m4 (KRB5_AC_ENABLE_THREADS): On AIX and OSF/1, always - add $PTHREAD_CFLAGS to CFLAGS for use in later tests. - (WITH_CC): If on AIX and not using gcc, add -qhalt=e to CFLAGS. + add $PTHREAD_CFLAGS to CFLAGS for use in later tests. Clear + PTHREAD_CFLAGS and PTHREAD_LIBS to avoid duplicating the options + later. + (WITH_CC): If on AIX and not using gcc, add -qhalt=e and -O to + CFLAGS if similar options are not already present. 2004-07-16 Ken Raeburn <raeburn@mit.edu> diff --git a/src/aclocal.m4 b/src/aclocal.m4 index 1d106ddea..bfc465e65 100644 --- a/src/aclocal.m4 +++ b/src/aclocal.m4 @@ -151,7 +151,14 @@ if test "$enable_thread_support" = yes; then # AIX and Tru64 don't support weak references, and don't have # stub versions of the pthread code in libc. case "${host_os}" in - aix* | osf*) LIBS="$LIBS $PTHREAD_LIBS" ; CFLAGS="$CFLAGS $PTHREAD_CFLAGS" ;; + aix* | osf*) + # On these platforms, we'll always pull in the thread support. + LIBS="$LIBS $PTHREAD_LIBS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + # We don't need to sometimes add the flags we've just folded in... + PTHREAD_LIBS= + PTHREAD_CFLAGS= + ;; esac fi dnl We want to know where these routines live, so on systems with weak @@ -574,8 +581,19 @@ else # Using AIX but not GCC, assume native compiler. # The native compiler appears not to give a nonzero exit # status for certain classes of errors, like missing arguments - # in function calls. Let's try to fix that. - CFLAGS="$CFLAGS -qhalt=e" + # in function calls. Let's try to fix that with -qhalt=e. + case "$CC $CFLAGS" in + *-qhalt=*) ;; + *) CFLAGS="$CFLAGS -qhalt=e" ;; + esac + # Also, the optimizer isn't turned on by default, which means + # the static inline functions get left in random object files, + # leading to references to pthread_mutex_lock from anything that + # includes k5-int.h whether it uses threads or not. + case "$CC $CFLAGS" in + *-O*) ;; + *) CFLAGS="$CFLAGS -O" ;; + esac fi fi ])dnl |
