Skip to content

autoconf: refresh bundled macros, remove AC_CANONICAL_TARGET#9976

Open
BrianAker wants to merge 2 commits intowolfSSL:masterfrom
BrianAker:master
Open

autoconf: refresh bundled macros, remove AC_CANONICAL_TARGET#9976
BrianAker wants to merge 2 commits intowolfSSL:masterfrom
BrianAker:master

Conversation

@BrianAker
Copy link
Contributor

Description

This updates bundled autoconf-archive macros, remove AC_CANONICAL_TARGET from configure.ac which had been required because of bug in the version ax_pthread.m4 used. This keeps pthread/configure checks aligned with native host builds and pulls in newer macro behavior for compiler flag probing and compiler version detection.

To be clear, with the exception of the one line change in configure.ac, all other changes are the updated m4 from autoconf-archive ( brew gives the version as 2024.10.16 ). The autoconf-archive went through a license change sometime ago to the currently used in these files. These m4 were included with wolfssl originally to simplify compiling, which is common for how m4 files are distributed.

Testing

./autogen.sh && ./configure && make && make check && make dist && make distcheck

This updates bundled autoconf-archive macros, remove AC_CANONICAL_TARGET from configure.ac which had been required because of bug in the version ax_pthread.m4 used.
This keeps pthread/configure checks aligned with native host builds and pulls in newer macro behavior for compiler flag probing and compiler version detection.
@LinuxJedi
Copy link
Member

Jenkins retest this please: multi-test bailed.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refreshes bundled Autoconf Archive macros and adjusts pthread/configure detection to rely on canonical host (not target), aligning thread checks with native host builds and updated macro behavior.

Changes:

  • Update multiple m4/ax_* macros to newer Autoconf Archive revisions (including license header updates and new compiler/version handling).
  • Switch AX_PTHREAD to use AC_CANONICAL_HOST / $host_os instead of AC_CANONICAL_TARGET / $target_os.
  • Remove AC_CANONICAL_TARGET from configure.ac.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
m4/ax_pthread.m4 Uses canonical host + $host_os for pthread detection; bumps macro serial.
m4/ax_create_generic_config.m4 Macro refresh (header/license/serial).
m4/ax_compiler_version.m4 Macro refresh; adds NVHPC compiler version detection.
m4/ax_check_link_flag.m4 Macro refresh (header/license/serial).
m4/ax_check_compile_flag.m4 Macro refresh; changes compile-flag probing behavior (adds GNU -Werror handling).
m4/ax_append_flag.m4 Macro refresh (header/license/serial).
m4/ax_append_compile_flags.m4 Macro refresh (header/license/serial).
configure.ac Drops AC_CANONICAL_TARGET (no longer needed with updated AX_PTHREAD).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines +44 to +54
if test x"m4_case(_AC_LANG,
[C], [$GCC],
[C++], [$GXX],
[Fortran], [$GFC],
[Fortran 77], [$G77],
[Objective C], [$GOBJC],
[Objective C++], [$GOBJCXX],
[no])" = xyes ; then
add_gnu_werror="-Werror"
fi
_AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1 $add_gnu_werror"
AX_COMPILER_VERSION is inappropriately polluting the compiler options, it also no longer needed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants