mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-08-01 21:23:51 -09:00
package/apr: fix build failure with GCC >= 14
The workaround in3d06661fc1for the broken C23 check was incorrect: When overriding ac_cv_prog_cc_c23 the value must either be "no" (to indicate that C23 is not supported) or contain the command line parameters to enable C23 with the C compiler in use (e.g. "-std=gnu23", may be an empty string if appropriate). The workaround set it to "yes" for host GCC >= 14, making builds fail. However, the original issue was that apr may try to enable C23 in host CC calls if the target CC supports it. So instead of figuring out the correct arguments for GCC >= 14, we can set ac_cv_prog_cc_c23=no only for host GCC <= 13 and leave it unset otherwise, as in that case enabling C23 will do no harm. Fixes:3d06661fc1Fixes: - https://autobuild.buildroot.net/results/77c/77cd5456169e04c2f92dc328c4b6828513d1195f/ - https://autobuild.buildroot.net/results/7a4/7a4fb2b21027f98df607871d9fe0dd234d44aebb/ - https://autobuild.buildroot.net/results/a6c/a6cef4c5965fdeb40d3b39cbd40941329f4fc1c8/ (and more) Tested-by: Bernd Kuhls <bernd@kuhls.net> Signed-off-by: Fiona Klute <fiona.klute@gmx.de> Signed-off-by: Romain Naour <romain.naour@smile.fr>
This commit is contained in:
committed by
Romain Naour
parent
be70e1b9f3
commit
b88b96246d
@@ -34,7 +34,6 @@ APR_CONF_ENV = \
|
||||
ac_cv_mmap__dev_zero=yes \
|
||||
ac_cv_func_setpgrp_void=yes \
|
||||
apr_cv_process_shared_works=yes \
|
||||
ac_cv_prog_cc_c23=$(if $(BR2_HOST_GCC_AT_LEAST_14),yes,no) \
|
||||
apr_cv_mutex_robust_shared=no \
|
||||
apr_cv_tcp_nodelay_with_cork=yes \
|
||||
ac_cv_sizeof_struct_iovec=8 \
|
||||
@@ -51,6 +50,10 @@ APR_CONF_ENV = \
|
||||
apr_preload_done=yes
|
||||
APR_CONFIG_SCRIPTS = apr-1-config
|
||||
|
||||
ifeq ($(BR2_HOST_GCC_AT_LEAST_14),)
|
||||
APR_CONF_ENV += ac_cv_prog_cc_c23=no
|
||||
endif
|
||||
|
||||
# Doesn't even try to guess when cross compiling
|
||||
ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
|
||||
APR_CONF_ENV += apr_cv_pthreads_lib="-lpthread"
|
||||
|
||||
Reference in New Issue
Block a user