tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: GCC_REQD+=14



At Tue, 7 Jan 2025 15:29:52 +0000, Jonathan Perkin <jperkin%pkgsrc.org@localhost> wrote:
Subject: GCC_REQD+=14
>
> I just wanted to call out this one
> specifically.  GCC 14 is a absolute
> disaster, breaking almost all existing
> software.  It can't even bootstrap pkgsrc
> without significant work.

Even GCC-14 can work just fine as a compiler for plain old ISO-C 89
code.

You just have to tell it to.  For current bootstrap code "-std=gnu99"
works perfectly.

There's a bit of a mess in pkgsrc/mk/compiler.mk et al w.r.t. getting
this set correctly, but I have working patches for a slightly
out-of-date pkgsrc.

Both can also easily be told to not turn any warnings into errors:

	-Wno-everything -w

Only developers might need or want warnings:

# only developers might want warnings
#
.if ${PKG_DEVELOPER:Uno} == "no" || ${NO_WARNINGS} == "yes"
_WRAP_EXTRA_ARGS.CC+=  -Wno-everything -w
CWRAPPERS_APPEND.cc+=  -Wno-everything -w
_WRAP_EXTRA_ARGS.CXX+= -Wno-everything -w
CWRAPPERS_APPEND.cxx+= -Wno-everything -w
.endif


I just happened to do another bootstrap on macos with clang-16.0, and it
works A-OK with these settings; no warnings, no errors.

I can try the same with GCC-14 on FreeBSD-14, but I expect it will work
fine.

Why does it seem like everyone is afraid to tell the compiler what
language level it is supposed to be compiling, and to turn off its
warnings when they're not needed or wanted?!?!?!?

--
					Greg A. Woods <gwoods%acm.org@localhost>

Kelowna, BC     +1 250 762-7675           RoboHack <woods%robohack.ca@localhost>
Planix, Inc. <woods%planix.com@localhost>     Avoncote Farms <woods%avoncote.ca@localhost>

Attachment: pgpgyBtKSeryt.pgp
Description: OpenPGP Digital Signature



Home | Main Index | Thread Index | Old Index