tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Fixing configure failures from newer gcc
On 20/Oct/2025 11:18, Dr. Thomas Orgis wrote:
<...>
> As the _C99 macro(s) has been deprecated in autotools, just assuming
> that compilers support c99 …
After calling AC_PROG_CC, you're now supposed to check ac_prog_cc_stdc
for the highest supported standard (from autoconf's perspective).
> I'm right now not sure what I am supposed to do to ensure that my
> code is compiled in C99 mode,
Currently there's no macro to request a specific standard; autoconf
assumed that compilers would keep the language mostly backwards
compatible, something that held true for about 35 years.
> without assuming something about the compiler used downstream. Maybe
> -std=c99 is universal enough nowadays that there is no compiler
> left that doesn't understand it.
No, there's plenty of variation in command line options still today.
> But is it my job to decide that? I thought that's
> autoconf's job (or whatever build systems'), abstracting the toolchain.
Definitely it's autoconf's job.
<...>
> Also, I am reminded of the C++11 ABI breakage … it's not just language
> standard, but sometimes you have to build code with a differing
> standard than it expects just to match the ABI of other packages.
This was not supposed to happen.
> Upstream fixing a standard could be undesired in that case. So, what is
> the fully correct way to behave for me as upstream? Of course I'd like
> to some way to specify that my code prefers a certain language standard
> and possibly could work with supersets of that … but without breaking
> other stuff downstream.
We'd have to start the discussion with the project maintainers.
I'll try to come up with a macro implementation later today.
Home |
Main Index |
Thread Index |
Old Index