Pages

Saturday, February 10, 2018

GCC under Solaris 11.4 Beta

It's been quite a while since the last publicly available version of GCC under Solaris.
Particularly under Solaris 11.3 I've described how to install it long ago.
With the release of Solaris 11.4 Beta I decided to quickly review it.

# pkg info -r gcc
          Name: developer/gcc
       Summary: GCC
      Category: Dev.../C (org.opensolaris.category.2008) Dev.../C++
                (org.opensolaris.category.2008) Dev.../Fortran
                (org.opensolaris.category.2008) De.../GNU
                (org.opensolaris.category.2008) Dev.../Objective C
                (org.opensolaris.category.2008)
         State: Not installed
     Publisher: solaris
       Version: 5.5.0
        Branch: 11.4.0.0.0.12.0
Packaging Date: Wed Jan 03 02:32:06 2018
          Size: 2.52 kB
          FMRI: pkg://.../developer/gcc@5.5.0-11.4.0.0.0.12.0:...
   Project URL: http://gcc.gnu.org/
    Source URL: http://ftp.gnu.org/.../gcc-5.5.0.tar.gz


So the available GCC version has bumped from 4.8.2 to 5.5.0.As usual Solaris primes for maturity and stability instead of aggressively pursuing the latest.
But at least version 5.5.0 is currently the very top of the 5 Series.

It may be possible to manually build and package latest versions.
Of course, everything that's manually build isn't supported by Oracle, naturally.

In a very terse way, version 5.5.0 has the following enhancements:
(the complete list can be found on the 5 Series change log)
  • The default C mode is now gnu11 (not gnu89 anymore).
  • The C++ runtime library uses a new ABI by default,
    meaning full support for C++11, including locale facets and more.
    (Oracle may have barricaded from this and I don't know of a simple alternative)
  • Full experimental support for C++14.

Further very essentials have new interesting versions and fixes as well:

# pkg info -r gdb |egrep 'State|Version'
         State: Not installed
       Version: 8.0


# gmake --version
GNU Make 4.2.1
Built for x86_64-pc-solaris2.11
Copyright (C) 1988-2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later ...
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.


The new build-triplet revelead by the updated gmake is reassuring!
It may be (we'll see) a lot easier to get 64-bits userland software built correctly!

In fact, before deciding which packages to add for general development, it may be interesting and useful to carefully browse the list of all available updated GNU packages.

# pkg install --be-name developer-gnu developer-gnu
           Packages to install:  35
           Mediators to change:   2
       Create boot environment: Yes
Create backup boot environment:  No

DOWNLOAD       PKGS         FILES    XFER (MB)   SPEED
Completed     35/35     3402/3402  302.0/302.0      --

PHASE                                          ITEMS
Installing new actions                     4440/4440
...
  
A clone of solaris exists and has been updated and activated.
On the next boot the Boot Environment be://rpool/developer-gnu will be mounted on '/'. Reboot when ready to switch to this updated BE.


The new way of referencing boot environments (as above highlighted) somewhat surprised me. This is new and later I'll get to know more about this and perhaps post on my Solaris blog.

# gcc --version
gcc (GCC) 5.5.0
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  

There is NO warranty; not even for ... (well, nothing).