Commit graph

154 commits

Author SHA1 Message Date
Gerald Pfeifer
d39ad836d1 Update lang/gcc and hence the default version of GCC in the Ports
Collection (requested by USE_GCC=yes and various USES=compiler
invocations) from GCC 4.9.4 to GCC 5.4.

files/patch-arm-support and files/patch-gcc_system.h have become
obsolete.  New patches files/patch-arm-unwind-cxx-support and
files/patch-libc++ help support arm targets and new libc++ in base.

ONLY_FOR_ARCHS now also includes arm.

A new option GRAPHITE_DESC, off by default for now, adds support for
Graphite loop optimizations.

Finally, conflicts with other lang/gcc* ports are adjusted suitably.

In terms of changes for users, this upgrade brings the following:

The default mode for C is now -std=gnu11 instead of -std=gnu89.
New warning options -Wc90-c99-compat and -Wc99-c11-compat may
prove useful on that front.

The C++ front end now has full C++14 language support including
C++14 variable templates, C++14 aggregates with non-static data
member initializers, C++14 extended constexpr, and more.
The Standard C++ Library (libstdc++) has full C++11 support and
experimental full C++14 support.  It uses a new ABI by default.

There have been significant improvements to inter-procedural optimizations
and link-time optimization such as One Definition Rule based merging of C++
types as well as register allocation.

OpenMP 4.0 specification offloading features are now supported by the C,
C++, and Fortran compilers.  Cilk Plus, an extension to the C and C++
languages to support data and task parallelism, has been added as well.

New warning options -Wswitch-bool, -Wlogical-not-parentheses,
-Wbool-compare and -Wsizeof-array-argument may prove useful as
may new preprocessor directives __has_include, __has_include_next,
and __has_attribute.

GCC can now be built as a shared library for embedding in other processes
(such as interpreters), suitable for Just-In-Time compilation to machine
code.  This provides a C API and a C++ wrapper API.

Many code generation improvements for AArch64, ARM, support for
AVX-512{BW,DQ,VL,IFMA,VBMI} and Intel MPX on x86-64, and generally
improvements on many targets.

The Local Register Allocator (LRA) now contains a rematerialization
subpass and is able to reuse the PIC hard register on x86/x86-64 to
improve performance of position independent code.

https://gcc.gnu.org/gcc-5/changes.html has a more extensive set of
changes and https://gcc.gnu.org/gcc-5/porting_to.html has a solid
overview of issue you may encountering porting to this new version.

PR:             216707, 218125
Tested by:      antoine (-exp runs)
Supported by:   jbeich, tcberner, and others
2017-04-01 15:03:21 +00:00
Gerald Pfeifer
0e341eae57 No longer define CPE_VERSION for ports tracking releases of GCC since
there the default of PORTREVISION is just fine.
2017-02-03 15:18:48 +00:00
Gerald Pfeifer
804e74c1a9 Remove extraneous definition of DISTVERSION (which in general we
only need for ports tracking weekly GCC snapshots) and simplify
the definition of GCC_VERSION.

Remove traces of armv6hf which no longer exists as an arch. [1]

Reported by:	andreast [1]
2017-02-03 15:05:38 +00:00
Tijl Coosemans
02f27a83b4 The output of tools like awk, date, sort, tr,... depends on the current
locale set by the user.  Add LANG=C and LC_ALL=C at the beginning of
bsd.port.mk and export them so all commands are executed with the C locale.
LC_ALL=C overrides all other LC_* variables.  LANG is used by setlocale(3)
as default value for LC_* variables, so normally it isn't used when LC_ALL
is set, but there's code out there that looks at LANG directly so it's safer
to set it as well.  The only commands not captured by this are !=
assignments before any inclusion of bsd.port.*mk.

Introduce USE_LOCALE=<locale> that adds LANG=<locale> and LC_ALL=<locale> to
CONFIGURE_ENV and MAKE_ENV so upstream build systems can be executed with a
different locale (e.g. USE_LOCALE=en_US.UTF-8).

PR:		215882
Exp-run by:	antoine
Approved by:	portmgr (antoine)
2017-01-18 13:20:31 +00:00
Gerald Pfeifer
8184c6aabc Copy over files/patch-x86-64-fix-m16 from lang/gcc since both ports are
about the same version of GCC (except lang/gcc will move on to GCC 5).
2016-12-11 16:20:21 +00:00
Gerald Pfeifer
742a14d923 Move the conflict with lang/gcc from lang/gcc48 to lang/gcc49 now that
we have updated lang/gcc to the GCC 4.9 series.  (The direction from
lang/gcc49 to the respective port already has been addressed.)

PR:		196712
2016-11-20 20:34:38 +00:00
Mathieu Arnold
eabbfd75e3 ${RM} already has -f.
PR:		213570
Submitted by:	mat
Exp-run by:	antoine
Sponsored by:	Absolight
2016-10-21 12:51:40 +00:00
Gerald Pfeifer
af418038ab Disable building Java on powerpc64 (option JAVA) by default. It is
causing build failures of the kind

  /usr/local/bin/ld: classpath/tools/.libs/libgcj_tools_la-tools.o:
  unknown relocation type 1383330 for `*UND*'

and generally not that important nor widely used.

Reported by:	swills
Discussed with:	andreast
2016-09-23 16:07:53 +00:00
Dimitry Andric
3768536082 Fix build of lang/gcc49 with libc++ 3.9.0
While testing the clang390-import branch, I ran into the following
errors building lang/gcc49:

In file included from /wrkdirs/usr/ports/lang/gcc49/work/gcc-4.9.4/gcc/c/c-objc-common.c:33:
In file included from /usr/include/c++/v1/new:70:
/usr/include/c++/v1/exception:267:5: error: no member named 'fancy_abort' in namespace 'std::__1'; did you mean simply 'fancy_abort'?
    _VSTD::abort();
    ^~~~~~~
/usr/include/c++/v1/__config:451:15: note: expanded from macro '_VSTD'
#define _VSTD std::_LIBCPP_NAMESPACE
              ^
/wrkdirs/usr/ports/lang/gcc49/work/gcc-4.9.4/gcc/system.h:685:13: note: 'fancy_abort' declared here
extern void fancy_abort (const char *, int, const char *) ATTRIBUTE_NORETURN;
            ^
1 error generated.

What is happening here, is that the source file includes gcc/system.h,
which defines abort to fancy_abort, and then the source file includes
<new>, which attempts to call _VSTD::abort() (the _VSTD is a libc++
alias for std::).  The macro definition then causes the above breakage.

Newer gcc ports, such as gcc5 and gcc6 don't show this issue, because
upstream gcc first added an include of <algorithm> (which indirectly
includes <new>) in r217348 [1], and later even add a direct include of
<new> in r232736 [2].

Fix it for this version, by adding the direct include of <new> to
gcc/system.h.  This makes the 'second' includes of <new> in some .c
files superfluous, but at least they won't result in errors.

[1] https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=217348
[2] https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=232736

Approved by:	gerald (maintainer)
PR:		212465
MFH:		2016Q3
2016-09-09 18:48:24 +00:00
Gerald Pfeifer
78dfd60024 GCC uses an AWK script to generate source code that helps process
command-line options.  According to POSIX, string comparisons (and
hence sorting) are to be performed based on the locale's collating
order.  Alas GNU AWK only does so in POSIX mode, whereas starting
with FreeBSD 11 we do so by default, running into a bug (or false
assumption) with that script used by GCC.

Setting MAKE_ARGS such that AWK is always invoked in the C locale
works around this bug.

PR:		211742
Submitted by:	jkim
2016-08-11 09:40:58 +00:00
Gerald Pfeifer
9771f77f43 Update to the GCC 4.9.4 release which marks the closure of the GCC 4.9
branch and release series.  There should not be any further releases (nor
even snapshots) of GCC 4.9 going forward.

Adjust the download location etc accordingly.
2016-08-03 12:51:26 +00:00
Gerald Pfeifer
ce22e5e4d8 Update to the 20160713 snapshot of GCC 4.9.4. 2016-07-16 14:21:46 +00:00
Gerald Pfeifer
a834131ac8 Update to the 20160608 snapshot of GCC 4.9.4. 2016-06-09 21:12:08 +00:00
Gerald Pfeifer
9daae2f54b Update to the 20160601 snapshot of GCC 4.9.4. 2016-06-04 08:30:30 +00:00
Andreas Tobler
fdbf4ee15e Skip armv6hf support and move it into armv6.
Discussed with: gerald@
2016-06-03 21:24:41 +00:00
Gerald Pfeifer
4c478c6aea Update to the 20160427 snapshot of GCC 4.9.4.
Update MULTILIB_DESC which now matches newer gcc* ports.

Only override CONFIGURE_TARGET for amd64 which is x86-64/x86_64 for the
rest of the world including GNU and GCC.  For all other architectures
it already defaults to the value we were setting.
2016-04-30 21:45:32 +00:00
Jan Beich
70267d209b lang/gcc*: convert to CONFIGURE_OUTSOURCE
PR:		208294, 208309
Exp-run by:	antoine
Approved by:	gerald (maintainer)
Differential Revision:	https://reviews.freebsd.org/D4157
2016-04-13 10:40:58 +00:00
Gerald Pfeifer
b9a623e53c Update to the 20160406 snapshot of GCC 4.9.4, nearing release. 2016-04-12 14:49:33 +00:00
Mathieu Arnold
a9dcad2fff Remove ${PORTSDIR}/ from dependencies, categories h, i, j, k, and l.
With hat:	portmgr
Sponsored by:	Absolight
2016-04-01 14:08:37 +00:00
Gerald Pfeifer
5fb2e0d6fc Update to the 20160210 snapshot of GCC 4.9.4.
Things brings a package of backports/fixes from current mainstream.
2016-02-16 13:37:58 +00:00
Gerald Pfeifer
b562f6487f Update to the 20160203 snapshot of GCC 4.9.4. 2016-02-05 00:16:42 +00:00
Gerald Pfeifer
1c8e0d3257 Update to the 20160113 snapshot of GCC 4.9.4. 2016-01-16 12:15:33 +00:00
Gerald Pfeifer
6ecf038abe Update to the 20151230 snapshot of GCC 4.9.4. 2016-01-04 06:41:29 +00:00
Gerald Pfeifer
170ce5be4e Fix whitespace around powerpc64 options. 2015-12-05 02:13:29 +00:00
Andreas Tobler
c8cf72eae6 Add Java build option for PowerPC64.
Approved by:	gerald (maintainer)
2015-12-04 20:46:58 +00:00
Gerald Pfeifer
e025d390c2 Update to the 20151202 snapshot of GCC 4.9.4.
Pet overeager portlint.
2015-12-03 00:28:41 +00:00
Gerald Pfeifer
da2dd49738 Update to the 20151125 snapshot of GCC 4.9.4. 2015-11-27 23:30:32 +00:00
Julio Merino
dad9e883dd Add a MULTILIB option to gcc{,48,49,5} for powerpc64
This change is the same as r400632, which updated gcc[56]-devel, but now
for gcc{,48,49,5}.  This change is the second attempt at doing this: the
first attempt went in r401072 and was reverted in r401074 because the diff
was bogus and enabled the new MULTILIB option under all platforms instead
of just powerpc64.

This fixes the build of gcc{,48,49,5} under powerpc64 when the system
is built without the lib32 libraries.

More in detail:

If the system is built with lib32 support (WITH_LIB32, which is the default),
building gcc from ports results in a compiler that can target both 64-bit and
32-bit binaries on powerpc64.  However, when lib32 support is disabled
(WITHOUT_LIB32), gcc should only be built with 64-bit support or otherwise
the build fails.

To fix this, explicitly disable 32-bit support when /usr/lib32 is not present
and add a MULTILIB option (which is only defined for powerpc64 when 32-bit
support is possible and defaults to yes to preserve the current behavior) to
allow the user to explicitly control this feature.

Approved by:    gerald (maintainer), bdrewery (mentor), andreast
Differential Revision:  https://reviews.freebsd.org/D3952
2015-11-22 21:06:54 +00:00
Gerald Pfeifer
a93611c0ca Update to the 20151111 snapshot of GCC 4.9.4.
Thanks to andreast@ the patch for PIE support is now upstream,
so drop files/patch-pie-support.
2015-11-12 11:50:15 +00:00
Julio Merino
c7f5a2f84d Revert r401072.
I'm not sure what happened exactly but I think I committed the change from
the wrong client.  The applied change enabled the MULTILIB option for all
architectures and not only powerpc64.  Let's just revert the commit and do
it properly from scratch; other things might be wrong so I wanna take a
closer look, and it's best to just revert quickly.
2015-11-08 20:31:51 +00:00
Julio Merino
c6b41d9541 Add a MULTILIB option to gcc{,48,49,5} for powerpc64
This change is the same as r400632, which updated gcc[56]-devel, but now
for gcc{,48,49,5}.  Waited a week to ensure the change caused nothing to go
horribly wrong but this change is very low risk because it only affects
powerpc64.

This fixes the build of gcc{,48,49,5} under powerpc64 when the system
is built without the lib32 libraries.

More in detail:

If the system is built with lib32 support (WITH_LIB32, which is the default),
building gcc from ports results in a compiler that can target both 64-bit and
32-bit binaries on powerpc64.  However, when lib32 support is disabled
(WITHOUT_LIB32), gcc should only be built with 64-bit support or otherwise
the build fails.

To fix this, explicitly disable 32-bit support when /usr/lib32 is not present
and add a MULTILIB option (which is only defined for powerpc64 when 32-bit
support is possible and defaults to yes to preserve the current behavior) to
allow the user to explicitly control this feature.

Approved by:    gerald (maintainer), bdrewery (mentor), andreast
Differential Revision:  https://reviews.freebsd.org/D3952
2015-11-08 20:09:59 +00:00
Gerald Pfeifer
1f7777a0d6 Update to the 20151028 snapshot of GCC 4.9.4. 2015-10-31 21:35:27 +00:00
Gerald Pfeifer
77664f457c Update to the 20151007 snapshot of GCC 4.9.4. 2015-10-10 14:26:51 +00:00
Gerald Pfeifer
6e9461e005 Update to the 20150916 snapshot of GCC 4.9.4. 2015-10-01 06:24:59 +00:00
Antoine Brodin
67ad2d2460 Remove deprecated @exec/@unexec from ports using ccache-update-links 2015-09-26 11:03:19 +00:00
Gerald Pfeifer
90ede40f81 Update to the 20150819 snapshot of GCC 4.9.4. 2015-08-23 19:37:40 +00:00
Mathieu Arnold
21a283f3be Remove UNIQUENAME and LATEST_LINK.
UNIQUENAME was never unique, it was only used by USE_LDCONFIG and now,
we won't have conflicts there.

Use PKGBASE instead of LATEST_LINK in PKGLATESTFILE, the *only* consumer
is pkg-devel, and it works just fine without LATEST_LINK as pkg-devel
has the correct PKGNAME anyway.

Now that UNIQUENAME is gone, OPTIONSFILE is too. (it's been called
OPTIONS_FILE now.)

Reviewed by:	antoine, bapt
Exp-run by:	antoine
Sponsored by:	Absolight
Differential Revision:	https://reviews.freebsd.org/D3336
2015-08-17 14:20:40 +00:00
Gerald Pfeifer
73b71d6c3f Update to the 20150805 snapshot of GCC 4.9.4. 2015-08-08 20:46:22 +00:00
Gerald Pfeifer
678482b50c Update to the 20150729 snapshot of GCC 4.9.4. 2015-08-03 03:13:50 +00:00
Gerald Pfeifer
8da3203aeb Update to the 20150722 snapshot of GCC 4.9.4. 2015-07-27 12:45:28 +00:00
Gerald Pfeifer
a480a99ded Update to the 20150715 snapshot of GCC 4.9.4. 2015-07-17 22:31:47 +00:00
Gerald Pfeifer
d4175dc880 Update to the 20150708 snapshot of GCC 4.9.4. 2015-07-12 22:48:41 +00:00
Gerald Pfeifer
ebf8b98d42 Update to the 20150701 snapshot of GCC 4.9.4 (a little past the
GCC 4.9.3 release).
2015-07-05 21:47:16 +00:00
Gerald Pfeifer
7901fb50aa Update to the 20150624 snapshot of GCC 4.9.3.
files/patch-pr63740-arm is no longer necessary, this has been
addressed upstream now (thanks to andreast@).
2015-06-26 09:00:57 +00:00
Gerald Pfeifer
b51cdc2366 Update to the 20150617 snapshot of GCC 4.9.3. 2015-06-19 23:50:22 +00:00
Gerald Pfeifer
d594724e37 Update to the 20150610 snapshot of GCC 4.9.3. 2015-06-12 16:46:01 +00:00
Gerald Pfeifer
e569365120 Update to the 20150603 snapshot of GCC 4.9.3. 2015-06-10 08:19:20 +00:00
Andreas Tobler
0280fdf671 Backport PIE support for FreeBSD from GCC trunk.
Approved by:	gerald
2015-06-09 19:59:56 +00:00
Gerald Pfeifer
af5918fa8c Update to the 20150520 snapshot of GCC 4.9.3. 2015-05-23 09:59:22 +00:00
Gerald Pfeifer
64220aa37b Update to the 20150513 snapshot of GCC 4.9.3. 2015-05-19 05:28:25 +00:00