[cfarm-users] gcc220 upgrade to OpenBSD 6.5?

Juan Francisco Cantero Hurtado iam at juanfra.info
Wed Jul 3 14:37:01 CEST 2019


On Wed, 3 Jul 2019 07:38:04 +0100
Jonathan Wakely <jwakely.gcc at gmail.com> wrote:

> On Wed, 3 Jul 2019, 06:56 Assaf Gordon via cfarm-users, <
> cfarm-users at lists.tetaneutral.net> wrote:
> 
> > Hello,
> >
> > On 2019-07-02 10:19 p.m., Christian Jullien wrote:  
> > > Thank you for this upgrade but what about gcc?  

+1. Thanks for the upgrade.

> >
> > TL;DR
> > gcc-8.3.0 is now available on gcc302 as:
> >
> >     /usr/local/bin/x86_64-unknown-openbsd6.5-gcc-8.3.0
> >
> > or simply as:
> >
> >     egcc
> >  
> > >> From this page https://www.openbsd.org/65.html I read that
> > >> available gcc should be "GCC 4.9.4 and 8.3.0" but the installed
> > >> version is quite old  
> >  
> > > obsd$ which -a gcc
> > > /usr/bin/gcc
> > > obsd$ gcc -v
> > > Reading specs
> > > from /usr/lib/gcc-lib/amd64-unknown-openbsd6.5/4.2.1/specs
> > > Target: amd64-unknown-openbsd6.5 Configured with: OpenBSD/amd64
> > > system compiler Thread model: posix
> > > gcc version 4.2.1 20070719
> > >  
> >
> > Notice above that this old version of gcc-4.2.1 *was* upgraded to
> > kernel 6.5 (see the "Target:" and the "Reading specs from").
> >
> > I'm no OpenBSD expert, but I believe that gcc-4.2.1 is the last gcc
> > version which is bundled as 'native' package in core OpenBSD sets -
> > because it was the last version released under GPLv2 (not sure
> > about the terminology of packages/sets here, but I hope you get the
> > gist). 
> 
> That's right. The system GCC is still 4.2.1 and newer versions have
> to be installed from the ports collection (and are patched to change
> the libstdc++ SONAME).

I'm an OpenBSD dev (working on ports). So, I can clarify some things.

The C/C++ compilers available on OpenBSD are clang (base), gcc 4.2.1
(base), llvm (package, full installation of LLVM, not only clang) and
gcc 8 (package).

Any of that C compilers will work fine but don't forget that OpenBSD
uses libc++ (the c++ stdlib from LLVM), so you are going to have
problems if you mix libstdc++ (from g++) with any of the C++ libs from
packages (linked with libc++).

The final goal is to delete the old version of gcc from base and keep
only clang. Of course, gcc will be always available as package. In
fact, we are using g++ 8 to build the packages on some architectures
(e.g. macppc). Personally, I'm waiting for the gcc 9 update because I
want to play with the new D compiler.

About the terminology. We talk about kernel, base and ports. That's
all. We only consider "supported" OpenBSD installations to systems with
all the sets installed, so the "sets" are not usually mentioned.


-- 
Juan Francisco Cantero Hurtado http://juanfra.info


More information about the cfarm-users mailing list