OpenAFS Master Repository branch, master, updated. openafs-devel-1_9_1-419-gdba6ec9

Gerrit Code Review gerrit@openafs.org
Tue, 2 Jul 2024 13:14:12 -0400


The following commit has been merged in the master branch:
commit dba6ec9548ab6a58b30743700c638d7c730414d5
Author: Andrew Deason <adeason@sinenomine.net>
Date:   Fri May 19 16:53:55 2023 -0500

    cf: Set CC before calling AC_PROG_CC
    
    On some platforms (HPUX, SOLARIS, AIX), we forcibly set CC or set a
    default CC, because we must use a specific compiler to build kernel
    modules, and we specify certain compiler-specific flags. But we do
    this after AC_PROG_CC has run, which also searches for a compiler to
    use, and runs a few tests against it. AC_PROG_CC often chooses a
    different compiler (it prefers gcc if it's available).
    
    As a result, some compiler-derived info may be wrong, which can yield
    confusing results, even breaking the build depending on what the
    user's PATH is, or what compilers are installed on the system.
    
    We can avoid all of this if we move our CC-setting logic to before
    AC_PROG_CC is called. This is a little tricky, because our logic to
    set AFS_SYSNAME requires the C compiler, so we must do this before
    OPENAFS_SYSNAME, and also before AC_USE_SYSTEM_EXTENSIONS, or any
    other autoconf macro that uses the C compiler.
    
    Move our CC-setting logic into a new macro, OPENAFS_PATH_CC, which is
    separate from OPENAFS_CONFIGURE_COMMON and must be called before
    OPENAFS_CONFIGURE_COMMON. Add some safeguards to try to detect if
    AC_PROG_CC is already called to try to prevent future changes from
    breaking this; this isn't perfect, but it's better than nothing.
    
    Change-Id: I7c327df5acc5d1ff701b70825eecaaaab4aa44a8
    Reviewed-on: https://gerrit.openafs.org/15456
    Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
    Reviewed-by: Ben Huntsman <ben@huntsmans.net>
    Tested-by: BuildBot <buildbot@rampaginggeek.com>
    Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>

 acinclude.m4         |   7 ++-
 configure-libafs.ac  |   5 +--
 configure.ac         |   9 +---
 src/cf/cc.m4         | 122 +++++++++++++++++++++++++++++++++++++++++++++++++++
 src/cf/osconf.m4     |  15 -------
 src/cf/solaris-cc.m4 |  16 -------
 6 files changed, 131 insertions(+), 43 deletions(-)

-- 
OpenAFS Master Repository