tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: [patch] a concrete proposal for fixing the gcc c++ mixed-compiler issue
On Fri, Jul 07, 2017 at 08:32:16AM -0500, Jason Bacon wrote:
>
> Are the gcc5 and gcc6 packages reliable and compatible with most of the
> upstream code?
>
> I can only vouch for the fact that they build on CentOS. I haven't
> personally compiled anything with them.
>
> I have tested gcc48 and gcc49 extensively and have confidence in them.
netbsd switched to gcc5 some months ago, so that's a solid choice that
won't run into packages issues. the problems we had in pkgsrc were:
- makefiles that tested for compiler matching gcc-4* to workaround some
bug, and had to be extended to gcc5 too. depending on how much foresight
we had, it might be a problem again with gcc6.
- new build warnings/errors causing failures.
For these reasons I recommend sticking with gcc5, unless you like
tackling the occasional build error. there's a large enough number of
other developers who are using it that the vast majority of issues are
already fixed.
- gcc aggressively replacing some functions with optimized versions,
this was the case with xemacs and some versions of emacs:
it had replaced malloc + memset zero to calloc, unfortunately the
function doing this was called calloc too, so it became an infinite
loop.
http://mail-index.netbsd.org/tech-toolchain/2016/10/28/msg002822.html
GCC argues that you should be building such functions with
-fno-builtin-functionname.
- the infamous gobject-introspection bug (you might've seen the long
thread) where many packages will segfault might be a GCC bug, but most
people don't see it.
- As always with new versions of GCC, it does even more aggressive
optimizations of undefined behaviour with little warning. this has
made previously working code to crash.
A specific optimization (-fdelete-null-pointer-checks) got a bad enough
reputation that many programs disable it, and netbsd's copy of GCC
disables it as a default optimization (with -O2).
Home |
Main Index |
Thread Index |
Old Index