Skip to content

ax_prog_cc_for_build.m4: update to latest#72

Open
shr-project wants to merge 1 commit intoapache:trunkfrom
shr-project:fix-autoconf-2.73
Open

ax_prog_cc_for_build.m4: update to latest#72
shr-project wants to merge 1 commit intoapache:trunkfrom
shr-project:fix-autoconf-2.73

Conversation

@shr-project
Copy link
Copy Markdown

After the autoconf update to 2.73 this was using -std=gnu23 even on hosts with gcc-13 which doesn't support it:

ac_cv_prog_ac_ct_CC_FOR_BUILD='gcc '
CC_FOR_BUILD='gcc -std=gnu23'
ac_ct_CC_FOR_BUILD='gcc '

Leading to:
gcc: error: unrecognized command-line option ‘-std=gnu23’; did you mean ‘-std=gnu2x’?

Needs the updated ac_cv_prog_cc_c23 from:
autoconf-archive/autoconf-archive@8a970ce

After the autoconf update to 2.73 this was using -std=gnu23
even on hosts with gcc-13 which doesn't support it:

ac_cv_prog_ac_ct_CC_FOR_BUILD='gcc '
CC_FOR_BUILD='gcc  -std=gnu23'
ac_ct_CC_FOR_BUILD='gcc '

Leading to:
gcc: error: unrecognized command-line option ‘-std=gnu23’; did you mean ‘-std=gnu2x’?

Needs the updated ac_cv_prog_cc_c23 from:
autoconf-archive/autoconf-archive@8a970ce

Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
@shr-project
Copy link
Copy Markdown
Author

While this fixes the build on older hosts, side-effect of this is build reproducibilty issue when cross-compiling on hosts with different gcc versions, the installed ${datadir}/build-1/apr_rules.mk will contain different CC_FOR_BUILD value based on which host it was built:

CC_FOR_BUILD=gcc -std=gnu23
or
CC_FOR_BUILD=gcc

As detected by OpenEmbedded builds:
https://valkyrie.yocto.io/pub/repro-fail/oe-reproducible-20260412-a5w4mcrk/packages/diff-html/
not sure how you want to handle it, as work around we're going to strip -std=gnu23 from the installed file.

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.

1 participant