GCC, the GNU Compiler Collection, supports a number of languages. This
port installs the C, C++, and Fortran front ends as gcc49, g++49, and
gfortran49, respectively.
WWW: https://gcc.gnu.org
Gerald Pfeifer <gerald@FreeBSD.org>
===> The following configuration options are available for gcc49-4.9.4_10:
BOOTSTRAP=on: Build using a full bootstrap
===> Use 'make config' to modify these settings
After five months of deprecation, mark this port for expiration in two
months (end of April 2019).
GCC 4.9 went end-of-life upstream in summer of 2016, so more than
two-and-a-half years ago, nothing depends on it any longer (and has
not for a while), and the default version of GCC in the ports tree
is now GCC 8, four major releases later.
While here stll create a proper USES block in the Makefile. [1]
Reported by: portlint [1]
Install texinfo files (GNU info) into ${PREFIX}/share/info
After a discussion on the mailing list on moving manpages to
${PREFIX}/share/man for consistency with base where it is
installed in usr/share/man, it appeared the same should happen
to GNU info files which were installed under share in base and
not in ports.
Now texinfo is not in base on any of the supported version of FreeBSD
it is possible to proceed to this move and it is easier to do than
the manpage change.
Other benefit than consistency are less patching: all build tools but
cmake are expecting info files to be under share/info and cmake (patched here)
was having an exception for BSD so the patch makes FreeBSD case less
specific for them
Bump revision of all impacted ports
PR: 232907
exp-run by: antoine
Differential Revision: https://reviews.freebsd.org/D17816
After an include, PLIST_SUB must be appended to, not overwritten.
If it is overwritten, many values will be clobbered, and
pain will ensue.
PR: 230864
Submitted by: mat
exp-runs by: antoine
Simplify the setting of CFLAGS where /g is not necessary when substituting
a Makefile variable (since this takes place for every word in the variable,
not just once).
Run "/usr/sbin/service ldconfig restart" for USE_LDCONFIG instead of
"ldconfig -m <path>" so the order of ldconfig search directories after
package installation is the same as after a reboot. The original command
simply appends the path to the list of directories while the ldconfig rc.d
script uses "sort -u".
Bump lang/gcc* which are known to install libraries with exactly the same
name so the library loaded at runtime depends on the order of the search
directories.
PR: 228046
Approved by: portmgr (antoine)
Simplify MASTER_SITES in all GCC-ports related to end-of-lifed releases
(gcc47, gcc48, gcc49, and gcc5), taking advantage of the default for GCC
releases provided by MASTER_SITES_ABBREVS.
Reported by: portlint
Fix builds of lang/gcc{48,49,5} with clang 6.0.0
Since clang++ 6.0.0 now defaults to -std=gnu++14 (similar to g++ 6 and
higher), building gcc48, gcc49 or gcc5 produce quite a number of
"invalid suffix on literal; C++11 requires a space between literal and
identifier" errors. This is because in many places, double quotes are
directly followed by printf helper macros like HOST_WIDE_INT_PRINT.
In gcc 6 and later, spaces were added between the double quotes and the
macros, to fix this issue, but for earlier versions, use a combination
of find, grep and sed to add them mechanically throughout the respective
source trees.
In addition, gcc5 needs a regular patch to fix an incorrect call to
error(), which should have been error_at(). (This was a mismerge by
upstream.)
Approved by: gerald (maintainer)
PR: 224927
MFH: 2018Q1
Backport the change to ensure what we install is stripped (i.e., debug
info is removed) from lang/gcc7 to lang/gcc47, lang/gcc48 and lang/gcc49.
(For more background see revisions 454177 and 454422.)
Reported by: Ports QA Framework, miwi, sobomax
Discussed with: tijl, miwi
Differential Revision: https://reviews.freebsd.org/D10357
Given that GCC 5 has gone end-of-life now, recommend GCC 6 or later
instead of GCC 5 or later in the deprecation messages for lang/gcc46
to lang/gcc49.
Add deprecation notes for lang/gcc47, lang/gcc48, and lang/gcc49,
but no expiration date at this point (since at least the latter two
still have users in the ports tree and sparc64 relies on the latter).
PR: 222373
Submitted by: Yasuhiro KIMURA <yasu@utahime.org>
Backport a number of changes from lang/gcc5:
- Move ONLY_FOR_ARCHS into the right position of the Makefile.
- Omit a comment describing GCC_VERSION and SUFFIX.
- Do not quote constant strings compared with ${ARCH}. [1]
- Last, but not least the only functional change (and an important one):
Remove headers being created by GCC's fixincludes machinery from
the installation / packaging to avoid breakage when FreeBSD's headers
are changing afterwards. [2]
PR: 221905 [1], 222233 [2]
Submitted by: linimon [1]
Remove Java support (both in terms of the JAVA option and everything
associated with it as well as java from CATEGORIES).
In addition to changes to Makefile, pkg-plist, and pkg-descr, this also
removes files/java-patch-hier.
GCC 4.9 was first released in summer 2014 and went end-of-life upstream
a year ago, but GCC 5 is very well established by now and also provides
support for Java (GCJ/libgcj), and so does GCC 6, and this simplifies
this port significantly and also speeds up the build.
While we are here, streamline the setting of INFO.
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.
(Only the first 15 lines of the commit message are shown above )
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]
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)
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
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
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;
(Only the first 15 lines of the commit message are shown above )
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
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.
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.
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
(Only the first 15 lines of the commit message are shown above )
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.
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
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
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@).
The armv6 support added in r376350 requires USES=compiler. It works fine
on 10 and head since bsd.own.mk includes bsd.compiler.mk. This is not the case
on older releases though.
lang/gcc(46,47,48,49,5): Use OPTIONS_EXCLUDE_DragonFly to block JAVA
The JAVA frontend doesn't build on DragonFly on any release. The new
OPTIONS_EXCLUDE_${OPSYS} feature is a nice way to avoid the use of
Makefile.DragonFly (most are in dports, but one is in lang/gcc5).
The recent addition of CXXFLAGS to lang/gcc5 prevents Makefile.DragonFly
on lang/gcc5 from being removed outright. There are a couple of options
available to allow its removal, but I'll need to discuss with Gerald.
Approved by: DragonFly blanket
Fix UNIQUENAME not being unique after recent PORTNAME shuffle.
This was causing the gcc packages to be generated with a
/usr/local/libdata/ldconfig/gcc file. All were conflicting. Bump
PORTREVISION to fix packages built during this time.
With hat: portmgr
Reported by: sunpoet
Add support for armv6*-*-freebsd*.
The large patch is the same as the one from r376266.
The second patch is a temporary fix for the bootstrap failure on all
ARM targets. This fix will be hopefully soon applied to gcc-4.9.x upstream.
Thanks again to Sean Bruno for testing and Gerald for approving.
Approved by: gerald (maintainer)
When building the gcc ports using a full bootstrap, tell the configure
script to assume the BUILD_CONFIG is set to bootstrap-debug, instead of
letting it auto-detect.
With clang 3.5.0 this auto-detection can fail, due to a discrepancy [1]
[2] in its debug information, when objects are produced with and without
-g. When the auto-detection fails, gcc will compare objects with full
debug information during the stage comparisons, and this sometimes
causes those stage comparisons to fail unexpectedly.
[1]
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20141222/250134.html
[2] http://llvm.org/PR22046
Approved by: gerald (maintainer)