tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: pruning stale C language variants
David Holland <dholland-pkgtech%netbsd.org@localhost> writes:
> > > There is one fly in this ointment, which is that we might need to feed
> > > c2x, c1x, or even c9x to older compilers. I'd expect that any needed
> > > support for this and c1x/c9x would already be in place; it might be
> > > necessary to extend that to provide c2x in place of c23 for some
> > > versions.
> >
> > If so that is a pre-existing problem in the code.
>
> No... what I'm saying is that if you set the pkgsrc-level language to
> c11, and are using an old compiler, we might need to transform that to
> --std=c1x before running the compiler, and likewise for c23/c2x.
Agreed completely - that's what I meant. However, cleaning up aliases
is unrelated to the fact that in the code before I touched it, there was
no translation like this; it was necessary before and it's still necessary.
The code:
.if !empty(FORCE_C_STD)
. for std in ${_GCC_C_DIALECTS}
. if !empty(FORCE_C_STD:M${std})
CWRAPPERS_APPEND.cc+= -std=${std}
. endif
. endfor
.endif
So whatever is in FORCE_C_STD, if it's a legit std name, is just added.
This is where we need a translation table based on compiler type and
version. Maybe a small program in rust to query a datbase in sqlite?
Home |
Main Index |
Thread Index |
Old Index