Bug 229681 - bsd.gcc.mk does not recognize gcc8 and gcc9 as valid versions
Summary: bsd.gcc.mk does not recognize gcc8 and gcc9 as valid versions
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Gerald Pfeifer
URL:
Keywords: easy
Depends on:
Blocks:
 
Reported: 2018-07-10 19:26 UTC by Mikhail Teterin
Modified: 2018-07-15 06:01 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mikhail Teterin freebsd_committer freebsd_triage 2018-07-10 19:26:13 UTC
Until I made the change below, adding gcc=gcc8 to DEFAULT_VERSIONS had no positive effect:

--- bsd.gcc.mk  (revision 474372)
+++ bsd.gcc.mk  (working copy)
@@ -35,7 +35,7 @@
 # ascending order and in sync with the table below. 
 # When adding a version, please keep the comment in
 # Mk/bsd.default-versions.mk in sync.
-GCCVERSIONS=   040200 040800 040900 050000 060000 070000
+GCCVERSIONS=   040200 040800 040900 050000 060000 070000 080000
 
 # The first field is the OSVERSION in which it disappeared from the base.
 # The second field is the version as USE_GCC would use.
@@ -45,6 +45,7 @@
 GCCVERSION_050000=           0 5
 GCCVERSION_060000=           0 6
 GCCVERSION_070000=           0 7
+GCCVERSION_080000=           0 8
 
 # No configurable parts below this. ####################################
 #
Comment 1 Gerald Pfeifer freebsd_committer freebsd_triage 2018-07-14 19:59:39 UTC
This is mine, I'll take care.

To actually make recognize GCC 8 as a valid option, we actually need
a lang/gcc8 port; lang/gcc8-devel is tracking snapshots and does not
fit into the framework.

GCC 9 is undergoing early development right now and definitely not
suitable for general usage, so setting it as a default or using it
a la USE_GCC=9 is nothing anyone would recommend supporting.
Comment 2 commit-hook freebsd_committer freebsd_triage 2018-07-14 21:59:40 UTC
A commit references this bug:

Author: gerald
Date: Sat Jul 14 21:59:22 UTC 2018
New revision: 474650
URL: https://svnweb.freebsd.org/changeset/ports/474650

Log:
  Welcome GCC 8.1, the first release of the GCC 8 series!

  https://gcc.gnu.org/gcc-8/changes.html has a comprehensive overview of
  many changes in this release and https://gcc.gnu.org/gcc-8/porting_to.html
  addresses issues you may encounter porting to this new version.

  To provide a brief overview of some of the more noticable changes:

  On the optimization front inter-procedural optimizations (IPO) and profile
  driven optimizations (PDO) have been further improved and some classic loop
  nest optimization passes have been added: -floop-unroll-and-jam performs
  outer loop unrolling and fusing of the inner loop copies, while
  -floop-interchange exchanges loops in a loop nest to improve data locality.
  These, as well as an improved -ftree-loop-distribution pass are enabled by
  default at -O3 and above.

  A new pragma "GCC unroll" has been implemented in the C family of languages
  as well as Fortran to provide finer-grained control over loop unrolling.

  DWARF debugging information in the presence of link-time optimization now
  properly preserves language-specific information.  The -gcolumn-info
  option is now enabled by default, so column information is part of DWARF
  debugging information in addition to filenames and line numbers.

  The C family compilers have gained options -Wmultistatement-macros
  (warning about unsafe macros expanding to multiple statements used
  as a body of a statement such as if, else, while, switch, or for),
  -Wstringop-truncation (warning for calls to bounded string manipulation
  functions such as strncat, strncpy, and stpncpy that might either truncate
  the copied string or leave the destination unchanged), -Wcast-function-type
  (warning when a function pointer is cast to an incompatible function pointer,
  enabled by -Wextra), and -Wsizeof-pointer-div (warning for suspicious
  divisions of the size of a pointer by the size of the elements it points
  to, which usually is an indication of a mistaken way to calculate the
  number of elements in an array, enabled by -Wall), among others.

  The existing -Warray-bounds and -Wrestrict options have been enhanced to
  detect many more instances, as have -Wformat-overflow and -Wformat-truncation.

  Error messages and warnings better highlight the locations of issues in
  many cases, and helpful "fix it" hints are provided more often.

  The C++ ABI (-fabi-version=12) introduces minor changes in a few fringe
  cases.  The GCC 7 ABI can still be selected with -fabi-version=11.

  The C++ frontend as well as libstdc++ feature experimental support for
  many C++2a features and Fortran has seen a large number of improvements.

  Lots and lots of improvements for Arm and AArch64 targets, as well as
  the usual dose on x86 and powerpc.

  PR:		229681

Changes:
  head/lang/Makefile
  head/lang/gcc8/
  head/lang/gcc8/Makefile
  head/lang/gcc8/distinfo
Comment 3 commit-hook freebsd_committer freebsd_triage 2018-07-15 06:00:02 UTC
A commit references this bug:

Author: gerald
Date: Sun Jul 15 05:59:51 UTC 2018
New revision: 474663
URL: https://svnweb.freebsd.org/changeset/ports/474663

Log:
  Add support for GCC 8 (and the newly added lang/gcc8 port).  USE_GCC=8+
  is now feasible, for example.

  PR:		229681
  Submitted by:	mi

Changes:
  head/Mk/bsd.gcc.mk
Comment 4 Gerald Pfeifer freebsd_committer freebsd_triage 2018-07-15 06:01:42 UTC
Thanks for the report, which triggered me completing the work on GCC 8
I had started a while ago.

GCC 9 will have to wait, it's not going to be released before spring 2019. ;-)