Commit graph

133 commits

Author SHA1 Message Date
Gerald Pfeifer
3d1ff1fdae Mk/bsd.gcc.mk: Remove USE_GCC=any
We have recommended against USE_GCC=any for a while, and as of more
recently it was completely equivalent to USE_GCC=yes.

With (ancient versions of) GCC hardly available in the base system
of FreeBSD systems at this point, there's unlikely to be a use case
to reintroduce it, so remove the few remaining traces.

PR:		258015
2021-10-15 17:47:53 +00:00
Gerald Pfeifer
e6d30d6533 Mk/bsd.gcc.mk: Strongly discourage USE_GCC=any
PR:		258015
2021-09-23 18:20:23 +00:00
Gerald Pfeifer
3716b292a8 Mk/bsd.gcc.mk: User newer versions in examples 2021-07-16 12:39:41 +00:00
Gerald Pfeifer
96bb592dd7 Mk/bsd.gcc.mk: Remove support for GCC 7
GCC 7 is way beyond end of life (with even GCC 8 end of life at
this point) and no port in the tree still has USE_GCC=7.
2021-07-01 06:41:39 +00:00
Gerald Pfeifer
8e7d39df85 Mk/bsd.gcc.mk: Adjust to the release of GCC 11
Now that GCC 11.1 has been released and lang/gcc11 is in place,
have USE_GCC=11 use that instead of lang/gcc11-devel.

In addition add support for USE_GCC=12 which uses lang/gcc12-devel
(still in early development, not recommended for production use).
2021-06-21 07:25:53 +00:00
Gerald Pfeifer
96c17633d9 Mk/bsd.gcc.mk: Never use /usr/bin/gcc
USE_GCC=any was introduced to leverage the old version of GCC 4.2
installed as /usr/bin/gcc on some systems. That has increasingly
not been present any longer (not on i386 and amd64 since 12.x and
optionally 11.x, not even on the ppcdevref system according to
linimon@) and hardly anyone actually has been testing ports in
this scenario.

So, finally stop using /usr/bin/gcc (and /usr/bin/gc++ and
/usr/bin/gcpp) even if present.

This makes USE_GCC=any just another way of spelling USE_GCC=yes
before we finally de-orbit it.

Discussed with: mat, linimon, pkubaj
2021-05-29 08:45:12 +00:00
Gerald Pfeifer
768f18f327 Mk/bsd.gcc.mk: Deprecate USE_GCC=any 2021-05-14 13:57:13 +00:00
Mathieu Arnold
5d33e04596
framework: Remove $FreeBSD$
Where appropriate fiddle with a few other things.
2021-04-06 16:27:10 +02:00
Gerald Pfeifer
bba7c61256 In some cases one may want to use GCC to build something when its
runtimes or GCC at runtime are not required.

Introduce an optional argument for USE_GCC that indicates GCC is
only required at build time.

Examples for the new syntax are USE_GCC=yes:build, USE_GCC=9:build,
or USE_GCC=11+:build.

Submitted by:	Fabian Freyer <fabian.freyer@physik.tu-berlin.de>
PR:		211154
Differential Revision:	https://reviews.freebsd.org/D7223
2021-01-30 15:15:01 +00:00
Gerald Pfeifer
8c217050d6 Simplify a comment after r531883 | gerald | 2020-04-16 (which in turn
simplified the structure of Mk/bsd.gcc.mk).
2020-06-20 21:57:57 +00:00
Gerald Pfeifer
d610ef4216 Now that GCC 10.1 has been released and lang/gcc10 arrived to track
GCC 10 releases, switch to that over lang/gcc10-devel when GCC 10 is
requested.

Use lang/gcc11-devel when GCC 11 is requested, but note that this is
absolutely experimental and subject to constant change and likely
breakage over the next half year at least before that release series
enters stabilization.  Use at your own risk.
2020-06-02 08:49:21 +00:00
Gerald Pfeifer
76906e8e9c Add support for GCC 10. That is in the release phase and has not seen
an upstream release yet, so we need to leverage the gcc10-devel port
which we'll replace by gcc10 once that exists.

This is not intended for production use, but to allow for an -exp run
and preparing other ports.
2020-04-26 14:20:35 +00:00
Gerald Pfeifer
c03743e5b7 Finalize the streamlining of data structures holding version-specific
information in the light of us only encountering at most one version
(GCC 4.2) in the base system these days.
2020-04-16 22:25:20 +00:00
Gerald Pfeifer
8b7545172d Simplify the logic by removing a variable (_GCC_PORT_DEPENDS) and
instead use two equivalent ones (depending on the circumstances).
2020-04-09 20:43:02 +00:00
Gerald Pfeifer
1657faebb0 Refactor the handling of USE_GCC=any so that it essentially becomes a
block of its own as opposed to touching bits and pieces throughout.

Use the opportunity to simplify various aspects, such as the static
tables describing versions of GCC we support and their initialization.

Overall this sheds another 30 lines off what used to me more tricky
Makefile code.  It should not change behavior.
2020-04-03 21:46:40 +00:00
Gerald Pfeifer
31bee86ebc Streamline two comments and remove debugging output we hardly need any
longer (and will need even less shortly).
2020-03-12 09:03:04 +00:00
Gerald Pfeifer
8b31f24443 Significantly simplify the logic to determine which port (or base version)
of GCC to use based on the specification of USE_GCC.

This is based on the observation that we now only have a single version
of GCC in base, namely GCC 4.2, which is not in ports any longer.  And
we limit our choice to either the specific version requested or the
default version of GCC in the ports tree; i.e., we no longer consider
an installed port of any version in between (which is a fringe case
extremely few, if any, users would have experienced, and then only
outside a clean build environment in any case).

Streamline some debugging output accordingly.

Overall this removes some 25 lines of largely complex logic.
2020-02-22 10:15:04 +00:00
Gerald Pfeifer
d9ade213a4 With print/pdftk which required GCJ (GNU Java) updated, the last
dependency on GCC 6 in the Ports Collection is gone, so we can remove
support for USE_GCC=6 and USE_GCC=6+. [1]

This does not remove lang/gcc6 yet, but helps avoid new dependencies,
and GCC 6 has been unmaintained upstream for more than a year.

On the way update two examples to use more current versions of GCC.

Thanks to:	tobik [1]
2019-12-31 03:06:49 +00:00
Gerald Pfeifer
b56d93d34f Add support for GCC 9 via the new lang/gcc9 port. USE_GCC=9+ and
USE_GCC=9 (the latter of which should only be used if unavoidable)
are now supported.
2019-06-02 07:55:48 +00:00
Gerald Pfeifer
c169efd9ba Now that the last dependency on GCC 5 (and lang/gcc5) in the Ports
Collection is gone, remove USE_GCC=5 as an option.

This does not remove lang/gcc5 as such, but helps avoid new dependencies
creeping in, in particular since GCC 5 has been unmaintained upstream for
a while.
2019-05-18 07:03:04 +00:00
Gerald Pfeifer
11629b8f60 Remove support for USE_GCC=4.9+ and USE_GCC=4.9 from the tree. Nothing
depends on it any longer (and has for a while) and GCC 4.9 went end of
life upstream in summer 2016.
2019-02-23 06:10:50 +00:00
Andreas Tobler
118dee2cf7 Fix build of GCC on powerpc64.
While building GCC itself we have to use the built GCC libraries to configure
additional parts of GCC and not the libraires from the host.

Install the built 32-bit libraries. This was not done up to now.

PR:	231804
Approved by:	gerald@
2018-12-29 15:38:30 +00:00
Gerald Pfeifer
f3ce3b9d7b Filter -mretpoline, which is specific to clang and not supported by
GCC, from CFLAGS and CXXFLAGS.

This also establishes a good place where to add any additional such
cases in the future.

PR:		230200
Submitted by:	rozhuk.im@gmail.com
2018-08-05 13:30:30 +00:00
Gerald Pfeifer
04d898caf1 Add CXXFLAGS to the debugging output provided by test-gcc and put that,
as well as the existing output for CFLAGS, on a line of its own to make
this easier to parse.
2018-08-05 12:14:28 +00:00
Gerald Pfeifer
ce1a22cc79 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
2018-07-15 05:59:51 +00:00
Gerald Pfeifer
6d96e19baf Document the form USE_GCC=X+ instead of the older form USE_GCC=X.Y+
that has been necessary for the GCC 4.x series and should not see any
new usage anways.

Use more current versions of GCC in examples, choosing the two most
realistic options.
2018-06-02 08:03:59 +00:00
Gerald Pfeifer
9631433bad Connect the new lang/gcc7 port into the infrastructure of Mk/bsd.gcc.mk
(providing USE_GCC) and Mk/bsd.default-versions.mk.

PR:		220794
2017-08-15 12:44:16 +00:00
Gerald Pfeifer
93ad46e402 Remove support for USE_GCC=4.7 and USE_GCC=4.7+. Nothing in the tree
uses it and GCC 4.7 has been end-of-lifed upstream years ago.

The lang/gcc47 port itself is still in place and can be used.
2017-06-05 02:15:22 +00:00
Gerald Pfeifer
d20f742250 As of today, USE_GCC=yes (and USE_GCC=any in most circumstances)
and consequently many of the USES=compiler flavors use the canonical
version of GCC as defined in Mk/bsd.default-versions.mk as well as
the lang/gcc port

With the "new" setup starting with GCC 5 where I have introduced
lang/gcc5-devel for regular snapshots and lang/gcc5 for releases,
and similarly for GCC 6 and onward, we can now leverage lang/gcc5
(and later) for most of the role that lang/gcc used to play -- and
indeed as of today lang/gcc and lang/gcc5 are nearly identical
short of symlinks for gcc, g++, and gfortran binaries that the
former provides.

So now use lang/gcc5 instead of lang/gcc whenever requested via the
USE_GCC framework directly or indirectly.

This is similar to how the python ports work, for example, and it
allows simplifications in Mk/bsd.gcc.mk and Mk/Uses/fortran.mk and
dropping LANG_GCC_IS from Mk/bsd.default-versions.mk.  As a next
step lang/gcc is going to become a "hull" essentially only providing
those symlinks and requiring lang/gcc5 (or whatever has been set as
default in Mk/bsd.default-versions.mk).
2017-05-02 05:40:53 +00:00
Gerald Pfeifer
f18a6f4385 Use USE_GCC=6+ as example for the "+" flavor of USE_GCC instead of
USE_GCC=4.9+.  Among others, this adds an example for the new, single
digit GCC versions.
2017-02-01 19:45:32 +00:00
Gerald Pfeifer
0992d93e8d Remove 4.6 as a valid option for USE_GCC and GCC_DEFAULT; it has not
been used in the Ports Collection for quarters and hardly would make
sense (or even work) as default GCC version.
2017-01-28 22:59:53 +00:00
Mathieu Arnold
0761532ec5 Always include bsd.default-versions.mk in bsd.port.mk.
The variable defined in it are now always available after including
bsd.port.pre.mk.

PR:		210666
Submitted by:	mat
Exp-run by:	antoine
Sponsored by:	Absolight
Differential Revision:	https://reviews.freebsd.org/D6933
2016-08-03 12:09:37 +00:00
Gerald Pfeifer
056ab1b504 Now that lang/gcc6 has landed (which carries official GCC 6.x releases),
add support for USE_GCC=6 and USE_GCC=6+.
2016-06-10 09:11:25 +00:00
Mathieu Arnold
9097255acf Try to be more helpful to our users, and keep all the possible versions
close to their default value in Mk/bsd.default-versions.mk.

Sponsored by:	Absolight
2016-04-14 13:34:25 +00:00
Baptiste Daroussin
421767bd88 Remove the now unneeded ${PORTSDIR} from dependency definition in
The infrastructure Makefiles

PR:		206569
Exp run by:	antoine
Differential Revision:	D5047
2016-03-27 01:23:25 +00:00
Gerald Pfeifer
e7ac27ee6a Since there is not going to be any new version of GCC in the FreeBSD
base system ever again, simplify the GCCVERSION table and logic to not
worry about minimum system versions carrying a certain version of GCC.

This also removes the _GCCVERSION_${v}_R variables and simplifies some
logic and debug output.
2015-04-22 21:29:21 +00:00
Gerald Pfeifer
75339eed28 Move LANG_GCC_IS from bsd.gcc.mk to bsd.default-versions.mk and use
this and GCC_DEFAULT instead of hard-coding the version of GCC used
by lang/gcc in Uses/fortran.mk.

Approved by:	portmgr (antoine)
2015-01-26 00:03:46 +00:00
Gerald Pfeifer
6774a64d23 Rename the somewhat confusingly named GCC_DEFAULT_V to LANG_GCC_IS.
(The regular GCC_DEFAULT is still set in bsd.default-versions.mk.)
2015-01-04 09:29:49 +00:00
Gerald Pfeifer
65136b1b45 Update examples to use GCC 4.9 instead of 4.8, since the latter is now
the default version anyway.
2014-11-07 14:25:20 +00:00
Gerald Pfeifer
742ef83709 Add support for USE_GCC=5 and its preferred form USE_GCC=5+.
PR:		194676
2014-11-02 21:15:21 +00:00
Tijl Coosemans
6defc67c4d Depend on lang/gccXY if users wish to use a different version of gcc by
default than lang/gcc (currently 4.8).

(I don't fully agree with this implementation but this makes something
like DEFAULT_VERSIONS+=gcc=4.9 in make.conf work correctly.)

Reported by:	Luca Pizzamiglio <luca.pizzamiglio@gmail.com>
Approved by:	gerald
2014-09-26 16:00:41 +00:00
Gerald Pfeifer
4c5c0a2c9f Refer to bsd.default-versions.mk for the canonical version of GCC; no
longer duplicate version information related to that.
2014-03-16 00:45:55 +00:00
Gerald Pfeifer
04bfaa8ecd Update the default version of GCC used in the Ports Collection from
GCC 4.6.4 to GCC 4.7.3.  This entails updating the lang/gcc port as
well as changing the default in Mk/bsd.default-versions.mk.

This adds powerpc64 as a supported architecture (and removes ia64,
though it can be supported by manually installing lang/gcc48).

New binaries %%GNU_HOST%%-gcc-ar47, %%GNU_HOST%%-gcc-nm47, and
%%GNU_HOST%%-gcc-ranlib47 are provided to support link-time
optimization (LTO) which scales significantly better.

And it adds support for indirect functions (IFUNCS), experimental
support for transactional memory in the compiler as well as a supporting
run-time library called libitm, a new string length optimization pass,
and support for atomic operations specifying the C++11/C11 memory model.

Version 3.1 of the OpenMP specification is now supported for the C,
C++, and Fortran compilers.

GCC accepts the options -std=c11 and -std=gnu11 for the C11 revision
of the ISO C standard which inlcude support for unicode strings,
nonreturning functions (_Noreturn and <stdnoreturn.h>), alignment
support (_Alignas, _Alignof, max_align_t, <stdalign.h>), and a
__builtin_complex built-in function.

The C++ frontend now accepts the -std=c++11, -std=gnu++11, and
-Wc++11-compat options and implements many C++11 features of the
language including extended friends syntax, explicit override
control, non-static data member initializers, user-defined literals,
alias declarations, delegating constructors, atomic classes, and more.

The C++ standard library and Fortran frontend have received many
improvements.  See http://gcc.gnu.org/gcc-4.7/changes.html for an
extense list of changes; http://gcc.gnu.org/gcc-4.7/porting_to.html
for information on how to port to that new version.

PR:		182136
Supported by:	Christoph Moench-Tegeder <cmt@burggraben.net> (fixing many ports)
Tested by:	bdrewery (two -exp runs)
2014-03-10 20:41:10 +00:00
Gerald Pfeifer
4a3b55d21d Revert bogus parts of revision 345909. 2014-02-25 00:36:48 +00:00
Gerald Pfeifer
260d6903c0 Reword the documentation at the top of this file.
Sort the FPC_DEFAULT and GCC_DEFAULT entries.
2014-02-25 00:32:09 +00:00
Gerald Pfeifer
fadcef2222 Replace all uses of GCC_DEFAULT_VERSION by GCC_DEFAULT, remove the
definition of the former from Mk/bsd.gcc.mk and add the latter --
still set to 4.6 -- to Mk/bsd.default-versions.mk.

Include Mk/bsd.default-versions.mk from Mk/bsd.gcc.mk to tie the
two together.
2014-02-24 22:15:32 +00:00
Gerald Pfeifer
a4c007fb28 Remove the _GCC_BUILD_DEPENDS variable which we had kept for the sake
of some ports using this unexpectedly.  There are no further instances
in the tree any more.

If there is an absolute need to refer to the GCC runtime directory that
cannot be covered by CFLAGS, LDFLAGS or the like, use _GCC_RUNTIME.
This hardly ever should be necessary, though.  Avoid whenever possible!
2014-02-23 02:20:02 +00:00
Tijl Coosemans
564a799c71 Convert all USE_FORTRAN=yes to "USES=fortran, USE_GCC=yes". In most cases
USE_GCC=yes has been omitted though.

Remove USE_FORTRAN handling from bsd.port.mk and bsd.gcc.mk.

Minor cleanups in some ports like USE_GMAKE, NOPORTDOCS,...

Exp-run:	bdrewery
Approved by:	portmgr (bdrewery)
2014-02-16 17:15:31 +00:00
Rene Ladan
0777385b68 Unregister lang/gcc44 now that it is no longer used by any port.
Approved by:	gerald
2014-01-26 16:33:53 +00:00
Rene Ladan
6151ec7beb Disconnect lang/gcc34 from bsd.gcc.mk, it is not used by any port anymore.
This also removes the g77 option of USE_FORTRAN, and USE_GCC now always
implies a dependency on binutils.

Reviewed by:	bapt
Approved by:	maintainer (gerald)
2014-01-04 15:49:15 +00:00