5-based ports is necessary for aarch64, armv6 and armv7, but that
we do not need for newer ports). [1]
Shorten the distinct .if statements for architecture-specific settings,
to use .elif instead.
Consulted with: andreast [1]
The straightforward way is setting INSTALL_TARGET to install-strip,
which is supported by the upstream GCC build machinery.
Unfortunately this fails when running as regular user (non-root)
since strip requires write permission to the files in question,
and we install binaries as r-xr-xr-x by default. To work around
that we need to set BINMODE to allow for write access by the user,
something that's common on GNU/Linux (which is why this probably
has not been noticed there). This is not necessary when running
as root.
(A different approach suggested was to set STRIP=true, alas that
leads to many files actually not being stripped. This is due to
GCC using its own script install-sh that in turn uses cp, chmod,
strip,... instead of our own install-* tools in many cases.)
According to tests by sobomax@ and me installs of lang/gcc6 went
down by about a fourth.
Reported by: Ports QA Framework, miwi, sobomax
Discussed with: tijl, miwi
Tested by: sobomax
Differential Revision: https://reviews.freebsd.org/D10357
addresses a real-world issue around threading and unwinding as
files/patch-freebsd-unwind.h .
This will become obsolete with the next release of GCC 7, GCC 7.3.
Bump PORTREVISION since this is a functional change.
some commented (and thus disabled) logic around this on the way.
This brings the active lang/gcc* release-based ports in sync with
their respective lang/gcc*-devel twins.
PR: 221905 [1]
Submitted by: linimon [1]
(via Mk/bsd.default-versions.mk and lang/gcc) which has moved from
GCC 5.4 to GCC 6.4 under most circumstances.
This includes ports
- with USE_GCC=yes or USE_GCC=any,
- with USES=fortran,
- using Mk/bsd.octave.mk which in turn features USES=fortran, and
- with USES=compiler specifying openmp, nestedfct, c++11-lib, c++11-lang,
c++14-lang, c++0x, c11, or gcc-c++11-lib.
PR: 219275
In terms of optimizations, GCC now uses a new local register allocator
(LRA) for most targets (now also including PowerPC and SPARC), a new
store merging pass, is able to determine the return value or range of
return values of some calls to the sprintf family of functions as
input for futher passes, features improved code hoisting, new
interprocedural bitwise constant propagation, interprocedural value
range propagation, new loop splitting, improved shrink-wrapping that
separates portions of prologues and epilogues, and many more.
DWARF 5 is supported through the -gdwarf-5, while DWARF 4 remains the
default for the time being.
The C and C++ frontends have gained a large number of additional
warnings such as -Wpointer-compare, -Wduplicated-branches, -Wrestrict,
-Wmemset-elt-size, -Wint-in-bool-context, -Wswitch-unreachable,
-Wexpansion-to-defined, -Wregister, -Wvla-larger-than=N,
-Wduplicate-decl-specifier, -Wdangling-else, many of which are
enabled by default or at least with -Wall.
The -Wshadow warning has been split into -Wshadow=global, -Wshadow=local,
and -Wshadow=compatible-local .
GCC 7 also brings a number of enhancements that help detect buffer
overflow and other forms of invalid memory accesses, among others
enabled by the -Walloc-size-larger-than= -Walloc-zero, -Walloca, and
-Walloca-larger-than= command-line options.
-Wformat-overflow=level option detects certain and likely buffer
overflow in calls to the sprintf family of formatted output functions;
and -Wformat-truncation= and -Wstringop-overflow= have been added as
well and -Wnunnull enahcned.
So-called fixit hints, that is, notes on how to possibly address
a warning or error have seen signficant improvements.
The command-line option -fdiagnostics-generate-patch will print a
patch in "unified" format after any diagnostics are printed, showing
the result of applying all fix-it hints.
The C front end now supports type names _FloatN for floating-point
types with IEEE interchange formats and _FloatNx for floating-point
types with IEEE extended formats.
The C++ front end has experimental support for all of the current
C++17 draft with the -std=c++1z or -std=gnu++1z flags, including if
constexpr, class template argument deduction, auto template parameters,
and structured bindings. Experimental support for C++17 is in libstdc++
with lots of new features.
libstdc++ Profile Mode and Cilk+ extensions to the C and C++ languages
have been deprecated.
Fortran added a number of extensions for compatibility with legacy code
and improved and add various features.
GCC 7 provides a complete implementation of the Go 1.8.1 user package.
Notably this release ends the history of Java (GCJ and libgcj) as part
of GCC; all traces thereof and options have been removed in favor of
OpenJDK, quite simplifying and streamlining building this port,
Many new processors such as ARM Cortex-A73, Broadcom Vulcan, Cavium
ThunderX models, Qualcomm Falkor (all on the ARM side) and features
such as AVX-512 enhancements (on x86-64) as well as optimization
changes have been added.
On ARM targets (arm*-*-*), a bug introduced in GCC 5 that affects
conformance to the procedure call standard (AAPCS) has been fixed. The
bug affects some C++ code where class objects are passed by value to
functions and could result in incorrect or inconsistent code being
generated. This is an ABI change. If the option -Wpsabi is enabled
(on by default) the compiler will emit a diagnostic note for code that
might be affected.
https://gcc.gnu.org/gcc-7/changes.html has a comprehensive set of
changes and https://gcc.gnu.org/gcc-7/porting_to.html has a helpful
overview of issue you may encountering porting to this new version.
PR: 220794