The approach you suggest would not work with cross-compilation, right? So it
might be better to use the output of $CPP to generate a .c file that could be
compiled and not run, that would check that the compiler options were consistent
with the preprocessor options.
Probably we need to draw
> > The problem is not limited to flags like -m32 and -m64. Flags like
> > -fsanitize=address can also affect preprocessor behavior. A complete
> > list of such flags would be daunting to maintain.
>
> I didn't know about the -fsanitize=address effect, but it is easy to
> determine:
>
> $ diff
Paul Eggert wrote:
> In contrast, it's relatively simple to say "Don't use AC_EGREP_CPP
> unless you know the result isn't likely to depend on compiler options."
No one can reasonably assert that a certain test is not dependent on compiler
options.
1) because there are unexpected cases, such as
On 11/06/2017 11:23 AM, Bruno Haible wrote:
When the error rate is so high, we should
1) improve the documentation (this is mainly install.texi from Autoconf),
2) add a consistency check in AC_PROG_CC or AC_PROG_CPP.
(2) would be better than what we have now, yes. But how could such a
che
Hi Paul,
> > This configuration issue comes up occasionally
> It's more than "occasionally", I'm afraid. I just did a Google search
> for 'configure CFLAGS "-m32"' and in the first ten hits, more people got
> it wrong than right. When the error rate is this high, it's appropriate
> to change th
On 11/06/2017 02:08 AM, Bruno Haible wrote:
This configuration issue comes up occasionally
It's more than "occasionally", I'm afraid. I just did a Google search
for 'configure CFLAGS "-m32"' and in the first ten hits, more people got
it wrong than right. When the error rate is this high, it's a
Hi Paul,
This patch is not good, IMO.
> Without this patch, ‘./configure CFLAGS="-m32"’ fails on gzip with GNU/Linux
> x86-64.
We have documented in
https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/Preset-Output-Variables.html
that this is the wrong way to d
* m4/float_h.m4 (gl_FLOAT_H):
* m4/host-cpu-c-abi.m4 (gl_HOST_CPU_C_ABI):
* m4/lib-ld.m4 (AC_LIB_PROG_LD):
* m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB):
* m4/year2038.m4 (gl_YEAR2038):
Prefer AC_COMPILE_IFELSE to AC_EGREP_CPP when testing conditions
likely to be affected by the choice of CFLAGS, si