2015-07-27 00:13:17 +02:00
|
|
|
# $NetBSD: gcc.mk,v 1.163 2015/07/26 22:13:17 khorben Exp $
|
2006-10-22 02:14:17 +02:00
|
|
|
#
|
|
|
|
# This is the compiler definition for the GNU Compiler Collection.
|
|
|
|
#
|
2009-03-17 22:28:10 +01:00
|
|
|
# User-settable variables:
|
|
|
|
#
|
2012-07-13 18:11:29 +02:00
|
|
|
# GCCBASE
|
|
|
|
# If using a native GCC and the compiler is not in $PATH then
|
|
|
|
# this should be set to the base installation directory.
|
|
|
|
#
|
2009-03-17 22:28:10 +01:00
|
|
|
# USE_NATIVE_GCC
|
|
|
|
# When set to "yes", the native gcc is used, no matter which
|
|
|
|
# compiler version a package requires.
|
|
|
|
#
|
2012-04-13 05:03:36 +02:00
|
|
|
# USE_PKGSRC_GCC
|
2014-09-06 10:32:55 +02:00
|
|
|
# When set to "yes", use an appropriate version of GCC from
|
|
|
|
# pkgsrc based on GCC_REQD instead of the native compiler.
|
2012-04-13 05:03:36 +02:00
|
|
|
#
|
2012-09-16 14:18:30 +02:00
|
|
|
# USE_PKGSRC_GCC_RUNTIME
|
|
|
|
# When set to "yes", the runtime gcc libraries (libgcc, libstdc++
|
|
|
|
# etc) will be used from pkgsrc rather than the native compiler.
|
|
|
|
#
|
2009-03-17 22:28:10 +01:00
|
|
|
# Package-settable variables:
|
|
|
|
#
|
|
|
|
# GCC_REQD
|
|
|
|
# The minimum version of the GNU Compiler Collection that is
|
|
|
|
# required to build this package. Setting this variable doesn't
|
|
|
|
# change the compiler that is used for building packages. See
|
|
|
|
# ONLY_FOR_COMPILER for that purpose. This is a list of version
|
|
|
|
# numbers, of which the maximum version is the definitive one.
|
|
|
|
#
|
2014-09-06 10:32:55 +02:00
|
|
|
# This variable can also be set by the user when USE_PKGSRC_GCC
|
|
|
|
# is in effect to ensure that a specific compiler is used for
|
|
|
|
# packages which do not specify a higher version.
|
2012-04-13 05:03:36 +02:00
|
|
|
#
|
2012-09-16 14:18:30 +02:00
|
|
|
# USE_GCC_RUNTIME
|
|
|
|
# Packages which build shared libraries but do not use libtool to
|
|
|
|
# do so should define this variable. It is used to determine whether
|
|
|
|
# the gcc runtime should be depended upon when a user has enabled
|
|
|
|
# USE_PKGSRC_GCC_RUNTIME.
|
|
|
|
#
|
2009-03-17 22:28:10 +01:00
|
|
|
# System-defined variables:
|
|
|
|
#
|
|
|
|
# CC_VERSION
|
|
|
|
# A string of the form "gcc-4.3.2"
|
|
|
|
#
|
|
|
|
# CC_VERSION_STRING
|
|
|
|
# The same(?) as CC_VERSION. FIXME: What's the difference between
|
|
|
|
# the two?
|
|
|
|
#
|
|
|
|
# Keywords: gcc
|
|
|
|
#
|
New compiler specification framework, based on mk/compiler.mk. The
changes from the old compiler.mk are:
* Split apart the compiler-specific logic into separate files. This
should make supporting other compilers a bit easier.
* Deprecate all of the USE_* compiler.mk variables, e.g. USE_GCC[23],
USE_SUNPRO, etc. It's all replaced with a new PKGSRC_COMPILER
variable.
* Clean up the GCC handling so that it's all controlled by a single
variable GCC_REQD. The following behaviour is expected:
(a) If USE_PKGSRC_GCC is defined, then pretend there is no GCC on
the system.
(b) If there is no GCC, then the appropriate GCC corresponding to
GCC_REQD is installed and used.
(c) If there is a GCC, if it satisfies GCC_REQD, then use it;
otherwise install and use the appropriate GCC package.
(d) If lang/gcc is installed and GCC_REQD > 2.95.3, then lang/gcc3
is installed and used.
(e) If lang/gcc3 is installed and GCC_REQD = 2.95.3, then gcc3 is
still used instead of installing lang/gcc.
New features include:
* PKGSRC_COMPILER takes a list of values specifying the chain of
compilers to call when building packages. Valid values are:
distcc distributed C/C++ (chainable)
ccache compiler cache (chainable)
gcc GNU
mipspro Silicon Graphics, Inc. MIPSpro
sunpro Sun Microsystems, Inc. WorkShip/Forte/Sun
ONE Studio
The default is "gcc". You can use ccache and/or distcc with an
appropriate PKGSRC_COMPILER setting, e.g. "ccache distcc gcc".
* Change GCC_REQD to hold a list of values that we scan through to
find the highest version of GCC required by the build. Package
Makefiles should now do "GCC_REQD+=..." instead of "GCC_REQD=...".
2004-02-01 01:31:00 +01:00
|
|
|
|
|
|
|
.if !defined(COMPILER_GCC_MK)
|
2004-02-18 14:32:38 +01:00
|
|
|
COMPILER_GCC_MK= defined
|
|
|
|
|
2008-09-16 17:02:55 +02:00
|
|
|
_VARGROUPS+= gcc
|
2012-04-13 05:03:36 +02:00
|
|
|
_USER_VARS.gcc= USE_NATIVE_GCC USE_PKGSRC_GCC
|
2008-09-16 17:02:55 +02:00
|
|
|
_PKG_VARS.gcc= GCC_REQD
|
|
|
|
_SYS_VARS.gcc= CC_VERSION CC_VERSION_STRING LANGUAGES.gcc
|
|
|
|
_DEF_VARS.gcc= \
|
|
|
|
CCPATH CPPPATH CXXPATH \
|
|
|
|
F77PATH FCPATH \
|
compiler.mk/gcc.mk: Add support for USE_LANGUAGES+= ada
All recent packages featuring Ada code have a hard dependency on the
lang/gnat-aux compiler package. The valid values for USE_LANGUAGES
are c, c99, c++, fortran, fortran77, java, objc, so specifying a
specific compiler was necessary up into now.
One problem with lang/gnat-aux is that it is installed at ${LOCALBASE}
where the lang/gccXX compilers are installed at ${LOCALBASE}/gccXX.
The latter compilers have no possibility of sharing conflicting files
unlike lang/gnat-aux. Rather than fundamentally update the GCC 4.6-based
lang/gnat-aux to avoid these conflicts, a new Ada-capable compiler
based on GCC 4.7 was created with the intent of being supported by
mk/compiler.mk and mk/compiler/gcc.mk.
The Ada packages will be effectively migrated from lang/gnat-aux to the
new lang/gcc-aux compiler, but lang/gcc-aux will remain as a standalone
package as it is the only GCC 4.6-based compiler that builds on
DragonFly and serves it as a world and kernel compile option.
In addition to the current language wrappers, lang/gcc-aux adds
wrappers for "ada" (unique to gcc-aux, hardlinked to gcc driver),
and the gnat, gnatmake, gnatbind, gnatlink, gnatchop, gnatprep,
and gnatls programs. Supporting all of these allows the wrapper
system to be used with Ada packages; currently wrappers are mostly
disabled on them.
The lang/gcc47 implicitly adds support for the "objc-c++" language by
adding it to the USE_LANGUAGES list, but it wasn't really supported.
An attempt was made to better support objc-c++, but this new enumeration
probably still needs work or needs to be removed completely.
Logic for Ada support:
1) All lang/gccXX compilers have version numbers ranging from 2.8.1 to 9.
2) lang/gcc-aux uses the release date as its version number in the form of
YYYYMMDD with a minimum value of 20120614, so there is no version
overlap.
3) When at least one element of USE_LANGUAGES is "ada", the value of
20120614 is added to the set of GCC_REQD which selects lang/gcc-aux.
4) The _NEED_NEWER_GCC check is disabled. It fails and isn't relevant;
unless a package sets GCC_REQD over 20120614, the only way to select
lang/gcc-aux is to specify the Ada language and only one compiler
known to gcc.mk can support it.
2012-07-08 21:57:10 +02:00
|
|
|
ADAPATH GMKPATH GLKPATH GDBPATH CHPPATH GLSPATH GNTPATH PRPPATH \
|
2008-09-16 17:02:55 +02:00
|
|
|
IMAKEOPTS \
|
|
|
|
LDFLAGS \
|
|
|
|
PKG_CC PKG_CPP PKG_CXX PKG_FC \
|
compiler.mk/gcc.mk: Add support for USE_LANGUAGES+= ada
All recent packages featuring Ada code have a hard dependency on the
lang/gnat-aux compiler package. The valid values for USE_LANGUAGES
are c, c99, c++, fortran, fortran77, java, objc, so specifying a
specific compiler was necessary up into now.
One problem with lang/gnat-aux is that it is installed at ${LOCALBASE}
where the lang/gccXX compilers are installed at ${LOCALBASE}/gccXX.
The latter compilers have no possibility of sharing conflicting files
unlike lang/gnat-aux. Rather than fundamentally update the GCC 4.6-based
lang/gnat-aux to avoid these conflicts, a new Ada-capable compiler
based on GCC 4.7 was created with the intent of being supported by
mk/compiler.mk and mk/compiler/gcc.mk.
The Ada packages will be effectively migrated from lang/gnat-aux to the
new lang/gcc-aux compiler, but lang/gcc-aux will remain as a standalone
package as it is the only GCC 4.6-based compiler that builds on
DragonFly and serves it as a world and kernel compile option.
In addition to the current language wrappers, lang/gcc-aux adds
wrappers for "ada" (unique to gcc-aux, hardlinked to gcc driver),
and the gnat, gnatmake, gnatbind, gnatlink, gnatchop, gnatprep,
and gnatls programs. Supporting all of these allows the wrapper
system to be used with Ada packages; currently wrappers are mostly
disabled on them.
The lang/gcc47 implicitly adds support for the "objc-c++" language by
adding it to the USE_LANGUAGES list, but it wasn't really supported.
An attempt was made to better support objc-c++, but this new enumeration
probably still needs work or needs to be removed completely.
Logic for Ada support:
1) All lang/gccXX compilers have version numbers ranging from 2.8.1 to 9.
2) lang/gcc-aux uses the release date as its version number in the form of
YYYYMMDD with a minimum value of 20120614, so there is no version
overlap.
3) When at least one element of USE_LANGUAGES is "ada", the value of
20120614 is added to the set of GCC_REQD which selects lang/gcc-aux.
4) The _NEED_NEWER_GCC check is disabled. It fails and isn't relevant;
unless a package sets GCC_REQD over 20120614, the only way to select
lang/gcc-aux is to specify the Ada language and only one compiler
known to gcc.mk can support it.
2012-07-08 21:57:10 +02:00
|
|
|
PKG_ADA PKG_GMK PKG_GLK PKG_GDB PKG_CHP PKG_GLK PKG_GNT PKG_PRP \
|
2008-09-16 17:02:55 +02:00
|
|
|
_CC _COMPILER_RPATH_FLAG _COMPILER_STRIP_VARS \
|
2015-07-27 00:13:17 +02:00
|
|
|
_GCCBINDIR _GCC_ARCHDIR _GCC_BIN_PREFIX _GCC_CC _GCC_CFLAGS \
|
2008-09-16 17:02:55 +02:00
|
|
|
_GCC_CPP _GCC_CXX _GCC_DEPENDENCY _GCC_DEPENDS \
|
|
|
|
_GCC_FC _GCC_LDFLAGS _GCC_LIBDIRS _GCC_PKG \
|
|
|
|
_GCC_PKGBASE _GCC_PKGSRCDIR _GCC_PKG_SATISFIES_DEP \
|
|
|
|
_GCC_PREFIX _GCC_REQD _GCC_STRICTEST_REQD _GCC_SUBPREFIX \
|
2009-07-08 23:25:30 +02:00
|
|
|
_GCC_TEST_DEPENDS _GCC_NEEDS_A_FORTRAN _GCC_VARS _GCC_VERSION \
|
2008-09-16 17:02:55 +02:00
|
|
|
_GCC_VERSION_STRING \
|
compiler.mk/gcc.mk: Add support for USE_LANGUAGES+= ada
All recent packages featuring Ada code have a hard dependency on the
lang/gnat-aux compiler package. The valid values for USE_LANGUAGES
are c, c99, c++, fortran, fortran77, java, objc, so specifying a
specific compiler was necessary up into now.
One problem with lang/gnat-aux is that it is installed at ${LOCALBASE}
where the lang/gccXX compilers are installed at ${LOCALBASE}/gccXX.
The latter compilers have no possibility of sharing conflicting files
unlike lang/gnat-aux. Rather than fundamentally update the GCC 4.6-based
lang/gnat-aux to avoid these conflicts, a new Ada-capable compiler
based on GCC 4.7 was created with the intent of being supported by
mk/compiler.mk and mk/compiler/gcc.mk.
The Ada packages will be effectively migrated from lang/gnat-aux to the
new lang/gcc-aux compiler, but lang/gcc-aux will remain as a standalone
package as it is the only GCC 4.6-based compiler that builds on
DragonFly and serves it as a world and kernel compile option.
In addition to the current language wrappers, lang/gcc-aux adds
wrappers for "ada" (unique to gcc-aux, hardlinked to gcc driver),
and the gnat, gnatmake, gnatbind, gnatlink, gnatchop, gnatprep,
and gnatls programs. Supporting all of these allows the wrapper
system to be used with Ada packages; currently wrappers are mostly
disabled on them.
The lang/gcc47 implicitly adds support for the "objc-c++" language by
adding it to the USE_LANGUAGES list, but it wasn't really supported.
An attempt was made to better support objc-c++, but this new enumeration
probably still needs work or needs to be removed completely.
Logic for Ada support:
1) All lang/gccXX compilers have version numbers ranging from 2.8.1 to 9.
2) lang/gcc-aux uses the release date as its version number in the form of
YYYYMMDD with a minimum value of 20120614, so there is no version
overlap.
3) When at least one element of USE_LANGUAGES is "ada", the value of
20120614 is added to the set of GCC_REQD which selects lang/gcc-aux.
4) The _NEED_NEWER_GCC check is disabled. It fails and isn't relevant;
unless a package sets GCC_REQD over 20120614, the only way to select
lang/gcc-aux is to specify the Ada language and only one compiler
known to gcc.mk can support it.
2012-07-08 21:57:10 +02:00
|
|
|
_GCC_ADA _GCC_GMK _GCC_GLK _GCC_GDB _GCC_CHP _GCC_GLS _GCC_GNT _GCC_PRP \
|
2008-09-16 17:02:55 +02:00
|
|
|
_IGNORE_GCC _IGNORE_GCC3CXX _IGNORE_GCC3F77 _IGNORE_GCC3OBJC \
|
|
|
|
_IS_BUILTIN_GCC \
|
|
|
|
_LANGUAGES.gcc \
|
|
|
|
_LINKER_RPATH_FLAG \
|
2009-09-18 13:27:41 +02:00
|
|
|
_NEED_GCC2 _NEED_GCC3 _NEED_GCC34 _NEED_GCC44 _NEED_NEWER_GCC \
|
2008-09-16 17:02:55 +02:00
|
|
|
_PKGSRC_GCC_VERSION \
|
|
|
|
_USE_GCC_SHLIB _USE_PKGSRC_GCC \
|
|
|
|
_WRAP_EXTRA_ARGS.CC
|
|
|
|
|
2004-02-18 14:32:38 +01:00
|
|
|
.include "../../mk/bsd.prefs.mk"
|
New compiler specification framework, based on mk/compiler.mk. The
changes from the old compiler.mk are:
* Split apart the compiler-specific logic into separate files. This
should make supporting other compilers a bit easier.
* Deprecate all of the USE_* compiler.mk variables, e.g. USE_GCC[23],
USE_SUNPRO, etc. It's all replaced with a new PKGSRC_COMPILER
variable.
* Clean up the GCC handling so that it's all controlled by a single
variable GCC_REQD. The following behaviour is expected:
(a) If USE_PKGSRC_GCC is defined, then pretend there is no GCC on
the system.
(b) If there is no GCC, then the appropriate GCC corresponding to
GCC_REQD is installed and used.
(c) If there is a GCC, if it satisfies GCC_REQD, then use it;
otherwise install and use the appropriate GCC package.
(d) If lang/gcc is installed and GCC_REQD > 2.95.3, then lang/gcc3
is installed and used.
(e) If lang/gcc3 is installed and GCC_REQD = 2.95.3, then gcc3 is
still used instead of installing lang/gcc.
New features include:
* PKGSRC_COMPILER takes a list of values specifying the chain of
compilers to call when building packages. Valid values are:
distcc distributed C/C++ (chainable)
ccache compiler cache (chainable)
gcc GNU
mipspro Silicon Graphics, Inc. MIPSpro
sunpro Sun Microsystems, Inc. WorkShip/Forte/Sun
ONE Studio
The default is "gcc". You can use ccache and/or distcc with an
appropriate PKGSRC_COMPILER setting, e.g. "ccache distcc gcc".
* Change GCC_REQD to hold a list of values that we scan through to
find the highest version of GCC required by the build. Package
Makefiles should now do "GCC_REQD+=..." instead of "GCC_REQD=...".
2004-02-01 01:31:00 +01:00
|
|
|
|
2004-03-13 20:08:37 +01:00
|
|
|
USE_NATIVE_GCC?= no
|
2012-04-13 05:03:36 +02:00
|
|
|
USE_PKGSRC_GCC?= no
|
2012-09-16 14:18:30 +02:00
|
|
|
USE_PKGSRC_GCC_RUNTIME?=no
|
2004-03-13 20:08:37 +01:00
|
|
|
|
2004-02-05 05:12:28 +01:00
|
|
|
GCC_REQD+= 2.8.0
|
New compiler specification framework, based on mk/compiler.mk. The
changes from the old compiler.mk are:
* Split apart the compiler-specific logic into separate files. This
should make supporting other compilers a bit easier.
* Deprecate all of the USE_* compiler.mk variables, e.g. USE_GCC[23],
USE_SUNPRO, etc. It's all replaced with a new PKGSRC_COMPILER
variable.
* Clean up the GCC handling so that it's all controlled by a single
variable GCC_REQD. The following behaviour is expected:
(a) If USE_PKGSRC_GCC is defined, then pretend there is no GCC on
the system.
(b) If there is no GCC, then the appropriate GCC corresponding to
GCC_REQD is installed and used.
(c) If there is a GCC, if it satisfies GCC_REQD, then use it;
otherwise install and use the appropriate GCC package.
(d) If lang/gcc is installed and GCC_REQD > 2.95.3, then lang/gcc3
is installed and used.
(e) If lang/gcc3 is installed and GCC_REQD = 2.95.3, then gcc3 is
still used instead of installing lang/gcc.
New features include:
* PKGSRC_COMPILER takes a list of values specifying the chain of
compilers to call when building packages. Valid values are:
distcc distributed C/C++ (chainable)
ccache compiler cache (chainable)
gcc GNU
mipspro Silicon Graphics, Inc. MIPSpro
sunpro Sun Microsystems, Inc. WorkShip/Forte/Sun
ONE Studio
The default is "gcc". You can use ccache and/or distcc with an
appropriate PKGSRC_COMPILER setting, e.g. "ccache distcc gcc".
* Change GCC_REQD to hold a list of values that we scan through to
find the highest version of GCC required by the build. Package
Makefiles should now do "GCC_REQD+=..." instead of "GCC_REQD=...".
2004-02-01 01:31:00 +01:00
|
|
|
|
2008-11-16 18:01:53 +01:00
|
|
|
# gcc2 doesn't support c99 and amd64
|
|
|
|
.if !empty(USE_LANGUAGES:Mc99) || ${MACHINE_ARCH} == "x86_64"
|
2007-01-08 20:29:45 +01:00
|
|
|
GCC_REQD+= 3.0
|
|
|
|
.endif
|
|
|
|
|
compiler.mk/gcc.mk: Add support for USE_LANGUAGES+= ada
All recent packages featuring Ada code have a hard dependency on the
lang/gnat-aux compiler package. The valid values for USE_LANGUAGES
are c, c99, c++, fortran, fortran77, java, objc, so specifying a
specific compiler was necessary up into now.
One problem with lang/gnat-aux is that it is installed at ${LOCALBASE}
where the lang/gccXX compilers are installed at ${LOCALBASE}/gccXX.
The latter compilers have no possibility of sharing conflicting files
unlike lang/gnat-aux. Rather than fundamentally update the GCC 4.6-based
lang/gnat-aux to avoid these conflicts, a new Ada-capable compiler
based on GCC 4.7 was created with the intent of being supported by
mk/compiler.mk and mk/compiler/gcc.mk.
The Ada packages will be effectively migrated from lang/gnat-aux to the
new lang/gcc-aux compiler, but lang/gcc-aux will remain as a standalone
package as it is the only GCC 4.6-based compiler that builds on
DragonFly and serves it as a world and kernel compile option.
In addition to the current language wrappers, lang/gcc-aux adds
wrappers for "ada" (unique to gcc-aux, hardlinked to gcc driver),
and the gnat, gnatmake, gnatbind, gnatlink, gnatchop, gnatprep,
and gnatls programs. Supporting all of these allows the wrapper
system to be used with Ada packages; currently wrappers are mostly
disabled on them.
The lang/gcc47 implicitly adds support for the "objc-c++" language by
adding it to the USE_LANGUAGES list, but it wasn't really supported.
An attempt was made to better support objc-c++, but this new enumeration
probably still needs work or needs to be removed completely.
Logic for Ada support:
1) All lang/gccXX compilers have version numbers ranging from 2.8.1 to 9.
2) lang/gcc-aux uses the release date as its version number in the form of
YYYYMMDD with a minimum value of 20120614, so there is no version
overlap.
3) When at least one element of USE_LANGUAGES is "ada", the value of
20120614 is added to the set of GCC_REQD which selects lang/gcc-aux.
4) The _NEED_NEWER_GCC check is disabled. It fails and isn't relevant;
unless a package sets GCC_REQD over 20120614, the only way to select
lang/gcc-aux is to specify the Ada language and only one compiler
known to gcc.mk can support it.
2012-07-08 21:57:10 +02:00
|
|
|
# Only one compiler defined here supports Ada: lang/gcc-aux
|
|
|
|
# If the Ada language is requested, force lang/gcc-aux to be selected
|
|
|
|
.if !empty(USE_LANGUAGES:Mada)
|
|
|
|
GCC_REQD+= 20120614
|
|
|
|
.endif
|
|
|
|
|
New compiler specification framework, based on mk/compiler.mk. The
changes from the old compiler.mk are:
* Split apart the compiler-specific logic into separate files. This
should make supporting other compilers a bit easier.
* Deprecate all of the USE_* compiler.mk variables, e.g. USE_GCC[23],
USE_SUNPRO, etc. It's all replaced with a new PKGSRC_COMPILER
variable.
* Clean up the GCC handling so that it's all controlled by a single
variable GCC_REQD. The following behaviour is expected:
(a) If USE_PKGSRC_GCC is defined, then pretend there is no GCC on
the system.
(b) If there is no GCC, then the appropriate GCC corresponding to
GCC_REQD is installed and used.
(c) If there is a GCC, if it satisfies GCC_REQD, then use it;
otherwise install and use the appropriate GCC package.
(d) If lang/gcc is installed and GCC_REQD > 2.95.3, then lang/gcc3
is installed and used.
(e) If lang/gcc3 is installed and GCC_REQD = 2.95.3, then gcc3 is
still used instead of installing lang/gcc.
New features include:
* PKGSRC_COMPILER takes a list of values specifying the chain of
compilers to call when building packages. Valid values are:
distcc distributed C/C++ (chainable)
ccache compiler cache (chainable)
gcc GNU
mipspro Silicon Graphics, Inc. MIPSpro
sunpro Sun Microsystems, Inc. WorkShip/Forte/Sun
ONE Studio
The default is "gcc". You can use ccache and/or distcc with an
appropriate PKGSRC_COMPILER setting, e.g. "ccache distcc gcc".
* Change GCC_REQD to hold a list of values that we scan through to
find the highest version of GCC required by the build. Package
Makefiles should now do "GCC_REQD+=..." instead of "GCC_REQD=...".
2004-02-01 01:31:00 +01:00
|
|
|
# _GCC_DIST_VERSION is the highest version of GCC installed by the pkgsrc
|
|
|
|
# without the PKGREVISIONs.
|
2015-07-16 14:09:04 +02:00
|
|
|
_GCC_DIST_NAME:= gcc5
|
2013-04-20 09:36:17 +02:00
|
|
|
.include "../../lang/${_GCC_DIST_NAME}/version.mk"
|
|
|
|
_GCC_DIST_VERSION:= ${${_GCC_DIST_NAME:tu}_DIST_VERSION}
|
New compiler specification framework, based on mk/compiler.mk. The
changes from the old compiler.mk are:
* Split apart the compiler-specific logic into separate files. This
should make supporting other compilers a bit easier.
* Deprecate all of the USE_* compiler.mk variables, e.g. USE_GCC[23],
USE_SUNPRO, etc. It's all replaced with a new PKGSRC_COMPILER
variable.
* Clean up the GCC handling so that it's all controlled by a single
variable GCC_REQD. The following behaviour is expected:
(a) If USE_PKGSRC_GCC is defined, then pretend there is no GCC on
the system.
(b) If there is no GCC, then the appropriate GCC corresponding to
GCC_REQD is installed and used.
(c) If there is a GCC, if it satisfies GCC_REQD, then use it;
otherwise install and use the appropriate GCC package.
(d) If lang/gcc is installed and GCC_REQD > 2.95.3, then lang/gcc3
is installed and used.
(e) If lang/gcc3 is installed and GCC_REQD = 2.95.3, then gcc3 is
still used instead of installing lang/gcc.
New features include:
* PKGSRC_COMPILER takes a list of values specifying the chain of
compilers to call when building packages. Valid values are:
distcc distributed C/C++ (chainable)
ccache compiler cache (chainable)
gcc GNU
mipspro Silicon Graphics, Inc. MIPSpro
sunpro Sun Microsystems, Inc. WorkShip/Forte/Sun
ONE Studio
The default is "gcc". You can use ccache and/or distcc with an
appropriate PKGSRC_COMPILER setting, e.g. "ccache distcc gcc".
* Change GCC_REQD to hold a list of values that we scan through to
find the highest version of GCC required by the build. Package
Makefiles should now do "GCC_REQD+=..." instead of "GCC_REQD=...".
2004-02-01 01:31:00 +01:00
|
|
|
|
|
|
|
# _GCC2_PATTERNS matches N s.t. N <= 2.95.3.
|
2004-02-20 08:18:19 +01:00
|
|
|
_GCC2_PATTERNS= [0-1].* 2.[0-9] 2.[0-9].* 2.[1-8][0-9] 2.[1-8][0-9].* \
|
New compiler specification framework, based on mk/compiler.mk. The
changes from the old compiler.mk are:
* Split apart the compiler-specific logic into separate files. This
should make supporting other compilers a bit easier.
* Deprecate all of the USE_* compiler.mk variables, e.g. USE_GCC[23],
USE_SUNPRO, etc. It's all replaced with a new PKGSRC_COMPILER
variable.
* Clean up the GCC handling so that it's all controlled by a single
variable GCC_REQD. The following behaviour is expected:
(a) If USE_PKGSRC_GCC is defined, then pretend there is no GCC on
the system.
(b) If there is no GCC, then the appropriate GCC corresponding to
GCC_REQD is installed and used.
(c) If there is a GCC, if it satisfies GCC_REQD, then use it;
otherwise install and use the appropriate GCC package.
(d) If lang/gcc is installed and GCC_REQD > 2.95.3, then lang/gcc3
is installed and used.
(e) If lang/gcc3 is installed and GCC_REQD = 2.95.3, then gcc3 is
still used instead of installing lang/gcc.
New features include:
* PKGSRC_COMPILER takes a list of values specifying the chain of
compilers to call when building packages. Valid values are:
distcc distributed C/C++ (chainable)
ccache compiler cache (chainable)
gcc GNU
mipspro Silicon Graphics, Inc. MIPSpro
sunpro Sun Microsystems, Inc. WorkShip/Forte/Sun
ONE Studio
The default is "gcc". You can use ccache and/or distcc with an
appropriate PKGSRC_COMPILER setting, e.g. "ccache distcc gcc".
* Change GCC_REQD to hold a list of values that we scan through to
find the highest version of GCC required by the build. Package
Makefiles should now do "GCC_REQD+=..." instead of "GCC_REQD=...".
2004-02-01 01:31:00 +01:00
|
|
|
2.9[0-4] 2.9[0-4].* 2.95 2.95.[0-3]
|
|
|
|
|
2004-09-23 17:25:54 +02:00
|
|
|
# _GCC3_PATTERNS matches N s.t. 2.95.3 < N < 3.4.
|
New compiler specification framework, based on mk/compiler.mk. The
changes from the old compiler.mk are:
* Split apart the compiler-specific logic into separate files. This
should make supporting other compilers a bit easier.
* Deprecate all of the USE_* compiler.mk variables, e.g. USE_GCC[23],
USE_SUNPRO, etc. It's all replaced with a new PKGSRC_COMPILER
variable.
* Clean up the GCC handling so that it's all controlled by a single
variable GCC_REQD. The following behaviour is expected:
(a) If USE_PKGSRC_GCC is defined, then pretend there is no GCC on
the system.
(b) If there is no GCC, then the appropriate GCC corresponding to
GCC_REQD is installed and used.
(c) If there is a GCC, if it satisfies GCC_REQD, then use it;
otherwise install and use the appropriate GCC package.
(d) If lang/gcc is installed and GCC_REQD > 2.95.3, then lang/gcc3
is installed and used.
(e) If lang/gcc3 is installed and GCC_REQD = 2.95.3, then gcc3 is
still used instead of installing lang/gcc.
New features include:
* PKGSRC_COMPILER takes a list of values specifying the chain of
compilers to call when building packages. Valid values are:
distcc distributed C/C++ (chainable)
ccache compiler cache (chainable)
gcc GNU
mipspro Silicon Graphics, Inc. MIPSpro
sunpro Sun Microsystems, Inc. WorkShip/Forte/Sun
ONE Studio
The default is "gcc". You can use ccache and/or distcc with an
appropriate PKGSRC_COMPILER setting, e.g. "ccache distcc gcc".
* Change GCC_REQD to hold a list of values that we scan through to
find the highest version of GCC required by the build. Package
Makefiles should now do "GCC_REQD+=..." instead of "GCC_REQD=...".
2004-02-01 01:31:00 +01:00
|
|
|
_GCC3_PATTERNS= 2.95.[4-9]* 2.95.[1-9][0-9]* 2.9[6-9] 2.9[6-9].* \
|
2004-09-23 17:25:54 +02:00
|
|
|
2.[1-9][0-9][0-9]* 3.[0-3] 3.[0-3].*
|
|
|
|
|
2009-09-18 13:27:41 +02:00
|
|
|
# _GCC34_PATTERNS matches N s.t. 3.4 <= N < 4.
|
|
|
|
_GCC34_PATTERNS= 3.[4-9] 3.[4-9].* 3.[1-9][0-9]*
|
|
|
|
|
2011-06-10 10:59:58 +02:00
|
|
|
# _GCC44_PATTERNS matches N s.t. 4.4 <= N < 4.5.
|
|
|
|
_GCC44_PATTERNS= 4.4 4.4.*
|
|
|
|
|
|
|
|
# _GCC45_PATTERNS matches N s.t. 4.5 <= N < 4.6.
|
|
|
|
_GCC45_PATTERNS= 4.5 4.5.*
|
|
|
|
|
2012-04-16 07:03:03 +02:00
|
|
|
# _GCC46_PATTERNS matches N s.t. 4.6 <= N < 4.7.
|
|
|
|
_GCC46_PATTERNS= 4.6 4.6.*
|
|
|
|
|
2013-04-01 23:06:57 +02:00
|
|
|
# _GCC47_PATTERNS matches N s.t. 4.7 <= N < 4.8.
|
|
|
|
_GCC47_PATTERNS= 4.7 4.7.*
|
|
|
|
|
2014-06-01 10:14:27 +02:00
|
|
|
# _GCC48_PATTERNS matches N s.t. 4.8 <= N < 4.9.
|
|
|
|
_GCC48_PATTERNS= 4.8 4.8.*
|
New compiler specification framework, based on mk/compiler.mk. The
changes from the old compiler.mk are:
* Split apart the compiler-specific logic into separate files. This
should make supporting other compilers a bit easier.
* Deprecate all of the USE_* compiler.mk variables, e.g. USE_GCC[23],
USE_SUNPRO, etc. It's all replaced with a new PKGSRC_COMPILER
variable.
* Clean up the GCC handling so that it's all controlled by a single
variable GCC_REQD. The following behaviour is expected:
(a) If USE_PKGSRC_GCC is defined, then pretend there is no GCC on
the system.
(b) If there is no GCC, then the appropriate GCC corresponding to
GCC_REQD is installed and used.
(c) If there is a GCC, if it satisfies GCC_REQD, then use it;
otherwise install and use the appropriate GCC package.
(d) If lang/gcc is installed and GCC_REQD > 2.95.3, then lang/gcc3
is installed and used.
(e) If lang/gcc3 is installed and GCC_REQD = 2.95.3, then gcc3 is
still used instead of installing lang/gcc.
New features include:
* PKGSRC_COMPILER takes a list of values specifying the chain of
compilers to call when building packages. Valid values are:
distcc distributed C/C++ (chainable)
ccache compiler cache (chainable)
gcc GNU
mipspro Silicon Graphics, Inc. MIPSpro
sunpro Sun Microsystems, Inc. WorkShip/Forte/Sun
ONE Studio
The default is "gcc". You can use ccache and/or distcc with an
appropriate PKGSRC_COMPILER setting, e.g. "ccache distcc gcc".
* Change GCC_REQD to hold a list of values that we scan through to
find the highest version of GCC required by the build. Package
Makefiles should now do "GCC_REQD+=..." instead of "GCC_REQD=...".
2004-02-01 01:31:00 +01:00
|
|
|
|
2014-09-04 20:52:53 +02:00
|
|
|
# _GCC49_PATTERNS matches N s.t. 4.9 <= N < 4.10.
|
|
|
|
_GCC49_PATTERNS= 4.9 4.9.*
|
|
|
|
|
2015-07-16 14:09:04 +02:00
|
|
|
# _GCC5_PATTERNS matches N s.t. 5.0 <= N < 6.
|
|
|
|
_GCC5_PATTERNS= 5.*
|
|
|
|
|
compiler.mk/gcc.mk: Add support for USE_LANGUAGES+= ada
All recent packages featuring Ada code have a hard dependency on the
lang/gnat-aux compiler package. The valid values for USE_LANGUAGES
are c, c99, c++, fortran, fortran77, java, objc, so specifying a
specific compiler was necessary up into now.
One problem with lang/gnat-aux is that it is installed at ${LOCALBASE}
where the lang/gccXX compilers are installed at ${LOCALBASE}/gccXX.
The latter compilers have no possibility of sharing conflicting files
unlike lang/gnat-aux. Rather than fundamentally update the GCC 4.6-based
lang/gnat-aux to avoid these conflicts, a new Ada-capable compiler
based on GCC 4.7 was created with the intent of being supported by
mk/compiler.mk and mk/compiler/gcc.mk.
The Ada packages will be effectively migrated from lang/gnat-aux to the
new lang/gcc-aux compiler, but lang/gcc-aux will remain as a standalone
package as it is the only GCC 4.6-based compiler that builds on
DragonFly and serves it as a world and kernel compile option.
In addition to the current language wrappers, lang/gcc-aux adds
wrappers for "ada" (unique to gcc-aux, hardlinked to gcc driver),
and the gnat, gnatmake, gnatbind, gnatlink, gnatchop, gnatprep,
and gnatls programs. Supporting all of these allows the wrapper
system to be used with Ada packages; currently wrappers are mostly
disabled on them.
The lang/gcc47 implicitly adds support for the "objc-c++" language by
adding it to the USE_LANGUAGES list, but it wasn't really supported.
An attempt was made to better support objc-c++, but this new enumeration
probably still needs work or needs to be removed completely.
Logic for Ada support:
1) All lang/gccXX compilers have version numbers ranging from 2.8.1 to 9.
2) lang/gcc-aux uses the release date as its version number in the form of
YYYYMMDD with a minimum value of 20120614, so there is no version
overlap.
3) When at least one element of USE_LANGUAGES is "ada", the value of
20120614 is added to the set of GCC_REQD which selects lang/gcc-aux.
4) The _NEED_NEWER_GCC check is disabled. It fails and isn't relevant;
unless a package sets GCC_REQD over 20120614, the only way to select
lang/gcc-aux is to specify the Ada language and only one compiler
known to gcc.mk can support it.
2012-07-08 21:57:10 +02:00
|
|
|
# _GCC_AUX_PATTERNS matches 8-digit date YYYYMMDD*
|
|
|
|
_GCC_AUX_PATTERNS= 20[1-2][0-9][0-1][0-9][0-3][0-9]*
|
|
|
|
|
2004-03-13 18:52:24 +01:00
|
|
|
# _CC is the full path to the compiler named by ${CC} if it can be found.
|
2004-02-18 14:32:38 +01:00
|
|
|
.if !defined(_CC)
|
2004-02-05 02:50:55 +01:00
|
|
|
_CC:= ${CC:C/^/_asdf_/1:M_asdf_*:S/^_asdf_//}
|
2012-07-13 18:11:29 +02:00
|
|
|
. if !empty(GCCBASE) && exists(${GCCBASE}/bin)
|
|
|
|
_EXTRA_CC_DIRS= ${GCCBASE}/bin
|
|
|
|
. endif
|
|
|
|
. for _dir_ in ${_EXTRA_CC_DIRS} ${PATH:C/\:/ /g}
|
2004-02-18 14:32:38 +01:00
|
|
|
. if empty(_CC:M/*)
|
|
|
|
. if exists(${_dir_}/${CC:C/^/_asdf_/1:M_asdf_*:S/^_asdf_//})
|
2004-02-05 02:50:55 +01:00
|
|
|
_CC:= ${_dir_}/${CC:C/^/_asdf_/1:M_asdf_*:S/^_asdf_//}
|
2004-02-05 04:35:20 +01:00
|
|
|
. endif
|
2004-02-18 14:32:38 +01:00
|
|
|
. endif
|
|
|
|
. endfor
|
2004-02-06 19:45:02 +01:00
|
|
|
MAKEFLAGS+= _CC=${_CC:Q}
|
2004-02-18 14:32:38 +01:00
|
|
|
.endif
|
2004-02-04 01:11:07 +01:00
|
|
|
|
2004-02-18 14:32:38 +01:00
|
|
|
.if !defined(_GCC_VERSION)
|
2012-07-27 12:34:00 +02:00
|
|
|
#
|
|
|
|
# FIXME: Ideally we'd use PKGSRC_SETENV here, but not enough of the tools
|
|
|
|
# infrastructure is loaded for SETENV to be defined when mk/compiler.mk is
|
|
|
|
# included first. LC_ALL is required here for similar reasons, as ALL_ENV
|
|
|
|
# is not defined at this stage.
|
|
|
|
#
|
2011-09-08 22:17:15 +02:00
|
|
|
_GCC_VERSION_STRING!= \
|
2012-07-27 12:34:00 +02:00
|
|
|
( env LC_ALL=C ${_CC} -v 2>&1 | ${GREP} 'gcc version') 2>/dev/null || ${ECHO} 0
|
2004-02-18 14:32:38 +01:00
|
|
|
. if !empty(_GCC_VERSION_STRING:Megcs*)
|
2004-02-04 01:11:07 +01:00
|
|
|
_GCC_VERSION= 2.8.1 # egcs is considered to be gcc-2.8.1.
|
2012-12-12 21:49:01 +01:00
|
|
|
. elif !empty(DRAGONFLY_CCVER) && ${OPSYS} == "DragonFly"
|
|
|
|
_GCC_VERSION!= env CCVER=${DRAGONFLY_CCVER} ${_CC} -dumpversion
|
2004-02-18 14:32:38 +01:00
|
|
|
. elif !empty(_GCC_VERSION_STRING:Mgcc*)
|
2004-02-04 01:11:07 +01:00
|
|
|
_GCC_VERSION!= ${_CC} -dumpversion
|
2004-02-18 14:32:38 +01:00
|
|
|
. else
|
2004-02-04 01:11:07 +01:00
|
|
|
_GCC_VERSION= 0
|
|
|
|
. endif
|
2004-02-18 14:32:38 +01:00
|
|
|
.endif
|
2010-04-24 10:33:19 +02:00
|
|
|
_GCC_PKG= gcc-${_GCC_VERSION:C/-.*$//}
|
2004-02-04 01:11:07 +01:00
|
|
|
|
2004-02-18 14:32:38 +01:00
|
|
|
.if !empty(_CC:M${LOCALBASE}/*)
|
2004-02-04 01:11:07 +01:00
|
|
|
_IS_BUILTIN_GCC= NO
|
|
|
|
GCC_REQD+= ${_GCC_VERSION}
|
2004-02-18 14:32:38 +01:00
|
|
|
.else
|
|
|
|
. if !empty(_CC:M/*)
|
2004-02-04 01:11:07 +01:00
|
|
|
#
|
|
|
|
# GCC in older versions of Darwin report "Apple Computer ... based on gcc
|
|
|
|
# version ...", so we can't just grep for "^gcc".
|
|
|
|
#
|
2004-02-18 14:32:38 +01:00
|
|
|
. if ${_GCC_VERSION} != "0"
|
2004-02-04 01:11:07 +01:00
|
|
|
_IS_BUILTIN_GCC= YES
|
|
|
|
. else
|
|
|
|
_IS_BUILTIN_GCC= NO
|
|
|
|
. endif
|
2004-02-18 14:32:38 +01:00
|
|
|
. else
|
|
|
|
_IS_BUILTIN_GCC= NO
|
2004-02-04 01:11:07 +01:00
|
|
|
. endif
|
2004-02-18 14:32:38 +01:00
|
|
|
.endif
|
2004-02-04 01:11:07 +01:00
|
|
|
|
New compiler specification framework, based on mk/compiler.mk. The
changes from the old compiler.mk are:
* Split apart the compiler-specific logic into separate files. This
should make supporting other compilers a bit easier.
* Deprecate all of the USE_* compiler.mk variables, e.g. USE_GCC[23],
USE_SUNPRO, etc. It's all replaced with a new PKGSRC_COMPILER
variable.
* Clean up the GCC handling so that it's all controlled by a single
variable GCC_REQD. The following behaviour is expected:
(a) If USE_PKGSRC_GCC is defined, then pretend there is no GCC on
the system.
(b) If there is no GCC, then the appropriate GCC corresponding to
GCC_REQD is installed and used.
(c) If there is a GCC, if it satisfies GCC_REQD, then use it;
otherwise install and use the appropriate GCC package.
(d) If lang/gcc is installed and GCC_REQD > 2.95.3, then lang/gcc3
is installed and used.
(e) If lang/gcc3 is installed and GCC_REQD = 2.95.3, then gcc3 is
still used instead of installing lang/gcc.
New features include:
* PKGSRC_COMPILER takes a list of values specifying the chain of
compilers to call when building packages. Valid values are:
distcc distributed C/C++ (chainable)
ccache compiler cache (chainable)
gcc GNU
mipspro Silicon Graphics, Inc. MIPSpro
sunpro Sun Microsystems, Inc. WorkShip/Forte/Sun
ONE Studio
The default is "gcc". You can use ccache and/or distcc with an
appropriate PKGSRC_COMPILER setting, e.g. "ccache distcc gcc".
* Change GCC_REQD to hold a list of values that we scan through to
find the highest version of GCC required by the build. Package
Makefiles should now do "GCC_REQD+=..." instead of "GCC_REQD=...".
2004-02-01 01:31:00 +01:00
|
|
|
# Distill the GCC_REQD list into a single _GCC_REQD value that is the
|
|
|
|
# highest version of GCC required.
|
|
|
|
#
|
|
|
|
_GCC_STRICTEST_REQD?= none
|
2004-02-18 14:32:38 +01:00
|
|
|
.for _version_ in ${GCC_REQD}
|
|
|
|
. for _pkg_ in gcc-${_version_}
|
|
|
|
. if ${_GCC_STRICTEST_REQD} == "none"
|
New compiler specification framework, based on mk/compiler.mk. The
changes from the old compiler.mk are:
* Split apart the compiler-specific logic into separate files. This
should make supporting other compilers a bit easier.
* Deprecate all of the USE_* compiler.mk variables, e.g. USE_GCC[23],
USE_SUNPRO, etc. It's all replaced with a new PKGSRC_COMPILER
variable.
* Clean up the GCC handling so that it's all controlled by a single
variable GCC_REQD. The following behaviour is expected:
(a) If USE_PKGSRC_GCC is defined, then pretend there is no GCC on
the system.
(b) If there is no GCC, then the appropriate GCC corresponding to
GCC_REQD is installed and used.
(c) If there is a GCC, if it satisfies GCC_REQD, then use it;
otherwise install and use the appropriate GCC package.
(d) If lang/gcc is installed and GCC_REQD > 2.95.3, then lang/gcc3
is installed and used.
(e) If lang/gcc3 is installed and GCC_REQD = 2.95.3, then gcc3 is
still used instead of installing lang/gcc.
New features include:
* PKGSRC_COMPILER takes a list of values specifying the chain of
compilers to call when building packages. Valid values are:
distcc distributed C/C++ (chainable)
ccache compiler cache (chainable)
gcc GNU
mipspro Silicon Graphics, Inc. MIPSpro
sunpro Sun Microsystems, Inc. WorkShip/Forte/Sun
ONE Studio
The default is "gcc". You can use ccache and/or distcc with an
appropriate PKGSRC_COMPILER setting, e.g. "ccache distcc gcc".
* Change GCC_REQD to hold a list of values that we scan through to
find the highest version of GCC required by the build. Package
Makefiles should now do "GCC_REQD+=..." instead of "GCC_REQD=...".
2004-02-01 01:31:00 +01:00
|
|
|
_GCC_PKG_SATISFIES_DEP= YES
|
2004-02-18 14:32:38 +01:00
|
|
|
. for _vers_ in ${GCC_REQD}
|
|
|
|
. if !empty(_GCC_PKG_SATISFIES_DEP:M[yY][eE][sS])
|
New compiler specification framework, based on mk/compiler.mk. The
changes from the old compiler.mk are:
* Split apart the compiler-specific logic into separate files. This
should make supporting other compilers a bit easier.
* Deprecate all of the USE_* compiler.mk variables, e.g. USE_GCC[23],
USE_SUNPRO, etc. It's all replaced with a new PKGSRC_COMPILER
variable.
* Clean up the GCC handling so that it's all controlled by a single
variable GCC_REQD. The following behaviour is expected:
(a) If USE_PKGSRC_GCC is defined, then pretend there is no GCC on
the system.
(b) If there is no GCC, then the appropriate GCC corresponding to
GCC_REQD is installed and used.
(c) If there is a GCC, if it satisfies GCC_REQD, then use it;
otherwise install and use the appropriate GCC package.
(d) If lang/gcc is installed and GCC_REQD > 2.95.3, then lang/gcc3
is installed and used.
(e) If lang/gcc3 is installed and GCC_REQD = 2.95.3, then gcc3 is
still used instead of installing lang/gcc.
New features include:
* PKGSRC_COMPILER takes a list of values specifying the chain of
compilers to call when building packages. Valid values are:
distcc distributed C/C++ (chainable)
ccache compiler cache (chainable)
gcc GNU
mipspro Silicon Graphics, Inc. MIPSpro
sunpro Sun Microsystems, Inc. WorkShip/Forte/Sun
ONE Studio
The default is "gcc". You can use ccache and/or distcc with an
appropriate PKGSRC_COMPILER setting, e.g. "ccache distcc gcc".
* Change GCC_REQD to hold a list of values that we scan through to
find the highest version of GCC required by the build. Package
Makefiles should now do "GCC_REQD+=..." instead of "GCC_REQD=...".
2004-02-01 01:31:00 +01:00
|
|
|
_GCC_PKG_SATISFIES_DEP!= \
|
2004-03-13 20:08:37 +01:00
|
|
|
if ${PKG_ADMIN} pmatch 'gcc>=${_vers_}' ${_pkg_} 2>/dev/null; then \
|
New compiler specification framework, based on mk/compiler.mk. The
changes from the old compiler.mk are:
* Split apart the compiler-specific logic into separate files. This
should make supporting other compilers a bit easier.
* Deprecate all of the USE_* compiler.mk variables, e.g. USE_GCC[23],
USE_SUNPRO, etc. It's all replaced with a new PKGSRC_COMPILER
variable.
* Clean up the GCC handling so that it's all controlled by a single
variable GCC_REQD. The following behaviour is expected:
(a) If USE_PKGSRC_GCC is defined, then pretend there is no GCC on
the system.
(b) If there is no GCC, then the appropriate GCC corresponding to
GCC_REQD is installed and used.
(c) If there is a GCC, if it satisfies GCC_REQD, then use it;
otherwise install and use the appropriate GCC package.
(d) If lang/gcc is installed and GCC_REQD > 2.95.3, then lang/gcc3
is installed and used.
(e) If lang/gcc3 is installed and GCC_REQD = 2.95.3, then gcc3 is
still used instead of installing lang/gcc.
New features include:
* PKGSRC_COMPILER takes a list of values specifying the chain of
compilers to call when building packages. Valid values are:
distcc distributed C/C++ (chainable)
ccache compiler cache (chainable)
gcc GNU
mipspro Silicon Graphics, Inc. MIPSpro
sunpro Sun Microsystems, Inc. WorkShip/Forte/Sun
ONE Studio
The default is "gcc". You can use ccache and/or distcc with an
appropriate PKGSRC_COMPILER setting, e.g. "ccache distcc gcc".
* Change GCC_REQD to hold a list of values that we scan through to
find the highest version of GCC required by the build. Package
Makefiles should now do "GCC_REQD+=..." instead of "GCC_REQD=...".
2004-02-01 01:31:00 +01:00
|
|
|
${ECHO} "YES"; \
|
|
|
|
else \
|
|
|
|
${ECHO} "NO"; \
|
|
|
|
fi
|
2004-02-05 04:35:20 +01:00
|
|
|
. endif
|
2004-02-18 14:32:38 +01:00
|
|
|
. endfor
|
|
|
|
. if !empty(_GCC_PKG_SATISFIES_DEP:M[yY][eE][sS])
|
|
|
|
_GCC_STRICTEST_REQD= ${_version_}
|
New compiler specification framework, based on mk/compiler.mk. The
changes from the old compiler.mk are:
* Split apart the compiler-specific logic into separate files. This
should make supporting other compilers a bit easier.
* Deprecate all of the USE_* compiler.mk variables, e.g. USE_GCC[23],
USE_SUNPRO, etc. It's all replaced with a new PKGSRC_COMPILER
variable.
* Clean up the GCC handling so that it's all controlled by a single
variable GCC_REQD. The following behaviour is expected:
(a) If USE_PKGSRC_GCC is defined, then pretend there is no GCC on
the system.
(b) If there is no GCC, then the appropriate GCC corresponding to
GCC_REQD is installed and used.
(c) If there is a GCC, if it satisfies GCC_REQD, then use it;
otherwise install and use the appropriate GCC package.
(d) If lang/gcc is installed and GCC_REQD > 2.95.3, then lang/gcc3
is installed and used.
(e) If lang/gcc3 is installed and GCC_REQD = 2.95.3, then gcc3 is
still used instead of installing lang/gcc.
New features include:
* PKGSRC_COMPILER takes a list of values specifying the chain of
compilers to call when building packages. Valid values are:
distcc distributed C/C++ (chainable)
ccache compiler cache (chainable)
gcc GNU
mipspro Silicon Graphics, Inc. MIPSpro
sunpro Sun Microsystems, Inc. WorkShip/Forte/Sun
ONE Studio
The default is "gcc". You can use ccache and/or distcc with an
appropriate PKGSRC_COMPILER setting, e.g. "ccache distcc gcc".
* Change GCC_REQD to hold a list of values that we scan through to
find the highest version of GCC required by the build. Package
Makefiles should now do "GCC_REQD+=..." instead of "GCC_REQD=...".
2004-02-01 01:31:00 +01:00
|
|
|
. endif
|
2004-02-18 14:32:38 +01:00
|
|
|
. endif
|
New compiler specification framework, based on mk/compiler.mk. The
changes from the old compiler.mk are:
* Split apart the compiler-specific logic into separate files. This
should make supporting other compilers a bit easier.
* Deprecate all of the USE_* compiler.mk variables, e.g. USE_GCC[23],
USE_SUNPRO, etc. It's all replaced with a new PKGSRC_COMPILER
variable.
* Clean up the GCC handling so that it's all controlled by a single
variable GCC_REQD. The following behaviour is expected:
(a) If USE_PKGSRC_GCC is defined, then pretend there is no GCC on
the system.
(b) If there is no GCC, then the appropriate GCC corresponding to
GCC_REQD is installed and used.
(c) If there is a GCC, if it satisfies GCC_REQD, then use it;
otherwise install and use the appropriate GCC package.
(d) If lang/gcc is installed and GCC_REQD > 2.95.3, then lang/gcc3
is installed and used.
(e) If lang/gcc3 is installed and GCC_REQD = 2.95.3, then gcc3 is
still used instead of installing lang/gcc.
New features include:
* PKGSRC_COMPILER takes a list of values specifying the chain of
compilers to call when building packages. Valid values are:
distcc distributed C/C++ (chainable)
ccache compiler cache (chainable)
gcc GNU
mipspro Silicon Graphics, Inc. MIPSpro
sunpro Sun Microsystems, Inc. WorkShip/Forte/Sun
ONE Studio
The default is "gcc". You can use ccache and/or distcc with an
appropriate PKGSRC_COMPILER setting, e.g. "ccache distcc gcc".
* Change GCC_REQD to hold a list of values that we scan through to
find the highest version of GCC required by the build. Package
Makefiles should now do "GCC_REQD+=..." instead of "GCC_REQD=...".
2004-02-01 01:31:00 +01:00
|
|
|
. endfor
|
2004-02-18 14:32:38 +01:00
|
|
|
.endfor
|
New compiler specification framework, based on mk/compiler.mk. The
changes from the old compiler.mk are:
* Split apart the compiler-specific logic into separate files. This
should make supporting other compilers a bit easier.
* Deprecate all of the USE_* compiler.mk variables, e.g. USE_GCC[23],
USE_SUNPRO, etc. It's all replaced with a new PKGSRC_COMPILER
variable.
* Clean up the GCC handling so that it's all controlled by a single
variable GCC_REQD. The following behaviour is expected:
(a) If USE_PKGSRC_GCC is defined, then pretend there is no GCC on
the system.
(b) If there is no GCC, then the appropriate GCC corresponding to
GCC_REQD is installed and used.
(c) If there is a GCC, if it satisfies GCC_REQD, then use it;
otherwise install and use the appropriate GCC package.
(d) If lang/gcc is installed and GCC_REQD > 2.95.3, then lang/gcc3
is installed and used.
(e) If lang/gcc3 is installed and GCC_REQD = 2.95.3, then gcc3 is
still used instead of installing lang/gcc.
New features include:
* PKGSRC_COMPILER takes a list of values specifying the chain of
compilers to call when building packages. Valid values are:
distcc distributed C/C++ (chainable)
ccache compiler cache (chainable)
gcc GNU
mipspro Silicon Graphics, Inc. MIPSpro
sunpro Sun Microsystems, Inc. WorkShip/Forte/Sun
ONE Studio
The default is "gcc". You can use ccache and/or distcc with an
appropriate PKGSRC_COMPILER setting, e.g. "ccache distcc gcc".
* Change GCC_REQD to hold a list of values that we scan through to
find the highest version of GCC required by the build. Package
Makefiles should now do "GCC_REQD+=..." instead of "GCC_REQD=...".
2004-02-01 01:31:00 +01:00
|
|
|
_GCC_REQD= ${_GCC_STRICTEST_REQD}
|
|
|
|
|
|
|
|
# Determine whether we require GCC-2.x or GCC-3.x by examining _GCC_REQD.
|
2004-02-02 11:34:00 +01:00
|
|
|
_NEED_GCC2?= no
|
2004-02-18 14:32:38 +01:00
|
|
|
.for _pattern_ in ${_GCC2_PATTERNS}
|
|
|
|
. if !empty(_GCC_REQD:M${_pattern_})
|
2004-02-02 11:34:00 +01:00
|
|
|
_NEED_GCC2= yes
|
2004-02-18 14:32:38 +01:00
|
|
|
. endif
|
|
|
|
.endfor
|
2004-02-02 11:34:00 +01:00
|
|
|
_NEED_GCC3?= no
|
2004-02-18 14:32:38 +01:00
|
|
|
.for _pattern_ in ${_GCC3_PATTERNS}
|
|
|
|
. if !empty(_GCC_REQD:M${_pattern_})
|
2004-02-02 11:34:00 +01:00
|
|
|
_NEED_GCC3= yes
|
2004-02-18 14:32:38 +01:00
|
|
|
. endif
|
|
|
|
.endfor
|
2004-09-23 17:25:54 +02:00
|
|
|
_NEED_GCC34?= no
|
|
|
|
.for _pattern_ in ${_GCC34_PATTERNS}
|
|
|
|
. if !empty(_GCC_REQD:M${_pattern_})
|
|
|
|
_NEED_GCC34= yes
|
|
|
|
. endif
|
|
|
|
.endfor
|
2009-09-18 13:27:41 +02:00
|
|
|
_NEED_GCC44?= no
|
|
|
|
.for _pattern_ in ${_GCC44_PATTERNS}
|
|
|
|
. if !empty(_GCC_REQD:M${_pattern_})
|
|
|
|
_NEED_GCC44= yes
|
|
|
|
. endif
|
|
|
|
.endfor
|
2011-06-10 10:59:58 +02:00
|
|
|
_NEED_GCC45?= no
|
|
|
|
.for _pattern_ in ${_GCC45_PATTERNS}
|
|
|
|
. if !empty(_GCC_REQD:M${_pattern_})
|
|
|
|
_NEED_GCC45= yes
|
|
|
|
. endif
|
|
|
|
.endfor
|
|
|
|
_NEED_GCC46?= no
|
|
|
|
.for _pattern_ in ${_GCC46_PATTERNS}
|
|
|
|
. if !empty(_GCC_REQD:M${_pattern_})
|
|
|
|
_NEED_GCC46= yes
|
|
|
|
. endif
|
|
|
|
.endfor
|
2012-07-09 09:42:17 +02:00
|
|
|
_NEED_GCC47?= no
|
2012-04-16 07:03:03 +02:00
|
|
|
.for _pattern_ in ${_GCC47_PATTERNS}
|
|
|
|
. if !empty(_GCC_REQD:M${_pattern_})
|
|
|
|
_NEED_GCC47= yes
|
|
|
|
. endif
|
|
|
|
.endfor
|
2013-04-01 23:06:57 +02:00
|
|
|
_NEED_GCC48?= no
|
|
|
|
.for _pattern_ in ${_GCC48_PATTERNS}
|
|
|
|
. if !empty(_GCC_REQD:M${_pattern_})
|
|
|
|
_NEED_GCC48= yes
|
|
|
|
. endif
|
|
|
|
.endfor
|
2014-09-04 20:52:53 +02:00
|
|
|
_NEED_GCC49?= no
|
|
|
|
.for _pattern_ in ${_GCC49_PATTERNS}
|
|
|
|
. if !empty(_GCC_REQD:M${_pattern_})
|
|
|
|
_NEED_GCC49= yes
|
|
|
|
. endif
|
|
|
|
.endfor
|
2015-07-16 14:09:04 +02:00
|
|
|
_NEED_GCC5?= no
|
|
|
|
.for _pattern_ in ${_GCC5_PATTERNS}
|
|
|
|
. if !empty(_GCC_REQD:M${_pattern_})
|
|
|
|
_NEED_GCC5= yes
|
|
|
|
. endif
|
|
|
|
.endfor
|
2012-07-09 09:42:17 +02:00
|
|
|
_NEED_GCC_AUX?= no
|
compiler.mk/gcc.mk: Add support for USE_LANGUAGES+= ada
All recent packages featuring Ada code have a hard dependency on the
lang/gnat-aux compiler package. The valid values for USE_LANGUAGES
are c, c99, c++, fortran, fortran77, java, objc, so specifying a
specific compiler was necessary up into now.
One problem with lang/gnat-aux is that it is installed at ${LOCALBASE}
where the lang/gccXX compilers are installed at ${LOCALBASE}/gccXX.
The latter compilers have no possibility of sharing conflicting files
unlike lang/gnat-aux. Rather than fundamentally update the GCC 4.6-based
lang/gnat-aux to avoid these conflicts, a new Ada-capable compiler
based on GCC 4.7 was created with the intent of being supported by
mk/compiler.mk and mk/compiler/gcc.mk.
The Ada packages will be effectively migrated from lang/gnat-aux to the
new lang/gcc-aux compiler, but lang/gcc-aux will remain as a standalone
package as it is the only GCC 4.6-based compiler that builds on
DragonFly and serves it as a world and kernel compile option.
In addition to the current language wrappers, lang/gcc-aux adds
wrappers for "ada" (unique to gcc-aux, hardlinked to gcc driver),
and the gnat, gnatmake, gnatbind, gnatlink, gnatchop, gnatprep,
and gnatls programs. Supporting all of these allows the wrapper
system to be used with Ada packages; currently wrappers are mostly
disabled on them.
The lang/gcc47 implicitly adds support for the "objc-c++" language by
adding it to the USE_LANGUAGES list, but it wasn't really supported.
An attempt was made to better support objc-c++, but this new enumeration
probably still needs work or needs to be removed completely.
Logic for Ada support:
1) All lang/gccXX compilers have version numbers ranging from 2.8.1 to 9.
2) lang/gcc-aux uses the release date as its version number in the form of
YYYYMMDD with a minimum value of 20120614, so there is no version
overlap.
3) When at least one element of USE_LANGUAGES is "ada", the value of
20120614 is added to the set of GCC_REQD which selects lang/gcc-aux.
4) The _NEED_NEWER_GCC check is disabled. It fails and isn't relevant;
unless a package sets GCC_REQD over 20120614, the only way to select
lang/gcc-aux is to specify the Ada language and only one compiler
known to gcc.mk can support it.
2012-07-08 21:57:10 +02:00
|
|
|
.for _pattern_ in ${_GCC_AUX_PATTERNS}
|
|
|
|
. if !empty(_GCC_REQD:M${_pattern_})
|
|
|
|
_NEED_GCC_AUX= yes
|
|
|
|
_NEED_NEWER_GCC=NO
|
|
|
|
. endif
|
|
|
|
.endfor
|
2004-09-23 17:25:54 +02:00
|
|
|
.if !empty(_NEED_GCC2:M[nN][oO]) && !empty(_NEED_GCC3:M[nN][oO]) && \
|
2011-06-10 10:59:58 +02:00
|
|
|
!empty(_NEED_GCC34:M[nN][oO]) && !empty(_NEED_GCC44:M[nN][oO]) && \
|
2012-04-16 07:03:03 +02:00
|
|
|
!empty(_NEED_GCC45:M[nN][oO]) && !empty(_NEED_GCC46:M[nN][oO]) && \
|
2013-04-01 23:06:57 +02:00
|
|
|
!empty(_NEED_GCC47:M[nN][oO]) && !empty(_NEED_GCC48:M[nN][oO]) && \
|
2015-07-16 14:09:04 +02:00
|
|
|
!empty(_NEED_GCC49:M[nN][oO]) && !empty(_NEED_GCC5:M[nN][oO]) && \
|
|
|
|
!empty(_NEED_GCC_AUX:M[nN][oO])
|
|
|
|
_NEED_GCC5= yes
|
2004-02-20 08:10:06 +01:00
|
|
|
.endif
|
2004-02-02 11:03:46 +01:00
|
|
|
|
2004-02-09 06:22:43 +01:00
|
|
|
# Assume by default that GCC will only provide a C compiler.
|
|
|
|
LANGUAGES.gcc?= c
|
2004-02-18 14:32:38 +01:00
|
|
|
.if !empty(_NEED_GCC2:M[yY][eE][sS])
|
2013-06-15 23:50:43 +02:00
|
|
|
LANGUAGES.gcc= c c++ fortran77 objc
|
2004-02-18 14:32:38 +01:00
|
|
|
.elif !empty(_NEED_GCC3:M[yY][eE][sS])
|
2013-06-15 23:50:43 +02:00
|
|
|
LANGUAGES.gcc= c c++ fortran77 java objc
|
2004-09-23 17:25:54 +02:00
|
|
|
.elif !empty(_NEED_GCC34:M[yY][eE][sS])
|
2013-06-15 23:50:43 +02:00
|
|
|
LANGUAGES.gcc= c c++ fortran77 objc
|
2009-09-18 13:27:41 +02:00
|
|
|
.elif !empty(_NEED_GCC44:M[yY][eE][sS])
|
2010-07-30 09:58:58 +02:00
|
|
|
LANGUAGES.gcc= c c++ fortran fortran77 java objc
|
2011-06-10 10:59:58 +02:00
|
|
|
.elif !empty(_NEED_GCC45:M[yY][eE][sS])
|
|
|
|
LANGUAGES.gcc= c c++ fortran fortran77 java objc
|
|
|
|
.elif !empty(_NEED_GCC46:M[yY][eE][sS])
|
|
|
|
LANGUAGES.gcc= c c++ fortran fortran77 java objc
|
2012-04-16 07:03:03 +02:00
|
|
|
.elif !empty(_NEED_GCC47:M[yY][eE][sS])
|
|
|
|
LANGUAGES.gcc= c c++ fortran fortran77 go java objc obj-c++
|
2013-04-01 23:06:57 +02:00
|
|
|
.elif !empty(_NEED_GCC48:M[yY][eE][sS])
|
|
|
|
LANGUAGES.gcc= c c++ fortran fortran77 go java objc obj-c++
|
2014-09-04 20:52:53 +02:00
|
|
|
.elif !empty(_NEED_GCC49:M[yY][eE][sS])
|
|
|
|
LANGUAGES.gcc= c c++ fortran fortran77 go java objc obj-c++
|
2015-07-16 14:09:04 +02:00
|
|
|
.elif !empty(_NEED_GCC5:M[yY][eE][sS])
|
|
|
|
LANGUAGES.gcc= c c++ fortran fortran77 go java objc obj-c++
|
compiler.mk/gcc.mk: Add support for USE_LANGUAGES+= ada
All recent packages featuring Ada code have a hard dependency on the
lang/gnat-aux compiler package. The valid values for USE_LANGUAGES
are c, c99, c++, fortran, fortran77, java, objc, so specifying a
specific compiler was necessary up into now.
One problem with lang/gnat-aux is that it is installed at ${LOCALBASE}
where the lang/gccXX compilers are installed at ${LOCALBASE}/gccXX.
The latter compilers have no possibility of sharing conflicting files
unlike lang/gnat-aux. Rather than fundamentally update the GCC 4.6-based
lang/gnat-aux to avoid these conflicts, a new Ada-capable compiler
based on GCC 4.7 was created with the intent of being supported by
mk/compiler.mk and mk/compiler/gcc.mk.
The Ada packages will be effectively migrated from lang/gnat-aux to the
new lang/gcc-aux compiler, but lang/gcc-aux will remain as a standalone
package as it is the only GCC 4.6-based compiler that builds on
DragonFly and serves it as a world and kernel compile option.
In addition to the current language wrappers, lang/gcc-aux adds
wrappers for "ada" (unique to gcc-aux, hardlinked to gcc driver),
and the gnat, gnatmake, gnatbind, gnatlink, gnatchop, gnatprep,
and gnatls programs. Supporting all of these allows the wrapper
system to be used with Ada packages; currently wrappers are mostly
disabled on them.
The lang/gcc47 implicitly adds support for the "objc-c++" language by
adding it to the USE_LANGUAGES list, but it wasn't really supported.
An attempt was made to better support objc-c++, but this new enumeration
probably still needs work or needs to be removed completely.
Logic for Ada support:
1) All lang/gccXX compilers have version numbers ranging from 2.8.1 to 9.
2) lang/gcc-aux uses the release date as its version number in the form of
YYYYMMDD with a minimum value of 20120614, so there is no version
overlap.
3) When at least one element of USE_LANGUAGES is "ada", the value of
20120614 is added to the set of GCC_REQD which selects lang/gcc-aux.
4) The _NEED_NEWER_GCC check is disabled. It fails and isn't relevant;
unless a package sets GCC_REQD over 20120614, the only way to select
lang/gcc-aux is to specify the Ada language and only one compiler
known to gcc.mk can support it.
2012-07-08 21:57:10 +02:00
|
|
|
.elif !empty(_NEED_GCC_AUX:M[yY][eE][sS])
|
|
|
|
LANGUAGES.gcc= c c++ fortran fortran77 objc ada
|
2004-02-18 14:32:38 +01:00
|
|
|
.endif
|
2004-02-09 06:22:43 +01:00
|
|
|
_LANGUAGES.gcc= # empty
|
2004-02-18 14:32:38 +01:00
|
|
|
.for _lang_ in ${USE_LANGUAGES}
|
2004-02-09 06:22:43 +01:00
|
|
|
_LANGUAGES.gcc+= ${LANGUAGES.gcc:M${_lang_}}
|
2004-02-18 14:32:38 +01:00
|
|
|
.endfor
|
2004-02-09 06:22:43 +01:00
|
|
|
|
2006-12-02 23:32:59 +01:00
|
|
|
.if !empty(USE_LANGUAGES:Mc99)
|
2006-12-06 17:18:19 +01:00
|
|
|
_WRAP_EXTRA_ARGS.CC+= -std=gnu99
|
2015-02-04 15:11:50 +01:00
|
|
|
CWRAPPERS_APPEND.cc+= -std=gnu99
|
2006-12-02 23:32:59 +01:00
|
|
|
.endif
|
|
|
|
|
2004-03-30 23:39:24 +02:00
|
|
|
# GCC has this annoying behaviour where it advocates in a multi-line
|
|
|
|
# banner the use of "#include" over "#import" when including headers.
|
|
|
|
# This generates a huge number of warnings when building practically all
|
|
|
|
# Objective-C code where it is convention to use "#import". Suppress
|
|
|
|
# the warning if we're building Objective-C code using GCC.
|
2006-12-15 13:46:23 +01:00
|
|
|
#
|
2004-03-30 23:39:24 +02:00
|
|
|
.if !empty(_LANGUAGES.gcc:Mobjc)
|
|
|
|
CFLAGS+= -Wno-import
|
|
|
|
.endif
|
|
|
|
|
2015-07-27 00:13:17 +02:00
|
|
|
CFLAGS+= ${_GCC_CFLAGS}
|
|
|
|
|
2004-02-18 14:32:38 +01:00
|
|
|
.if !empty(_NEED_GCC2:M[yY][eE][sS])
|
2004-02-02 11:03:46 +01:00
|
|
|
#
|
2015-04-25 12:33:29 +02:00
|
|
|
# We require gcc-2.x in the lang/gcc2 directory.
|
2004-02-02 11:03:46 +01:00
|
|
|
#
|
2015-04-25 12:33:29 +02:00
|
|
|
_GCC_PKGBASE= gcc2
|
|
|
|
. if !empty(PKGPATH:Mlang/gcc2)
|
2004-02-01 15:11:01 +01:00
|
|
|
_IGNORE_GCC= yes
|
|
|
|
MAKEFLAGS+= _IGNORE_GCC=yes
|
2004-02-18 14:32:38 +01:00
|
|
|
. endif
|
|
|
|
. if !defined(_IGNORE_GCC) && !empty(_LANGUAGES.gcc)
|
2015-04-25 12:33:29 +02:00
|
|
|
_GCC_PKGSRCDIR= ../../lang/gcc2
|
|
|
|
_GCC_DEPENDENCY= gcc2>=${_GCC_REQD}:../../lang/gcc2
|
2004-03-12 07:09:12 +01:00
|
|
|
. if !empty(_LANGUAGES.gcc:Mc++) || \
|
2010-07-30 09:58:58 +02:00
|
|
|
!empty(_LANGUAGES.gcc:Mfortran77) || \
|
2004-03-12 07:09:12 +01:00
|
|
|
!empty(_LANGUAGES.gcc:Mobjc)
|
2004-11-22 23:24:46 +01:00
|
|
|
_USE_GCC_SHLIB?= yes
|
2004-02-02 11:49:26 +01:00
|
|
|
. endif
|
2004-02-18 14:32:38 +01:00
|
|
|
. endif
|
|
|
|
.elif !empty(_NEED_GCC3:M[yY][eE][sS])
|
2004-02-02 11:03:46 +01:00
|
|
|
#
|
|
|
|
# We require gcc-3.x in the lang/gcc3-* directories.
|
|
|
|
#
|
2004-02-01 15:11:01 +01:00
|
|
|
_GCC_PKGBASE= gcc3-c
|
2004-02-18 14:32:38 +01:00
|
|
|
. if !empty(PKGPATH:Mlang/gcc3-c)
|
2004-02-03 06:14:03 +01:00
|
|
|
_IGNORE_GCC= yes
|
|
|
|
MAKEFLAGS+= _IGNORE_GCC=yes
|
2004-02-18 14:32:38 +01:00
|
|
|
. endif
|
|
|
|
. if !defined(_IGNORE_GCC) && !empty(_LANGUAGES.gcc:Mc)
|
2004-02-01 15:11:01 +01:00
|
|
|
_GCC_PKGSRCDIR= ../../lang/gcc3-c
|
|
|
|
_GCC_DEPENDENCY= gcc3-c>=${_GCC_REQD}:../../lang/gcc3-c
|
|
|
|
. endif
|
2004-09-23 17:25:54 +02:00
|
|
|
.elif !empty(_NEED_GCC34:M[yY][eE][sS])
|
|
|
|
#
|
|
|
|
# We require gcc-3.4.x in the lang/gcc34 directory.
|
|
|
|
#
|
|
|
|
_GCC_PKGBASE= gcc34
|
|
|
|
. if !empty(PKGPATH:Mlang/gcc34)
|
|
|
|
_IGNORE_GCC= yes
|
|
|
|
MAKEFLAGS+= _IGNORE_GCC=yes
|
|
|
|
. endif
|
|
|
|
. if !defined(_IGNORE_GCC) && !empty(_LANGUAGES.gcc)
|
|
|
|
_GCC_PKGSRCDIR= ../../lang/gcc34
|
|
|
|
_GCC_DEPENDENCY= gcc34>=${_GCC_REQD}:../../lang/gcc34
|
|
|
|
. if !empty(_LANGUAGES.gcc:Mc++) || \
|
2010-07-30 09:58:58 +02:00
|
|
|
!empty(_LANGUAGES.gcc:Mfortran77) || \
|
2004-09-23 17:25:54 +02:00
|
|
|
!empty(_LANGUAGES.gcc:Mobjc)
|
2004-11-22 23:24:46 +01:00
|
|
|
_USE_GCC_SHLIB?= yes
|
2004-09-23 17:25:54 +02:00
|
|
|
. endif
|
|
|
|
. endif
|
2009-09-18 13:27:41 +02:00
|
|
|
.elif !empty(_NEED_GCC44:M[yY][eE][sS])
|
|
|
|
#
|
|
|
|
# We require gcc-4.4.x in the lang/gcc44 directory.
|
|
|
|
#
|
|
|
|
_GCC_PKGBASE= gcc44
|
|
|
|
. if !empty(PKGPATH:Mlang/gcc44)
|
|
|
|
_IGNORE_GCC= yes
|
|
|
|
MAKEFLAGS+= _IGNORE_GCC=yes
|
|
|
|
. endif
|
|
|
|
. if !defined(_IGNORE_GCC) && !empty(_LANGUAGES.gcc)
|
|
|
|
_GCC_PKGSRCDIR= ../../lang/gcc44
|
|
|
|
_GCC_DEPENDENCY= gcc44>=${_GCC_REQD}:../../lang/gcc44
|
|
|
|
. if !empty(_LANGUAGES.gcc:Mc++) || \
|
|
|
|
!empty(_LANGUAGES.gcc:Mfortran) || \
|
2010-07-30 09:58:58 +02:00
|
|
|
!empty(_LANGUAGES.gcc:Mfortran77) || \
|
2009-09-18 13:27:41 +02:00
|
|
|
!empty(_LANGUAGES.gcc:Mobjc)
|
|
|
|
_USE_GCC_SHLIB?= yes
|
|
|
|
. endif
|
|
|
|
. endif
|
2011-06-10 10:59:58 +02:00
|
|
|
.elif !empty(_NEED_GCC45:M[yY][eE][sS])
|
|
|
|
#
|
|
|
|
# We require gcc-4.5.x in the lang/gcc45 directory.
|
|
|
|
#
|
|
|
|
_GCC_PKGBASE= gcc45
|
|
|
|
. if !empty(PKGPATH:Mlang/gcc45)
|
|
|
|
_IGNORE_GCC= yes
|
|
|
|
MAKEFLAGS+= _IGNORE_GCC=yes
|
|
|
|
. endif
|
|
|
|
. if !defined(_IGNORE_GCC) && !empty(_LANGUAGES.gcc)
|
|
|
|
_GCC_PKGSRCDIR= ../../lang/gcc45
|
|
|
|
_GCC_DEPENDENCY= gcc45>=${_GCC_REQD}:../../lang/gcc45
|
|
|
|
. if !empty(_LANGUAGES.gcc:Mc++) || \
|
|
|
|
!empty(_LANGUAGES.gcc:Mfortran) || \
|
|
|
|
!empty(_LANGUAGES.gcc:Mfortran77) || \
|
|
|
|
!empty(_LANGUAGES.gcc:Mobjc)
|
|
|
|
_USE_GCC_SHLIB?= yes
|
|
|
|
. endif
|
|
|
|
. endif
|
|
|
|
.elif !empty(_NEED_GCC46:M[yY][eE][sS])
|
|
|
|
#
|
|
|
|
# We require gcc-4.6.x in the lang/gcc46 directory.
|
|
|
|
#
|
|
|
|
_GCC_PKGBASE= gcc46
|
|
|
|
. if !empty(PKGPATH:Mlang/gcc46)
|
|
|
|
_IGNORE_GCC= yes
|
|
|
|
MAKEFLAGS+= _IGNORE_GCC=yes
|
|
|
|
. endif
|
|
|
|
. if !defined(_IGNORE_GCC) && !empty(_LANGUAGES.gcc)
|
|
|
|
_GCC_PKGSRCDIR= ../../lang/gcc46
|
|
|
|
_GCC_DEPENDENCY= gcc46>=${_GCC_REQD}:../../lang/gcc46
|
|
|
|
. if !empty(_LANGUAGES.gcc:Mc++) || \
|
|
|
|
!empty(_LANGUAGES.gcc:Mfortran) || \
|
|
|
|
!empty(_LANGUAGES.gcc:Mfortran77) || \
|
|
|
|
!empty(_LANGUAGES.gcc:Mobjc)
|
|
|
|
_USE_GCC_SHLIB?= yes
|
|
|
|
. endif
|
|
|
|
. endif
|
2012-04-16 07:03:03 +02:00
|
|
|
.elif !empty(_NEED_GCC47:M[yY][eE][sS])
|
|
|
|
#
|
|
|
|
# We require gcc-4.7.x in the lang/gcc47 directory.
|
|
|
|
#
|
|
|
|
_GCC_PKGBASE= gcc47
|
|
|
|
. if !empty(PKGPATH:Mlang/gcc47)
|
|
|
|
_IGNORE_GCC= yes
|
|
|
|
MAKEFLAGS+= _IGNORE_GCC=yes
|
|
|
|
. endif
|
|
|
|
. if !defined(_IGNORE_GCC) && !empty(_LANGUAGES.gcc)
|
|
|
|
_GCC_PKGSRCDIR= ../../lang/gcc47
|
|
|
|
_GCC_DEPENDENCY= gcc47>=${_GCC_REQD}:../../lang/gcc47
|
|
|
|
. if !empty(_LANGUAGES.gcc:Mc++) || \
|
|
|
|
!empty(_LANGUAGES.gcc:Mfortran) || \
|
|
|
|
!empty(_LANGUAGES.gcc:Mfortran77) || \
|
|
|
|
!empty(_LANGUAGES.gcc:Mgo) || \
|
2013-04-01 23:06:57 +02:00
|
|
|
!empty(_LANGUAGES.gcc:Mobjc) || \
|
|
|
|
!empty(_LANGUAGES.gcc:Mobj-c++)
|
|
|
|
_USE_GCC_SHLIB?= yes
|
|
|
|
. endif
|
|
|
|
. endif
|
|
|
|
.elif !empty(_NEED_GCC48:M[yY][eE][sS])
|
|
|
|
#
|
2014-10-31 15:22:20 +01:00
|
|
|
# We require gcc-4.8.x in the lang/gcc48 directory.
|
2013-04-01 23:06:57 +02:00
|
|
|
#
|
2014-10-31 15:22:20 +01:00
|
|
|
_GCC_PKGBASE= gcc48
|
|
|
|
. if !empty(PKGPATH:Mlang/gcc48)
|
2013-04-01 23:06:57 +02:00
|
|
|
_IGNORE_GCC= yes
|
|
|
|
MAKEFLAGS+= _IGNORE_GCC=yes
|
|
|
|
. endif
|
2014-10-31 15:22:20 +01:00
|
|
|
. if !defined(_IGNORE_GCC) && !empty(_LANGUAGES.gcc)
|
|
|
|
_GCC_PKGSRCDIR= ../../lang/gcc48
|
|
|
|
_GCC_DEPENDENCY= gcc48>=${_GCC_REQD}:../../lang/gcc48
|
|
|
|
. if !empty(_LANGUAGES.gcc:Mc++) || \
|
|
|
|
!empty(_LANGUAGES.gcc:Mfortran) || \
|
|
|
|
!empty(_LANGUAGES.gcc:Mfortran77) || \
|
|
|
|
!empty(_LANGUAGES.gcc:Mgo) || \
|
|
|
|
!empty(_LANGUAGES.gcc:Mobjc) || \
|
|
|
|
!empty(_LANGUAGES.gcc:Mobj-c++)
|
2012-04-16 07:03:03 +02:00
|
|
|
_USE_GCC_SHLIB?= yes
|
2014-10-31 15:22:20 +01:00
|
|
|
. endif
|
2012-04-16 07:03:03 +02:00
|
|
|
. endif
|
2014-11-03 14:06:39 +01:00
|
|
|
.elif !empty(_NEED_GCC49:M[yY][eE][sS])
|
2014-09-04 20:52:53 +02:00
|
|
|
#
|
|
|
|
# We require gcc-4.9.x in the lang/gcc49-* directory.
|
|
|
|
#
|
|
|
|
_GCC_PKGBASE= gcc49
|
|
|
|
. if !empty(PKGPATH:Mlang/gcc49)
|
|
|
|
_IGNORE_GCC= yes
|
|
|
|
MAKEFLAGS+= _IGNORE_GCC=yes
|
|
|
|
. endif
|
2014-09-06 00:11:10 +02:00
|
|
|
. if !defined(_IGNORE_GCC) && !empty(_LANGUAGES.gcc)
|
2014-09-04 20:52:53 +02:00
|
|
|
_GCC_PKGSRCDIR= ../../lang/gcc49
|
|
|
|
_GCC_DEPENDENCY= gcc49>=${_GCC_REQD}:../../lang/gcc49
|
2014-09-06 00:11:10 +02:00
|
|
|
. if !empty(_LANGUAGES.gcc:Mc++) || \
|
|
|
|
!empty(_LANGUAGES.gcc:Mfortran) || \
|
|
|
|
!empty(_LANGUAGES.gcc:Mfortran77) || \
|
|
|
|
!empty(_LANGUAGES.gcc:Mgo) || \
|
|
|
|
!empty(_LANGUAGES.gcc:Mobjc) || \
|
|
|
|
!empty(_LANGUAGES.gcc:Mobj-c++)
|
2014-09-04 20:52:53 +02:00
|
|
|
_USE_GCC_SHLIB?= yes
|
2014-09-06 00:11:10 +02:00
|
|
|
. endif
|
2014-09-04 20:52:53 +02:00
|
|
|
. endif
|
2015-07-16 14:09:04 +02:00
|
|
|
.elif !empty(_NEED_GCC5:M[yY][eE][sS])
|
|
|
|
#
|
|
|
|
# We require gcc-5.x in the lang/gcc5-* directory.
|
|
|
|
#
|
|
|
|
_GCC_PKGBASE= gcc5
|
|
|
|
. if !empty(PKGPATH:Mlang/gcc5)
|
|
|
|
_IGNORE_GCC= yes
|
|
|
|
MAKEFLAGS+= _IGNORE_GCC=yes
|
|
|
|
. endif
|
|
|
|
. if !defined(_IGNORE_GCC) && !empty(_LANGUAGES.gcc)
|
|
|
|
_GCC_PKGSRCDIR= ../../lang/gcc5
|
|
|
|
_GCC_DEPENDENCY= gcc5>=${_GCC_REQD}:../../lang/gcc5
|
|
|
|
. if !empty(_LANGUAGES.gcc:Mc++) || \
|
|
|
|
!empty(_LANGUAGES.gcc:Mfortran) || \
|
|
|
|
!empty(_LANGUAGES.gcc:Mfortran77) || \
|
|
|
|
!empty(_LANGUAGES.gcc:Mgo) || \
|
|
|
|
!empty(_LANGUAGES.gcc:Mobjc) || \
|
|
|
|
!empty(_LANGUAGES.gcc:Mobj-c++)
|
|
|
|
_USE_GCC_SHLIB?= yes
|
|
|
|
. endif
|
|
|
|
. endif
|
compiler.mk/gcc.mk: Add support for USE_LANGUAGES+= ada
All recent packages featuring Ada code have a hard dependency on the
lang/gnat-aux compiler package. The valid values for USE_LANGUAGES
are c, c99, c++, fortran, fortran77, java, objc, so specifying a
specific compiler was necessary up into now.
One problem with lang/gnat-aux is that it is installed at ${LOCALBASE}
where the lang/gccXX compilers are installed at ${LOCALBASE}/gccXX.
The latter compilers have no possibility of sharing conflicting files
unlike lang/gnat-aux. Rather than fundamentally update the GCC 4.6-based
lang/gnat-aux to avoid these conflicts, a new Ada-capable compiler
based on GCC 4.7 was created with the intent of being supported by
mk/compiler.mk and mk/compiler/gcc.mk.
The Ada packages will be effectively migrated from lang/gnat-aux to the
new lang/gcc-aux compiler, but lang/gcc-aux will remain as a standalone
package as it is the only GCC 4.6-based compiler that builds on
DragonFly and serves it as a world and kernel compile option.
In addition to the current language wrappers, lang/gcc-aux adds
wrappers for "ada" (unique to gcc-aux, hardlinked to gcc driver),
and the gnat, gnatmake, gnatbind, gnatlink, gnatchop, gnatprep,
and gnatls programs. Supporting all of these allows the wrapper
system to be used with Ada packages; currently wrappers are mostly
disabled on them.
The lang/gcc47 implicitly adds support for the "objc-c++" language by
adding it to the USE_LANGUAGES list, but it wasn't really supported.
An attempt was made to better support objc-c++, but this new enumeration
probably still needs work or needs to be removed completely.
Logic for Ada support:
1) All lang/gccXX compilers have version numbers ranging from 2.8.1 to 9.
2) lang/gcc-aux uses the release date as its version number in the form of
YYYYMMDD with a minimum value of 20120614, so there is no version
overlap.
3) When at least one element of USE_LANGUAGES is "ada", the value of
20120614 is added to the set of GCC_REQD which selects lang/gcc-aux.
4) The _NEED_NEWER_GCC check is disabled. It fails and isn't relevant;
unless a package sets GCC_REQD over 20120614, the only way to select
lang/gcc-aux is to specify the Ada language and only one compiler
known to gcc.mk can support it.
2012-07-08 21:57:10 +02:00
|
|
|
.elif !empty(_NEED_GCC_AUX:M[yY][eE][sS])
|
|
|
|
#
|
|
|
|
# We require Ada-capable compiler in the lang/gcc-aux directory.
|
|
|
|
#
|
|
|
|
_GCC_PKGBASE= gcc-aux
|
|
|
|
. if !empty(PKGPATH:Mlang/gcc-aux)
|
|
|
|
_IGNORE_GCC= yes
|
|
|
|
MAKEFLAGS+= _IGNORE_GCC=yes
|
|
|
|
. endif
|
|
|
|
. if !defined(_IGNORE_GCC) && !empty(_LANGUAGES.gcc)
|
|
|
|
_GCC_PKGSRCDIR= ../../lang/gcc-aux
|
|
|
|
_GCC_DEPENDENCY= gcc-aux>=${_GCC_REQD}:../../lang/gcc-aux
|
|
|
|
. if !empty(_LANGUAGES.gcc:Mc++) || \
|
|
|
|
!empty(_LANGUAGES.gcc:Mfortran) || \
|
|
|
|
!empty(_LANGUAGES.gcc:Mfortran77) || \
|
|
|
|
!empty(_LANGUAGES.gcc:Mada) || \
|
|
|
|
!empty(_LANGUAGES.gcc:Mobjc)
|
|
|
|
_USE_GCC_SHLIB?= yes
|
|
|
|
. endif
|
|
|
|
. endif
|
2004-02-18 14:32:38 +01:00
|
|
|
.endif
|
2004-02-03 06:14:03 +01:00
|
|
|
_GCC_DEPENDS= ${_GCC_PKGBASE}>=${_GCC_REQD}
|
|
|
|
|
2004-02-18 14:32:38 +01:00
|
|
|
.if !empty(_NEED_GCC3:M[yY][eE][sS])
|
|
|
|
. if !empty(PKGPATH:Mlang/gcc3-c++)
|
2004-02-01 15:11:01 +01:00
|
|
|
_IGNORE_GCC3CXX= yes
|
|
|
|
MAKEFLAGS+= _IGNORE_GCC3CXX=yes
|
2004-02-18 14:32:38 +01:00
|
|
|
. endif
|
|
|
|
. if !defined(_IGNORE_GCC3CXX) && !empty(_LANGUAGES.gcc:Mc++)
|
2004-02-01 15:11:01 +01:00
|
|
|
_GCC_PKGSRCDIR+= ../../lang/gcc3-c++
|
|
|
|
_GCC_DEPENDENCY+= gcc3-c++>=${_GCC_REQD}:../../lang/gcc3-c++
|
2004-11-22 23:24:46 +01:00
|
|
|
_USE_GCC_SHLIB?= yes
|
2004-02-18 14:32:38 +01:00
|
|
|
. endif
|
|
|
|
. if !empty(PKGPATH:Mlang/gcc3-f77)
|
2004-02-01 15:11:01 +01:00
|
|
|
_IGNORE_GCC3F77= yes
|
|
|
|
MAKEFLAGS+= _IGNORE_GCC3F77=yes
|
2004-02-18 14:32:38 +01:00
|
|
|
. endif
|
2013-06-15 23:50:43 +02:00
|
|
|
. if !defined(_IGNORE_GCC3F77) && !empty(_LANGUAGES.gcc:Mfortran77)
|
2004-02-01 15:11:01 +01:00
|
|
|
_GCC_PKGSRCDIR+= ../../lang/gcc3-f77
|
|
|
|
_GCC_DEPENDENCY+= gcc3-f77>=${_GCC_REQD}:../../lang/gcc3-f77
|
2004-11-22 23:24:46 +01:00
|
|
|
_USE_GCC_SHLIB?= yes
|
New compiler specification framework, based on mk/compiler.mk. The
changes from the old compiler.mk are:
* Split apart the compiler-specific logic into separate files. This
should make supporting other compilers a bit easier.
* Deprecate all of the USE_* compiler.mk variables, e.g. USE_GCC[23],
USE_SUNPRO, etc. It's all replaced with a new PKGSRC_COMPILER
variable.
* Clean up the GCC handling so that it's all controlled by a single
variable GCC_REQD. The following behaviour is expected:
(a) If USE_PKGSRC_GCC is defined, then pretend there is no GCC on
the system.
(b) If there is no GCC, then the appropriate GCC corresponding to
GCC_REQD is installed and used.
(c) If there is a GCC, if it satisfies GCC_REQD, then use it;
otherwise install and use the appropriate GCC package.
(d) If lang/gcc is installed and GCC_REQD > 2.95.3, then lang/gcc3
is installed and used.
(e) If lang/gcc3 is installed and GCC_REQD = 2.95.3, then gcc3 is
still used instead of installing lang/gcc.
New features include:
* PKGSRC_COMPILER takes a list of values specifying the chain of
compilers to call when building packages. Valid values are:
distcc distributed C/C++ (chainable)
ccache compiler cache (chainable)
gcc GNU
mipspro Silicon Graphics, Inc. MIPSpro
sunpro Sun Microsystems, Inc. WorkShip/Forte/Sun
ONE Studio
The default is "gcc". You can use ccache and/or distcc with an
appropriate PKGSRC_COMPILER setting, e.g. "ccache distcc gcc".
* Change GCC_REQD to hold a list of values that we scan through to
find the highest version of GCC required by the build. Package
Makefiles should now do "GCC_REQD+=..." instead of "GCC_REQD=...".
2004-02-01 01:31:00 +01:00
|
|
|
. endif
|
2004-03-12 07:09:12 +01:00
|
|
|
. if !empty(PKGPATH:Mlang/gcc3-objc)
|
|
|
|
_IGNORE_GCC3OBJC= yes
|
|
|
|
MAKEFLAGS+= _IGNORE_GCC3OBJC=yes
|
|
|
|
. endif
|
|
|
|
. if !defined(_IGNORE_GCC3OBJC) && !empty(_LANGUAGES.gcc:Mobjc)
|
|
|
|
_GCC_PKGSRCDIR+= ../../lang/gcc3-objc
|
|
|
|
_GCC_DEPENDENCY+= gcc3-objc>=${_GCC_REQD}:../../lang/gcc3-objc
|
2004-11-22 23:24:46 +01:00
|
|
|
_USE_GCC_SHLIB?= yes
|
2004-03-12 07:09:12 +01:00
|
|
|
. endif
|
2004-02-18 14:32:38 +01:00
|
|
|
.endif
|
New compiler specification framework, based on mk/compiler.mk. The
changes from the old compiler.mk are:
* Split apart the compiler-specific logic into separate files. This
should make supporting other compilers a bit easier.
* Deprecate all of the USE_* compiler.mk variables, e.g. USE_GCC[23],
USE_SUNPRO, etc. It's all replaced with a new PKGSRC_COMPILER
variable.
* Clean up the GCC handling so that it's all controlled by a single
variable GCC_REQD. The following behaviour is expected:
(a) If USE_PKGSRC_GCC is defined, then pretend there is no GCC on
the system.
(b) If there is no GCC, then the appropriate GCC corresponding to
GCC_REQD is installed and used.
(c) If there is a GCC, if it satisfies GCC_REQD, then use it;
otherwise install and use the appropriate GCC package.
(d) If lang/gcc is installed and GCC_REQD > 2.95.3, then lang/gcc3
is installed and used.
(e) If lang/gcc3 is installed and GCC_REQD = 2.95.3, then gcc3 is
still used instead of installing lang/gcc.
New features include:
* PKGSRC_COMPILER takes a list of values specifying the chain of
compilers to call when building packages. Valid values are:
distcc distributed C/C++ (chainable)
ccache compiler cache (chainable)
gcc GNU
mipspro Silicon Graphics, Inc. MIPSpro
sunpro Sun Microsystems, Inc. WorkShip/Forte/Sun
ONE Studio
The default is "gcc". You can use ccache and/or distcc with an
appropriate PKGSRC_COMPILER setting, e.g. "ccache distcc gcc".
* Change GCC_REQD to hold a list of values that we scan through to
find the highest version of GCC required by the build. Package
Makefiles should now do "GCC_REQD+=..." instead of "GCC_REQD=...".
2004-02-01 01:31:00 +01:00
|
|
|
|
2012-09-16 14:18:30 +02:00
|
|
|
# When not using the GNU linker, gcc will always link shared libraries against
|
|
|
|
# the shared version of libgcc, and so _USE_GCC_SHLIB needs to be enabled on
|
|
|
|
# platforms with non-GNU linkers, such as SunOS.
|
|
|
|
#
|
|
|
|
# However, we cannot simply do this by default as it will create circular
|
|
|
|
# dependencies in packages which are required to build gcc itself, and so we
|
|
|
|
# enable it based on USE_LIBTOOL for the majority of packages, and support
|
|
|
|
# USE_GCC_RUNTIME for packages which create shared libraries but do not use
|
|
|
|
# libtool to do so.
|
|
|
|
#
|
|
|
|
.if ${OPSYS} == "SunOS" && (defined(USE_LIBTOOL) || defined(USE_GCC_RUNTIME))
|
2012-09-13 12:17:14 +02:00
|
|
|
_USE_GCC_SHLIB= yes
|
|
|
|
.endif
|
|
|
|
|
2012-04-13 04:30:45 +02:00
|
|
|
.if !empty(USE_NATIVE_GCC:M[yY][eE][sS]) && !empty(_IS_BUILTIN_GCC:M[yY][eE][sS])
|
2004-03-13 20:08:37 +01:00
|
|
|
_USE_PKGSRC_GCC= no
|
2012-04-13 05:03:36 +02:00
|
|
|
.elif !empty(USE_PKGSRC_GCC:M[yY][eE][sS])
|
|
|
|
# For environments where there is an external gcc too, but pkgsrc
|
|
|
|
# should use the pkgsrc one for consistency.
|
|
|
|
_USE_PKGSRC_GCC= yes
|
2004-03-13 20:08:37 +01:00
|
|
|
.endif
|
|
|
|
|
2004-02-18 14:32:38 +01:00
|
|
|
.if defined(_IGNORE_GCC)
|
New compiler specification framework, based on mk/compiler.mk. The
changes from the old compiler.mk are:
* Split apart the compiler-specific logic into separate files. This
should make supporting other compilers a bit easier.
* Deprecate all of the USE_* compiler.mk variables, e.g. USE_GCC[23],
USE_SUNPRO, etc. It's all replaced with a new PKGSRC_COMPILER
variable.
* Clean up the GCC handling so that it's all controlled by a single
variable GCC_REQD. The following behaviour is expected:
(a) If USE_PKGSRC_GCC is defined, then pretend there is no GCC on
the system.
(b) If there is no GCC, then the appropriate GCC corresponding to
GCC_REQD is installed and used.
(c) If there is a GCC, if it satisfies GCC_REQD, then use it;
otherwise install and use the appropriate GCC package.
(d) If lang/gcc is installed and GCC_REQD > 2.95.3, then lang/gcc3
is installed and used.
(e) If lang/gcc3 is installed and GCC_REQD = 2.95.3, then gcc3 is
still used instead of installing lang/gcc.
New features include:
* PKGSRC_COMPILER takes a list of values specifying the chain of
compilers to call when building packages. Valid values are:
distcc distributed C/C++ (chainable)
ccache compiler cache (chainable)
gcc GNU
mipspro Silicon Graphics, Inc. MIPSpro
sunpro Sun Microsystems, Inc. WorkShip/Forte/Sun
ONE Studio
The default is "gcc". You can use ccache and/or distcc with an
appropriate PKGSRC_COMPILER setting, e.g. "ccache distcc gcc".
* Change GCC_REQD to hold a list of values that we scan through to
find the highest version of GCC required by the build. Package
Makefiles should now do "GCC_REQD+=..." instead of "GCC_REQD=...".
2004-02-01 01:31:00 +01:00
|
|
|
_USE_PKGSRC_GCC= NO
|
2004-02-18 14:32:38 +01:00
|
|
|
.endif
|
New compiler specification framework, based on mk/compiler.mk. The
changes from the old compiler.mk are:
* Split apart the compiler-specific logic into separate files. This
should make supporting other compilers a bit easier.
* Deprecate all of the USE_* compiler.mk variables, e.g. USE_GCC[23],
USE_SUNPRO, etc. It's all replaced with a new PKGSRC_COMPILER
variable.
* Clean up the GCC handling so that it's all controlled by a single
variable GCC_REQD. The following behaviour is expected:
(a) If USE_PKGSRC_GCC is defined, then pretend there is no GCC on
the system.
(b) If there is no GCC, then the appropriate GCC corresponding to
GCC_REQD is installed and used.
(c) If there is a GCC, if it satisfies GCC_REQD, then use it;
otherwise install and use the appropriate GCC package.
(d) If lang/gcc is installed and GCC_REQD > 2.95.3, then lang/gcc3
is installed and used.
(e) If lang/gcc3 is installed and GCC_REQD = 2.95.3, then gcc3 is
still used instead of installing lang/gcc.
New features include:
* PKGSRC_COMPILER takes a list of values specifying the chain of
compilers to call when building packages. Valid values are:
distcc distributed C/C++ (chainable)
ccache compiler cache (chainable)
gcc GNU
mipspro Silicon Graphics, Inc. MIPSpro
sunpro Sun Microsystems, Inc. WorkShip/Forte/Sun
ONE Studio
The default is "gcc". You can use ccache and/or distcc with an
appropriate PKGSRC_COMPILER setting, e.g. "ccache distcc gcc".
* Change GCC_REQD to hold a list of values that we scan through to
find the highest version of GCC required by the build. Package
Makefiles should now do "GCC_REQD+=..." instead of "GCC_REQD=...".
2004-02-01 01:31:00 +01:00
|
|
|
|
2004-02-18 14:32:38 +01:00
|
|
|
.if !defined(_USE_PKGSRC_GCC)
|
New compiler specification framework, based on mk/compiler.mk. The
changes from the old compiler.mk are:
* Split apart the compiler-specific logic into separate files. This
should make supporting other compilers a bit easier.
* Deprecate all of the USE_* compiler.mk variables, e.g. USE_GCC[23],
USE_SUNPRO, etc. It's all replaced with a new PKGSRC_COMPILER
variable.
* Clean up the GCC handling so that it's all controlled by a single
variable GCC_REQD. The following behaviour is expected:
(a) If USE_PKGSRC_GCC is defined, then pretend there is no GCC on
the system.
(b) If there is no GCC, then the appropriate GCC corresponding to
GCC_REQD is installed and used.
(c) If there is a GCC, if it satisfies GCC_REQD, then use it;
otherwise install and use the appropriate GCC package.
(d) If lang/gcc is installed and GCC_REQD > 2.95.3, then lang/gcc3
is installed and used.
(e) If lang/gcc3 is installed and GCC_REQD = 2.95.3, then gcc3 is
still used instead of installing lang/gcc.
New features include:
* PKGSRC_COMPILER takes a list of values specifying the chain of
compilers to call when building packages. Valid values are:
distcc distributed C/C++ (chainable)
ccache compiler cache (chainable)
gcc GNU
mipspro Silicon Graphics, Inc. MIPSpro
sunpro Sun Microsystems, Inc. WorkShip/Forte/Sun
ONE Studio
The default is "gcc". You can use ccache and/or distcc with an
appropriate PKGSRC_COMPILER setting, e.g. "ccache distcc gcc".
* Change GCC_REQD to hold a list of values that we scan through to
find the highest version of GCC required by the build. Package
Makefiles should now do "GCC_REQD+=..." instead of "GCC_REQD=...".
2004-02-01 01:31:00 +01:00
|
|
|
_USE_PKGSRC_GCC= YES
|
2004-02-18 14:32:38 +01:00
|
|
|
. if !empty(_IS_BUILTIN_GCC:M[yY][eE][sS])
|
2004-02-01 13:16:10 +01:00
|
|
|
_GCC_TEST_DEPENDS= gcc>=${_GCC_REQD}
|
New compiler specification framework, based on mk/compiler.mk. The
changes from the old compiler.mk are:
* Split apart the compiler-specific logic into separate files. This
should make supporting other compilers a bit easier.
* Deprecate all of the USE_* compiler.mk variables, e.g. USE_GCC[23],
USE_SUNPRO, etc. It's all replaced with a new PKGSRC_COMPILER
variable.
* Clean up the GCC handling so that it's all controlled by a single
variable GCC_REQD. The following behaviour is expected:
(a) If USE_PKGSRC_GCC is defined, then pretend there is no GCC on
the system.
(b) If there is no GCC, then the appropriate GCC corresponding to
GCC_REQD is installed and used.
(c) If there is a GCC, if it satisfies GCC_REQD, then use it;
otherwise install and use the appropriate GCC package.
(d) If lang/gcc is installed and GCC_REQD > 2.95.3, then lang/gcc3
is installed and used.
(e) If lang/gcc3 is installed and GCC_REQD = 2.95.3, then gcc3 is
still used instead of installing lang/gcc.
New features include:
* PKGSRC_COMPILER takes a list of values specifying the chain of
compilers to call when building packages. Valid values are:
distcc distributed C/C++ (chainable)
ccache compiler cache (chainable)
gcc GNU
mipspro Silicon Graphics, Inc. MIPSpro
sunpro Sun Microsystems, Inc. WorkShip/Forte/Sun
ONE Studio
The default is "gcc". You can use ccache and/or distcc with an
appropriate PKGSRC_COMPILER setting, e.g. "ccache distcc gcc".
* Change GCC_REQD to hold a list of values that we scan through to
find the highest version of GCC required by the build. Package
Makefiles should now do "GCC_REQD+=..." instead of "GCC_REQD=...".
2004-02-01 01:31:00 +01:00
|
|
|
_USE_PKGSRC_GCC!= \
|
2004-03-13 20:08:37 +01:00
|
|
|
if ${PKG_ADMIN} pmatch '${_GCC_TEST_DEPENDS}' ${_GCC_PKG} 2>/dev/null; then \
|
New compiler specification framework, based on mk/compiler.mk. The
changes from the old compiler.mk are:
* Split apart the compiler-specific logic into separate files. This
should make supporting other compilers a bit easier.
* Deprecate all of the USE_* compiler.mk variables, e.g. USE_GCC[23],
USE_SUNPRO, etc. It's all replaced with a new PKGSRC_COMPILER
variable.
* Clean up the GCC handling so that it's all controlled by a single
variable GCC_REQD. The following behaviour is expected:
(a) If USE_PKGSRC_GCC is defined, then pretend there is no GCC on
the system.
(b) If there is no GCC, then the appropriate GCC corresponding to
GCC_REQD is installed and used.
(c) If there is a GCC, if it satisfies GCC_REQD, then use it;
otherwise install and use the appropriate GCC package.
(d) If lang/gcc is installed and GCC_REQD > 2.95.3, then lang/gcc3
is installed and used.
(e) If lang/gcc3 is installed and GCC_REQD = 2.95.3, then gcc3 is
still used instead of installing lang/gcc.
New features include:
* PKGSRC_COMPILER takes a list of values specifying the chain of
compilers to call when building packages. Valid values are:
distcc distributed C/C++ (chainable)
ccache compiler cache (chainable)
gcc GNU
mipspro Silicon Graphics, Inc. MIPSpro
sunpro Sun Microsystems, Inc. WorkShip/Forte/Sun
ONE Studio
The default is "gcc". You can use ccache and/or distcc with an
appropriate PKGSRC_COMPILER setting, e.g. "ccache distcc gcc".
* Change GCC_REQD to hold a list of values that we scan through to
find the highest version of GCC required by the build. Package
Makefiles should now do "GCC_REQD+=..." instead of "GCC_REQD=...".
2004-02-01 01:31:00 +01:00
|
|
|
${ECHO} "NO"; \
|
|
|
|
else \
|
|
|
|
${ECHO} "YES"; \
|
|
|
|
fi
|
|
|
|
. endif
|
2004-02-18 14:32:38 +01:00
|
|
|
.endif
|
New compiler specification framework, based on mk/compiler.mk. The
changes from the old compiler.mk are:
* Split apart the compiler-specific logic into separate files. This
should make supporting other compilers a bit easier.
* Deprecate all of the USE_* compiler.mk variables, e.g. USE_GCC[23],
USE_SUNPRO, etc. It's all replaced with a new PKGSRC_COMPILER
variable.
* Clean up the GCC handling so that it's all controlled by a single
variable GCC_REQD. The following behaviour is expected:
(a) If USE_PKGSRC_GCC is defined, then pretend there is no GCC on
the system.
(b) If there is no GCC, then the appropriate GCC corresponding to
GCC_REQD is installed and used.
(c) If there is a GCC, if it satisfies GCC_REQD, then use it;
otherwise install and use the appropriate GCC package.
(d) If lang/gcc is installed and GCC_REQD > 2.95.3, then lang/gcc3
is installed and used.
(e) If lang/gcc3 is installed and GCC_REQD = 2.95.3, then gcc3 is
still used instead of installing lang/gcc.
New features include:
* PKGSRC_COMPILER takes a list of values specifying the chain of
compilers to call when building packages. Valid values are:
distcc distributed C/C++ (chainable)
ccache compiler cache (chainable)
gcc GNU
mipspro Silicon Graphics, Inc. MIPSpro
sunpro Sun Microsystems, Inc. WorkShip/Forte/Sun
ONE Studio
The default is "gcc". You can use ccache and/or distcc with an
appropriate PKGSRC_COMPILER setting, e.g. "ccache distcc gcc".
* Change GCC_REQD to hold a list of values that we scan through to
find the highest version of GCC required by the build. Package
Makefiles should now do "GCC_REQD+=..." instead of "GCC_REQD=...".
2004-02-01 01:31:00 +01:00
|
|
|
|
2004-02-03 22:48:14 +01:00
|
|
|
# Check if any of the versions of GCC in pkgsrc can satisfy the _GCC_REQD
|
|
|
|
# requirement.
|
|
|
|
#
|
2004-02-18 14:32:38 +01:00
|
|
|
.if !defined(_NEED_NEWER_GCC)
|
2004-02-03 22:48:14 +01:00
|
|
|
_PKGSRC_GCC_VERSION= ${_GCC_PKGBASE}-${_GCC_DIST_VERSION}
|
|
|
|
_NEED_NEWER_GCC!= \
|
2004-03-13 20:08:37 +01:00
|
|
|
if ${PKG_ADMIN} pmatch '${_GCC_DEPENDS}' ${_PKGSRC_GCC_VERSION} 2>/dev/null; then \
|
2004-02-03 22:48:14 +01:00
|
|
|
${ECHO} "NO"; \
|
|
|
|
else \
|
|
|
|
${ECHO} "YES"; \
|
|
|
|
fi
|
2004-03-13 21:02:52 +01:00
|
|
|
#MAKEFLAGS+= _NEED_NEWER_GCC=${_NEED_NEWER_GCC}
|
2004-02-18 14:32:38 +01:00
|
|
|
.endif
|
|
|
|
.if !empty(_USE_PKGSRC_GCC:M[yY][eE][sS]) && \
|
|
|
|
!empty(_NEED_NEWER_GCC:M[yY][eE][sS])
|
2007-02-10 09:59:07 +01:00
|
|
|
PKG_FAIL_REASON= "Unable to satisfy dependency: ${_GCC_DEPENDS}"
|
2004-02-18 14:32:38 +01:00
|
|
|
.endif
|
2004-02-03 22:48:14 +01:00
|
|
|
|
2004-08-27 08:29:06 +02:00
|
|
|
# GNU ld option used to set the rpath
|
|
|
|
_LINKER_RPATH_FLAG= -R
|
|
|
|
|
|
|
|
# GCC passes rpath directives to the linker using "-Wl,-R".
|
|
|
|
_COMPILER_RPATH_FLAG= -Wl,${_LINKER_RPATH_FLAG}
|
|
|
|
|
2004-09-23 15:49:21 +02:00
|
|
|
.if !empty(MACHINE_ARCH:Mmips*)
|
|
|
|
_COMPILER_ABI_FLAG.32= -mabi=n32 # ABI == "32" == "n32"
|
|
|
|
_COMPILER_ABI_FLAG.n32= -mabi=n32
|
|
|
|
_COMPILER_ABI_FLAG.o32= -mabi=32
|
|
|
|
_COMPILER_ABI_FLAG.64= -mabi=64
|
|
|
|
|
|
|
|
. if defined(ABI) && !empty(ABI)
|
|
|
|
MABIFLAG= ${_COMPILER_ABI_FLAG.${ABI}}
|
|
|
|
. endif
|
|
|
|
.endif
|
|
|
|
|
2004-02-18 14:32:38 +01:00
|
|
|
.if !empty(_USE_PKGSRC_GCC:M[yY][eE][sS])
|
New compiler specification framework, based on mk/compiler.mk. The
changes from the old compiler.mk are:
* Split apart the compiler-specific logic into separate files. This
should make supporting other compilers a bit easier.
* Deprecate all of the USE_* compiler.mk variables, e.g. USE_GCC[23],
USE_SUNPRO, etc. It's all replaced with a new PKGSRC_COMPILER
variable.
* Clean up the GCC handling so that it's all controlled by a single
variable GCC_REQD. The following behaviour is expected:
(a) If USE_PKGSRC_GCC is defined, then pretend there is no GCC on
the system.
(b) If there is no GCC, then the appropriate GCC corresponding to
GCC_REQD is installed and used.
(c) If there is a GCC, if it satisfies GCC_REQD, then use it;
otherwise install and use the appropriate GCC package.
(d) If lang/gcc is installed and GCC_REQD > 2.95.3, then lang/gcc3
is installed and used.
(e) If lang/gcc3 is installed and GCC_REQD = 2.95.3, then gcc3 is
still used instead of installing lang/gcc.
New features include:
* PKGSRC_COMPILER takes a list of values specifying the chain of
compilers to call when building packages. Valid values are:
distcc distributed C/C++ (chainable)
ccache compiler cache (chainable)
gcc GNU
mipspro Silicon Graphics, Inc. MIPSpro
sunpro Sun Microsystems, Inc. WorkShip/Forte/Sun
ONE Studio
The default is "gcc". You can use ccache and/or distcc with an
appropriate PKGSRC_COMPILER setting, e.g. "ccache distcc gcc".
* Change GCC_REQD to hold a list of values that we scan through to
find the highest version of GCC required by the build. Package
Makefiles should now do "GCC_REQD+=..." instead of "GCC_REQD=...".
2004-02-01 01:31:00 +01:00
|
|
|
#
|
|
|
|
# Ensure that the correct rpath is passed to the linker if we need to
|
|
|
|
# link against gcc shared libs.
|
|
|
|
#
|
|
|
|
_GCC_SUBPREFIX!= \
|
|
|
|
if ${PKG_INFO} -qe ${_GCC_PKGBASE}; then \
|
|
|
|
${PKG_INFO} -f ${_GCC_PKGBASE} | \
|
|
|
|
${GREP} "File:.*bin/gcc" | \
|
2012-04-16 07:00:44 +02:00
|
|
|
${GREP} -v "/gcc[0-9][0-9]*-.*" | \
|
New compiler specification framework, based on mk/compiler.mk. The
changes from the old compiler.mk are:
* Split apart the compiler-specific logic into separate files. This
should make supporting other compilers a bit easier.
* Deprecate all of the USE_* compiler.mk variables, e.g. USE_GCC[23],
USE_SUNPRO, etc. It's all replaced with a new PKGSRC_COMPILER
variable.
* Clean up the GCC handling so that it's all controlled by a single
variable GCC_REQD. The following behaviour is expected:
(a) If USE_PKGSRC_GCC is defined, then pretend there is no GCC on
the system.
(b) If there is no GCC, then the appropriate GCC corresponding to
GCC_REQD is installed and used.
(c) If there is a GCC, if it satisfies GCC_REQD, then use it;
otherwise install and use the appropriate GCC package.
(d) If lang/gcc is installed and GCC_REQD > 2.95.3, then lang/gcc3
is installed and used.
(e) If lang/gcc3 is installed and GCC_REQD = 2.95.3, then gcc3 is
still used instead of installing lang/gcc.
New features include:
* PKGSRC_COMPILER takes a list of values specifying the chain of
compilers to call when building packages. Valid values are:
distcc distributed C/C++ (chainable)
ccache compiler cache (chainable)
gcc GNU
mipspro Silicon Graphics, Inc. MIPSpro
sunpro Sun Microsystems, Inc. WorkShip/Forte/Sun
ONE Studio
The default is "gcc". You can use ccache and/or distcc with an
appropriate PKGSRC_COMPILER setting, e.g. "ccache distcc gcc".
* Change GCC_REQD to hold a list of values that we scan through to
find the highest version of GCC required by the build. Package
Makefiles should now do "GCC_REQD+=..." instead of "GCC_REQD=...".
2004-02-01 01:31:00 +01:00
|
|
|
${SED} -e "s/.*File: *//;s/bin\/gcc.*//;q"; \
|
|
|
|
else \
|
2004-02-03 23:35:05 +01:00
|
|
|
case ${_CC} in \
|
|
|
|
${LOCALBASE}/*) \
|
2004-02-05 00:10:19 +01:00
|
|
|
subprefix="${_CC:H:S/\/bin$//:S/${LOCALBASE}\///:S/${LOCALBASE}//}"; \
|
|
|
|
case "$${subprefix}" in \
|
2004-02-05 00:24:36 +01:00
|
|
|
"") ${ECHO} "$${subprefix}" ;; \
|
2004-02-05 00:25:13 +01:00
|
|
|
*) ${ECHO} "$${subprefix}/" ;; \
|
2004-02-05 00:10:19 +01:00
|
|
|
esac; \
|
2004-02-03 23:35:05 +01:00
|
|
|
;; \
|
|
|
|
*) \
|
2004-02-04 23:33:18 +01:00
|
|
|
${ECHO} "_GCC_SUBPREFIX_not_found/"; \
|
2004-02-03 23:35:05 +01:00
|
|
|
;; \
|
|
|
|
esac; \
|
New compiler specification framework, based on mk/compiler.mk. The
changes from the old compiler.mk are:
* Split apart the compiler-specific logic into separate files. This
should make supporting other compilers a bit easier.
* Deprecate all of the USE_* compiler.mk variables, e.g. USE_GCC[23],
USE_SUNPRO, etc. It's all replaced with a new PKGSRC_COMPILER
variable.
* Clean up the GCC handling so that it's all controlled by a single
variable GCC_REQD. The following behaviour is expected:
(a) If USE_PKGSRC_GCC is defined, then pretend there is no GCC on
the system.
(b) If there is no GCC, then the appropriate GCC corresponding to
GCC_REQD is installed and used.
(c) If there is a GCC, if it satisfies GCC_REQD, then use it;
otherwise install and use the appropriate GCC package.
(d) If lang/gcc is installed and GCC_REQD > 2.95.3, then lang/gcc3
is installed and used.
(e) If lang/gcc3 is installed and GCC_REQD = 2.95.3, then gcc3 is
still used instead of installing lang/gcc.
New features include:
* PKGSRC_COMPILER takes a list of values specifying the chain of
compilers to call when building packages. Valid values are:
distcc distributed C/C++ (chainable)
ccache compiler cache (chainable)
gcc GNU
mipspro Silicon Graphics, Inc. MIPSpro
sunpro Sun Microsystems, Inc. WorkShip/Forte/Sun
ONE Studio
The default is "gcc". You can use ccache and/or distcc with an
appropriate PKGSRC_COMPILER setting, e.g. "ccache distcc gcc".
* Change GCC_REQD to hold a list of values that we scan through to
find the highest version of GCC required by the build. Package
Makefiles should now do "GCC_REQD+=..." instead of "GCC_REQD=...".
2004-02-01 01:31:00 +01:00
|
|
|
fi
|
|
|
|
_GCC_PREFIX= ${LOCALBASE}/${_GCC_SUBPREFIX}
|
2004-02-02 13:27:12 +01:00
|
|
|
_GCC_ARCHDIR!= \
|
New compiler specification framework, based on mk/compiler.mk. The
changes from the old compiler.mk are:
* Split apart the compiler-specific logic into separate files. This
should make supporting other compilers a bit easier.
* Deprecate all of the USE_* compiler.mk variables, e.g. USE_GCC[23],
USE_SUNPRO, etc. It's all replaced with a new PKGSRC_COMPILER
variable.
* Clean up the GCC handling so that it's all controlled by a single
variable GCC_REQD. The following behaviour is expected:
(a) If USE_PKGSRC_GCC is defined, then pretend there is no GCC on
the system.
(b) If there is no GCC, then the appropriate GCC corresponding to
GCC_REQD is installed and used.
(c) If there is a GCC, if it satisfies GCC_REQD, then use it;
otherwise install and use the appropriate GCC package.
(d) If lang/gcc is installed and GCC_REQD > 2.95.3, then lang/gcc3
is installed and used.
(e) If lang/gcc3 is installed and GCC_REQD = 2.95.3, then gcc3 is
still used instead of installing lang/gcc.
New features include:
* PKGSRC_COMPILER takes a list of values specifying the chain of
compilers to call when building packages. Valid values are:
distcc distributed C/C++ (chainable)
ccache compiler cache (chainable)
gcc GNU
mipspro Silicon Graphics, Inc. MIPSpro
sunpro Sun Microsystems, Inc. WorkShip/Forte/Sun
ONE Studio
The default is "gcc". You can use ccache and/or distcc with an
appropriate PKGSRC_COMPILER setting, e.g. "ccache distcc gcc".
* Change GCC_REQD to hold a list of values that we scan through to
find the highest version of GCC required by the build. Package
Makefiles should now do "GCC_REQD+=..." instead of "GCC_REQD=...".
2004-02-01 01:31:00 +01:00
|
|
|
if [ -x ${_GCC_PREFIX}bin/gcc ]; then \
|
2004-05-17 07:33:08 +02:00
|
|
|
${DIRNAME} `${_GCC_PREFIX}bin/gcc ${MABIFLAG} -print-libgcc-file-name 2>/dev/null`; \
|
New compiler specification framework, based on mk/compiler.mk. The
changes from the old compiler.mk are:
* Split apart the compiler-specific logic into separate files. This
should make supporting other compilers a bit easier.
* Deprecate all of the USE_* compiler.mk variables, e.g. USE_GCC[23],
USE_SUNPRO, etc. It's all replaced with a new PKGSRC_COMPILER
variable.
* Clean up the GCC handling so that it's all controlled by a single
variable GCC_REQD. The following behaviour is expected:
(a) If USE_PKGSRC_GCC is defined, then pretend there is no GCC on
the system.
(b) If there is no GCC, then the appropriate GCC corresponding to
GCC_REQD is installed and used.
(c) If there is a GCC, if it satisfies GCC_REQD, then use it;
otherwise install and use the appropriate GCC package.
(d) If lang/gcc is installed and GCC_REQD > 2.95.3, then lang/gcc3
is installed and used.
(e) If lang/gcc3 is installed and GCC_REQD = 2.95.3, then gcc3 is
still used instead of installing lang/gcc.
New features include:
* PKGSRC_COMPILER takes a list of values specifying the chain of
compilers to call when building packages. Valid values are:
distcc distributed C/C++ (chainable)
ccache compiler cache (chainable)
gcc GNU
mipspro Silicon Graphics, Inc. MIPSpro
sunpro Sun Microsystems, Inc. WorkShip/Forte/Sun
ONE Studio
The default is "gcc". You can use ccache and/or distcc with an
appropriate PKGSRC_COMPILER setting, e.g. "ccache distcc gcc".
* Change GCC_REQD to hold a list of values that we scan through to
find the highest version of GCC required by the build. Package
Makefiles should now do "GCC_REQD+=..." instead of "GCC_REQD=...".
2004-02-01 01:31:00 +01:00
|
|
|
else \
|
2004-02-04 23:33:18 +01:00
|
|
|
${ECHO} "_GCC_ARCHDIR_not_found"; \
|
New compiler specification framework, based on mk/compiler.mk. The
changes from the old compiler.mk are:
* Split apart the compiler-specific logic into separate files. This
should make supporting other compilers a bit easier.
* Deprecate all of the USE_* compiler.mk variables, e.g. USE_GCC[23],
USE_SUNPRO, etc. It's all replaced with a new PKGSRC_COMPILER
variable.
* Clean up the GCC handling so that it's all controlled by a single
variable GCC_REQD. The following behaviour is expected:
(a) If USE_PKGSRC_GCC is defined, then pretend there is no GCC on
the system.
(b) If there is no GCC, then the appropriate GCC corresponding to
GCC_REQD is installed and used.
(c) If there is a GCC, if it satisfies GCC_REQD, then use it;
otherwise install and use the appropriate GCC package.
(d) If lang/gcc is installed and GCC_REQD > 2.95.3, then lang/gcc3
is installed and used.
(e) If lang/gcc3 is installed and GCC_REQD = 2.95.3, then gcc3 is
still used instead of installing lang/gcc.
New features include:
* PKGSRC_COMPILER takes a list of values specifying the chain of
compilers to call when building packages. Valid values are:
distcc distributed C/C++ (chainable)
ccache compiler cache (chainable)
gcc GNU
mipspro Silicon Graphics, Inc. MIPSpro
sunpro Sun Microsystems, Inc. WorkShip/Forte/Sun
ONE Studio
The default is "gcc". You can use ccache and/or distcc with an
appropriate PKGSRC_COMPILER setting, e.g. "ccache distcc gcc".
* Change GCC_REQD to hold a list of values that we scan through to
find the highest version of GCC required by the build. Package
Makefiles should now do "GCC_REQD+=..." instead of "GCC_REQD=...".
2004-02-01 01:31:00 +01:00
|
|
|
fi
|
2004-02-18 14:32:38 +01:00
|
|
|
. if empty(_GCC_ARCHDIR:M*not_found*)
|
2004-05-17 07:33:08 +02:00
|
|
|
. if defined(MABIFLAG) && !empty(MABIFLAG)
|
2004-05-17 05:12:46 +02:00
|
|
|
_GCC_PREFIX:= ${_GCC_ARCHDIR:H:H:H:H:H}/
|
|
|
|
_GCC_SUBPREFIX:= ${_GCC_ARCHDIR:H:H:H:H:H:T}/
|
|
|
|
. endif
|
2004-02-18 14:32:38 +01:00
|
|
|
. endif
|
2015-04-03 01:42:15 +02:00
|
|
|
_GCC_LIBDIRS= ${_GCC_ARCHDIR}
|
|
|
|
. if empty(USE_PKGSRC_GCC_RUNTIME:M[Yy][Ee][Ss])
|
2015-04-03 01:50:25 +02:00
|
|
|
_GCC_LIBDIRS+= ${_GCC_PREFIX}lib${LIBABISUFFIX}
|
2015-04-03 01:42:15 +02:00
|
|
|
. endif
|
New compiler specification framework, based on mk/compiler.mk. The
changes from the old compiler.mk are:
* Split apart the compiler-specific logic into separate files. This
should make supporting other compilers a bit easier.
* Deprecate all of the USE_* compiler.mk variables, e.g. USE_GCC[23],
USE_SUNPRO, etc. It's all replaced with a new PKGSRC_COMPILER
variable.
* Clean up the GCC handling so that it's all controlled by a single
variable GCC_REQD. The following behaviour is expected:
(a) If USE_PKGSRC_GCC is defined, then pretend there is no GCC on
the system.
(b) If there is no GCC, then the appropriate GCC corresponding to
GCC_REQD is installed and used.
(c) If there is a GCC, if it satisfies GCC_REQD, then use it;
otherwise install and use the appropriate GCC package.
(d) If lang/gcc is installed and GCC_REQD > 2.95.3, then lang/gcc3
is installed and used.
(e) If lang/gcc3 is installed and GCC_REQD = 2.95.3, then gcc3 is
still used instead of installing lang/gcc.
New features include:
* PKGSRC_COMPILER takes a list of values specifying the chain of
compilers to call when building packages. Valid values are:
distcc distributed C/C++ (chainable)
ccache compiler cache (chainable)
gcc GNU
mipspro Silicon Graphics, Inc. MIPSpro
sunpro Sun Microsystems, Inc. WorkShip/Forte/Sun
ONE Studio
The default is "gcc". You can use ccache and/or distcc with an
appropriate PKGSRC_COMPILER setting, e.g. "ccache distcc gcc".
* Change GCC_REQD to hold a list of values that we scan through to
find the highest version of GCC required by the build. Package
Makefiles should now do "GCC_REQD+=..." instead of "GCC_REQD=...".
2004-02-01 01:31:00 +01:00
|
|
|
_GCC_LDFLAGS= # empty
|
2004-02-18 14:32:38 +01:00
|
|
|
. for _dir_ in ${_GCC_LIBDIRS:N*not_found*}
|
2004-08-27 08:29:06 +02:00
|
|
|
_GCC_LDFLAGS+= -L${_dir_} ${COMPILER_RPATH_FLAG}${_dir_}
|
2004-02-18 14:32:38 +01:00
|
|
|
. endfor
|
2004-02-05 04:35:20 +01:00
|
|
|
LDFLAGS+= ${_GCC_LDFLAGS}
|
2004-02-18 14:32:38 +01:00
|
|
|
.endif
|
New compiler specification framework, based on mk/compiler.mk. The
changes from the old compiler.mk are:
* Split apart the compiler-specific logic into separate files. This
should make supporting other compilers a bit easier.
* Deprecate all of the USE_* compiler.mk variables, e.g. USE_GCC[23],
USE_SUNPRO, etc. It's all replaced with a new PKGSRC_COMPILER
variable.
* Clean up the GCC handling so that it's all controlled by a single
variable GCC_REQD. The following behaviour is expected:
(a) If USE_PKGSRC_GCC is defined, then pretend there is no GCC on
the system.
(b) If there is no GCC, then the appropriate GCC corresponding to
GCC_REQD is installed and used.
(c) If there is a GCC, if it satisfies GCC_REQD, then use it;
otherwise install and use the appropriate GCC package.
(d) If lang/gcc is installed and GCC_REQD > 2.95.3, then lang/gcc3
is installed and used.
(e) If lang/gcc3 is installed and GCC_REQD = 2.95.3, then gcc3 is
still used instead of installing lang/gcc.
New features include:
* PKGSRC_COMPILER takes a list of values specifying the chain of
compilers to call when building packages. Valid values are:
distcc distributed C/C++ (chainable)
ccache compiler cache (chainable)
gcc GNU
mipspro Silicon Graphics, Inc. MIPSpro
sunpro Sun Microsystems, Inc. WorkShip/Forte/Sun
ONE Studio
The default is "gcc". You can use ccache and/or distcc with an
appropriate PKGSRC_COMPILER setting, e.g. "ccache distcc gcc".
* Change GCC_REQD to hold a list of values that we scan through to
find the highest version of GCC required by the build. Package
Makefiles should now do "GCC_REQD+=..." instead of "GCC_REQD=...".
2004-02-01 01:31:00 +01:00
|
|
|
|
|
|
|
# Point the variables that specify the compiler to the installed
|
|
|
|
# GCC executables.
|
|
|
|
#
|
2004-02-07 03:58:10 +01:00
|
|
|
_GCC_DIR= ${WRKDIR}/.gcc
|
Modify the way that the toolchain variables, e.g. CC, CPP, CXX, LD, etc.,
are handled. The idea now is to simply remove the paths in the values
of these variables, leaving behind only the basename plus any arguments,
e.g.:
CC= /usr/local/bin/gcc becomes CC= gcc
CPP= /usr/local/bin/gcc -E becomes CPP= gcc -E
The wrapper scripts are generated for every unique executable mentioned
by the toolchain variables, so for the example above, only a "gcc"
wrapper script is generated for ${CC} and ${CPP}. PKG_{CC,CPP,CXX,etc.}
are the paths to the executables wrapped by the wrapper scripts.
Note that it's now possible to set "CC" to something more than just the
path to the compiler, e.g.
CC= cc -ffast-math -funroll-loops -fomit-frame-pointer
and the full value of ${CC} will be passed through via CONFIGURE_ENV
and MAKE_ENV.
2004-11-30 15:50:37 +01:00
|
|
|
_GCC_VARS= # empty
|
2004-02-07 03:58:10 +01:00
|
|
|
|
2004-02-18 14:32:38 +01:00
|
|
|
.if !empty(_USE_PKGSRC_GCC:M[yY][eE][sS])
|
2004-02-07 03:58:10 +01:00
|
|
|
_GCCBINDIR= ${_GCC_PREFIX}bin
|
2004-02-18 14:32:38 +01:00
|
|
|
.elif !empty(_IS_BUILTIN_GCC:M[yY][eE][sS])
|
2004-02-07 03:58:10 +01:00
|
|
|
_GCCBINDIR= ${_CC:H}
|
2004-02-18 14:32:38 +01:00
|
|
|
.endif
|
2007-08-02 20:19:31 +02:00
|
|
|
.if !empty(USE_CROSS_COMPILE:M[yY][eE][sS])
|
|
|
|
_GCC_BIN_PREFIX= ${MACHINE_GNU_PLATFORM}-
|
|
|
|
.endif
|
|
|
|
.if exists(${_GCCBINDIR}/${_GCC_BIN_PREFIX}gcc)
|
Modify the way that the toolchain variables, e.g. CC, CPP, CXX, LD, etc.,
are handled. The idea now is to simply remove the paths in the values
of these variables, leaving behind only the basename plus any arguments,
e.g.:
CC= /usr/local/bin/gcc becomes CC= gcc
CPP= /usr/local/bin/gcc -E becomes CPP= gcc -E
The wrapper scripts are generated for every unique executable mentioned
by the toolchain variables, so for the example above, only a "gcc"
wrapper script is generated for ${CC} and ${CPP}. PKG_{CC,CPP,CXX,etc.}
are the paths to the executables wrapped by the wrapper scripts.
Note that it's now possible to set "CC" to something more than just the
path to the compiler, e.g.
CC= cc -ffast-math -funroll-loops -fomit-frame-pointer
and the full value of ${CC} will be passed through via CONFIGURE_ENV
and MAKE_ENV.
2004-11-30 15:50:37 +01:00
|
|
|
_GCC_VARS+= CC
|
2007-08-02 20:19:31 +02:00
|
|
|
_GCC_CC= ${_GCC_DIR}/bin/${_GCC_BIN_PREFIX}gcc
|
Modify the way that the toolchain variables, e.g. CC, CPP, CXX, LD, etc.,
are handled. The idea now is to simply remove the paths in the values
of these variables, leaving behind only the basename plus any arguments,
e.g.:
CC= /usr/local/bin/gcc becomes CC= gcc
CPP= /usr/local/bin/gcc -E becomes CPP= gcc -E
The wrapper scripts are generated for every unique executable mentioned
by the toolchain variables, so for the example above, only a "gcc"
wrapper script is generated for ${CC} and ${CPP}. PKG_{CC,CPP,CXX,etc.}
are the paths to the executables wrapped by the wrapper scripts.
Note that it's now possible to set "CC" to something more than just the
path to the compiler, e.g.
CC= cc -ffast-math -funroll-loops -fomit-frame-pointer
and the full value of ${CC} will be passed through via CONFIGURE_ENV
and MAKE_ENV.
2004-11-30 15:50:37 +01:00
|
|
|
_ALIASES.CC= cc gcc
|
2007-08-02 20:19:31 +02:00
|
|
|
CCPATH= ${_GCCBINDIR}/${_GCC_BIN_PREFIX}gcc
|
Modify the way that the toolchain variables, e.g. CC, CPP, CXX, LD, etc.,
are handled. The idea now is to simply remove the paths in the values
of these variables, leaving behind only the basename plus any arguments,
e.g.:
CC= /usr/local/bin/gcc becomes CC= gcc
CPP= /usr/local/bin/gcc -E becomes CPP= gcc -E
The wrapper scripts are generated for every unique executable mentioned
by the toolchain variables, so for the example above, only a "gcc"
wrapper script is generated for ${CC} and ${CPP}. PKG_{CC,CPP,CXX,etc.}
are the paths to the executables wrapped by the wrapper scripts.
Note that it's now possible to set "CC" to something more than just the
path to the compiler, e.g.
CC= cc -ffast-math -funroll-loops -fomit-frame-pointer
and the full value of ${CC} will be passed through via CONFIGURE_ENV
and MAKE_ENV.
2004-11-30 15:50:37 +01:00
|
|
|
PKG_CC:= ${_GCC_CC}
|
2004-02-18 14:32:38 +01:00
|
|
|
.endif
|
2007-08-02 20:19:31 +02:00
|
|
|
.if exists(${_GCCBINDIR}/${_GCC_BIN_PREFIX}cpp)
|
Modify the way that the toolchain variables, e.g. CC, CPP, CXX, LD, etc.,
are handled. The idea now is to simply remove the paths in the values
of these variables, leaving behind only the basename plus any arguments,
e.g.:
CC= /usr/local/bin/gcc becomes CC= gcc
CPP= /usr/local/bin/gcc -E becomes CPP= gcc -E
The wrapper scripts are generated for every unique executable mentioned
by the toolchain variables, so for the example above, only a "gcc"
wrapper script is generated for ${CC} and ${CPP}. PKG_{CC,CPP,CXX,etc.}
are the paths to the executables wrapped by the wrapper scripts.
Note that it's now possible to set "CC" to something more than just the
path to the compiler, e.g.
CC= cc -ffast-math -funroll-loops -fomit-frame-pointer
and the full value of ${CC} will be passed through via CONFIGURE_ENV
and MAKE_ENV.
2004-11-30 15:50:37 +01:00
|
|
|
_GCC_VARS+= CPP
|
2007-08-02 20:19:31 +02:00
|
|
|
_GCC_CPP= ${_GCC_DIR}/bin/${_GCC_BIN_PREFIX}cpp
|
Modify the way that the toolchain variables, e.g. CC, CPP, CXX, LD, etc.,
are handled. The idea now is to simply remove the paths in the values
of these variables, leaving behind only the basename plus any arguments,
e.g.:
CC= /usr/local/bin/gcc becomes CC= gcc
CPP= /usr/local/bin/gcc -E becomes CPP= gcc -E
The wrapper scripts are generated for every unique executable mentioned
by the toolchain variables, so for the example above, only a "gcc"
wrapper script is generated for ${CC} and ${CPP}. PKG_{CC,CPP,CXX,etc.}
are the paths to the executables wrapped by the wrapper scripts.
Note that it's now possible to set "CC" to something more than just the
path to the compiler, e.g.
CC= cc -ffast-math -funroll-loops -fomit-frame-pointer
and the full value of ${CC} will be passed through via CONFIGURE_ENV
and MAKE_ENV.
2004-11-30 15:50:37 +01:00
|
|
|
_ALIASES.CPP= cpp
|
2007-08-02 20:19:31 +02:00
|
|
|
CPPPATH= ${_GCCBINDIR}/${_GCC_BIN_PREFIX}cpp
|
Modify the way that the toolchain variables, e.g. CC, CPP, CXX, LD, etc.,
are handled. The idea now is to simply remove the paths in the values
of these variables, leaving behind only the basename plus any arguments,
e.g.:
CC= /usr/local/bin/gcc becomes CC= gcc
CPP= /usr/local/bin/gcc -E becomes CPP= gcc -E
The wrapper scripts are generated for every unique executable mentioned
by the toolchain variables, so for the example above, only a "gcc"
wrapper script is generated for ${CC} and ${CPP}. PKG_{CC,CPP,CXX,etc.}
are the paths to the executables wrapped by the wrapper scripts.
Note that it's now possible to set "CC" to something more than just the
path to the compiler, e.g.
CC= cc -ffast-math -funroll-loops -fomit-frame-pointer
and the full value of ${CC} will be passed through via CONFIGURE_ENV
and MAKE_ENV.
2004-11-30 15:50:37 +01:00
|
|
|
PKG_CPP:= ${_GCC_CPP}
|
2004-02-18 14:32:38 +01:00
|
|
|
.endif
|
2007-08-02 20:19:31 +02:00
|
|
|
.if exists(${_GCCBINDIR}/${_GCC_BIN_PREFIX}g++)
|
Modify the way that the toolchain variables, e.g. CC, CPP, CXX, LD, etc.,
are handled. The idea now is to simply remove the paths in the values
of these variables, leaving behind only the basename plus any arguments,
e.g.:
CC= /usr/local/bin/gcc becomes CC= gcc
CPP= /usr/local/bin/gcc -E becomes CPP= gcc -E
The wrapper scripts are generated for every unique executable mentioned
by the toolchain variables, so for the example above, only a "gcc"
wrapper script is generated for ${CC} and ${CPP}. PKG_{CC,CPP,CXX,etc.}
are the paths to the executables wrapped by the wrapper scripts.
Note that it's now possible to set "CC" to something more than just the
path to the compiler, e.g.
CC= cc -ffast-math -funroll-loops -fomit-frame-pointer
and the full value of ${CC} will be passed through via CONFIGURE_ENV
and MAKE_ENV.
2004-11-30 15:50:37 +01:00
|
|
|
_GCC_VARS+= CXX
|
2007-08-02 20:19:31 +02:00
|
|
|
_GCC_CXX= ${_GCC_DIR}/bin/${_GCC_BIN_PREFIX}g++
|
Modify the way that the toolchain variables, e.g. CC, CPP, CXX, LD, etc.,
are handled. The idea now is to simply remove the paths in the values
of these variables, leaving behind only the basename plus any arguments,
e.g.:
CC= /usr/local/bin/gcc becomes CC= gcc
CPP= /usr/local/bin/gcc -E becomes CPP= gcc -E
The wrapper scripts are generated for every unique executable mentioned
by the toolchain variables, so for the example above, only a "gcc"
wrapper script is generated for ${CC} and ${CPP}. PKG_{CC,CPP,CXX,etc.}
are the paths to the executables wrapped by the wrapper scripts.
Note that it's now possible to set "CC" to something more than just the
path to the compiler, e.g.
CC= cc -ffast-math -funroll-loops -fomit-frame-pointer
and the full value of ${CC} will be passed through via CONFIGURE_ENV
and MAKE_ENV.
2004-11-30 15:50:37 +01:00
|
|
|
_ALIASES.CXX= c++ g++
|
2007-08-02 20:19:31 +02:00
|
|
|
CXXPATH= ${_GCCBINDIR}/${_GCC_BIN_PREFIX}g++
|
Modify the way that the toolchain variables, e.g. CC, CPP, CXX, LD, etc.,
are handled. The idea now is to simply remove the paths in the values
of these variables, leaving behind only the basename plus any arguments,
e.g.:
CC= /usr/local/bin/gcc becomes CC= gcc
CPP= /usr/local/bin/gcc -E becomes CPP= gcc -E
The wrapper scripts are generated for every unique executable mentioned
by the toolchain variables, so for the example above, only a "gcc"
wrapper script is generated for ${CC} and ${CPP}. PKG_{CC,CPP,CXX,etc.}
are the paths to the executables wrapped by the wrapper scripts.
Note that it's now possible to set "CC" to something more than just the
path to the compiler, e.g.
CC= cc -ffast-math -funroll-loops -fomit-frame-pointer
and the full value of ${CC} will be passed through via CONFIGURE_ENV
and MAKE_ENV.
2004-11-30 15:50:37 +01:00
|
|
|
PKG_CXX:= ${_GCC_CXX}
|
2004-02-18 14:32:38 +01:00
|
|
|
.endif
|
2007-08-02 20:19:31 +02:00
|
|
|
.if exists(${_GCCBINDIR}/${_GCC_BIN_PREFIX}g77)
|
Modify the way that the toolchain variables, e.g. CC, CPP, CXX, LD, etc.,
are handled. The idea now is to simply remove the paths in the values
of these variables, leaving behind only the basename plus any arguments,
e.g.:
CC= /usr/local/bin/gcc becomes CC= gcc
CPP= /usr/local/bin/gcc -E becomes CPP= gcc -E
The wrapper scripts are generated for every unique executable mentioned
by the toolchain variables, so for the example above, only a "gcc"
wrapper script is generated for ${CC} and ${CPP}. PKG_{CC,CPP,CXX,etc.}
are the paths to the executables wrapped by the wrapper scripts.
Note that it's now possible to set "CC" to something more than just the
path to the compiler, e.g.
CC= cc -ffast-math -funroll-loops -fomit-frame-pointer
and the full value of ${CC} will be passed through via CONFIGURE_ENV
and MAKE_ENV.
2004-11-30 15:50:37 +01:00
|
|
|
_GCC_VARS+= FC
|
2007-08-02 20:19:31 +02:00
|
|
|
_GCC_FC= ${_GCC_DIR}/bin/${_GCC_BIN_PREFIX}g77
|
Modify the way that the toolchain variables, e.g. CC, CPP, CXX, LD, etc.,
are handled. The idea now is to simply remove the paths in the values
of these variables, leaving behind only the basename plus any arguments,
e.g.:
CC= /usr/local/bin/gcc becomes CC= gcc
CPP= /usr/local/bin/gcc -E becomes CPP= gcc -E
The wrapper scripts are generated for every unique executable mentioned
by the toolchain variables, so for the example above, only a "gcc"
wrapper script is generated for ${CC} and ${CPP}. PKG_{CC,CPP,CXX,etc.}
are the paths to the executables wrapped by the wrapper scripts.
Note that it's now possible to set "CC" to something more than just the
path to the compiler, e.g.
CC= cc -ffast-math -funroll-loops -fomit-frame-pointer
and the full value of ${CC} will be passed through via CONFIGURE_ENV
and MAKE_ENV.
2004-11-30 15:50:37 +01:00
|
|
|
_ALIASES.FC= f77 g77
|
2014-02-04 13:11:57 +01:00
|
|
|
FC= g77
|
2007-08-02 20:19:31 +02:00
|
|
|
FCPATH= ${_GCCBINDIR}/${_GCC_BIN_PREFIX}g77
|
|
|
|
F77PATH= ${_GCCBINDIR}/${_GCC_BIN_PREFIX}g77
|
Modify the way that the toolchain variables, e.g. CC, CPP, CXX, LD, etc.,
are handled. The idea now is to simply remove the paths in the values
of these variables, leaving behind only the basename plus any arguments,
e.g.:
CC= /usr/local/bin/gcc becomes CC= gcc
CPP= /usr/local/bin/gcc -E becomes CPP= gcc -E
The wrapper scripts are generated for every unique executable mentioned
by the toolchain variables, so for the example above, only a "gcc"
wrapper script is generated for ${CC} and ${CPP}. PKG_{CC,CPP,CXX,etc.}
are the paths to the executables wrapped by the wrapper scripts.
Note that it's now possible to set "CC" to something more than just the
path to the compiler, e.g.
CC= cc -ffast-math -funroll-loops -fomit-frame-pointer
and the full value of ${CC} will be passed through via CONFIGURE_ENV
and MAKE_ENV.
2004-11-30 15:50:37 +01:00
|
|
|
PKG_FC:= ${_GCC_FC}
|
2012-04-25 18:28:18 +02:00
|
|
|
PKGSRC_FORTRAN?= g77
|
2004-02-18 14:32:38 +01:00
|
|
|
.endif
|
2009-09-18 13:27:41 +02:00
|
|
|
.if exists(${_GCCBINDIR}/${_GCC_BIN_PREFIX}gfortran)
|
|
|
|
_GCC_VARS+= FC
|
|
|
|
_GCC_FC= ${_GCC_DIR}/bin/${_GCC_BIN_PREFIX}gfortran
|
|
|
|
_ALIASES.FC= gfortran
|
2014-02-04 13:11:57 +01:00
|
|
|
FC= gfortran
|
2009-09-18 13:27:41 +02:00
|
|
|
FCPATH= ${_GCCBINDIR}/${_GCC_BIN_PREFIX}gfortran
|
|
|
|
F77PATH= ${_GCCBINDIR}/${_GCC_BIN_PREFIX}gfortran
|
|
|
|
PKG_FC:= ${_GCC_FC}
|
2012-04-25 18:28:18 +02:00
|
|
|
PKGSRC_FORTRAN?= gfortran
|
2009-09-18 13:27:41 +02:00
|
|
|
.endif
|
compiler.mk/gcc.mk: Add support for USE_LANGUAGES+= ada
All recent packages featuring Ada code have a hard dependency on the
lang/gnat-aux compiler package. The valid values for USE_LANGUAGES
are c, c99, c++, fortran, fortran77, java, objc, so specifying a
specific compiler was necessary up into now.
One problem with lang/gnat-aux is that it is installed at ${LOCALBASE}
where the lang/gccXX compilers are installed at ${LOCALBASE}/gccXX.
The latter compilers have no possibility of sharing conflicting files
unlike lang/gnat-aux. Rather than fundamentally update the GCC 4.6-based
lang/gnat-aux to avoid these conflicts, a new Ada-capable compiler
based on GCC 4.7 was created with the intent of being supported by
mk/compiler.mk and mk/compiler/gcc.mk.
The Ada packages will be effectively migrated from lang/gnat-aux to the
new lang/gcc-aux compiler, but lang/gcc-aux will remain as a standalone
package as it is the only GCC 4.6-based compiler that builds on
DragonFly and serves it as a world and kernel compile option.
In addition to the current language wrappers, lang/gcc-aux adds
wrappers for "ada" (unique to gcc-aux, hardlinked to gcc driver),
and the gnat, gnatmake, gnatbind, gnatlink, gnatchop, gnatprep,
and gnatls programs. Supporting all of these allows the wrapper
system to be used with Ada packages; currently wrappers are mostly
disabled on them.
The lang/gcc47 implicitly adds support for the "objc-c++" language by
adding it to the USE_LANGUAGES list, but it wasn't really supported.
An attempt was made to better support objc-c++, but this new enumeration
probably still needs work or needs to be removed completely.
Logic for Ada support:
1) All lang/gccXX compilers have version numbers ranging from 2.8.1 to 9.
2) lang/gcc-aux uses the release date as its version number in the form of
YYYYMMDD with a minimum value of 20120614, so there is no version
overlap.
3) When at least one element of USE_LANGUAGES is "ada", the value of
20120614 is added to the set of GCC_REQD which selects lang/gcc-aux.
4) The _NEED_NEWER_GCC check is disabled. It fails and isn't relevant;
unless a package sets GCC_REQD over 20120614, the only way to select
lang/gcc-aux is to specify the Ada language and only one compiler
known to gcc.mk can support it.
2012-07-08 21:57:10 +02:00
|
|
|
.if exists(${_GCCBINDIR}/${_GCC_BIN_PREFIX}ada)
|
|
|
|
_GCC_VARS+= ADA GMK GLK GBD CHP PRP GLS GNT
|
|
|
|
_GCC_ADA= ${_GCC_DIR}/bin/${_GCC_BIN_PREFIX}ada
|
|
|
|
_GCC_GMK= ${_GCC_DIR}/bin/${_GCC_BIN_PREFIX}gnatmake
|
|
|
|
_GCC_GLK= ${_GCC_DIR}/bin/${_GCC_BIN_PREFIX}gnatlink
|
|
|
|
_GCC_GBD= ${_GCC_DIR}/bin/${_GCC_BIN_PREFIX}gnatbind
|
|
|
|
_GCC_CHP= ${_GCC_DIR}/bin/${_GCC_BIN_PREFIX}gnatchop
|
|
|
|
_GCC_PRP= ${_GCC_DIR}/bin/${_GCC_BIN_PREFIX}gnatprep
|
|
|
|
_GCC_GLS= ${_GCC_DIR}/bin/${_GCC_BIN_PREFIX}gnatls
|
|
|
|
_GCC_GNT= ${_GCC_DIR}/bin/${_GCC_BIN_PREFIX}gnat
|
|
|
|
_ALIASES.ADA= ada
|
|
|
|
_ALIASES.GMK= gnatmake
|
|
|
|
_ALIASES.GLK= gnatlink
|
|
|
|
_ALIASES.GBD= gnatbind
|
|
|
|
_ALIASES.CHP= gnatchop
|
|
|
|
_ALIASES.PRP= gnatprep
|
|
|
|
_ALIASES.GLS= gnatls
|
|
|
|
_ALIASES.GNT= gnat
|
|
|
|
ADAPATH= ${_GCCBINDIR}/${_GCC_BIN_PREFIX}ada
|
|
|
|
GMKPATH= ${_GCCBINDIR}/${_GCC_BIN_PREFIX}gnatmake
|
|
|
|
GLKPATH= ${_GCCBINDIR}/${_GCC_BIN_PREFIX}gnatlink
|
|
|
|
GBDPATH= ${_GCCBINDIR}/${_GCC_BIN_PREFIX}gnatbind
|
|
|
|
CHPPATH= ${_GCCBINDIR}/${_GCC_BIN_PREFIX}gnatchop
|
|
|
|
PRPPATH= ${_GCCBINDIR}/${_GCC_BIN_PREFIX}gnatprep
|
|
|
|
GLSPATH= ${_GCCBINDIR}/${_GCC_BIN_PREFIX}gnatls
|
|
|
|
GNTPATH= ${_GCCBINDIR}/${_GCC_BIN_PREFIX}gnat
|
|
|
|
PKG_ADA:= ${_GCC_ADA}
|
|
|
|
PKG_GMK:= ${_GCC_GMK}
|
|
|
|
PKG_GLK:= ${_GCC_GLK}
|
|
|
|
PKG_GBD:= ${_GCC_GBD}
|
|
|
|
PKG_CHP:= ${_GCC_CHP}
|
|
|
|
PKG_PRP:= ${_GCC_PRP}
|
|
|
|
PKG_GLS:= ${_GCC_GLS}
|
|
|
|
PKG_GNT:= ${_GCC_GNT}
|
|
|
|
PKGSRC_ADA?= ada
|
|
|
|
PKGSRC_GMK?= gnatmake
|
|
|
|
PKGSRC_GLK?= gnatlink
|
|
|
|
PKGSRC_GBD?= gnatbind
|
|
|
|
PKGSRC_CHP?= gnatchop
|
|
|
|
PKGSRC_PRP?= gnatprep
|
|
|
|
PKGSRC_GLS?= gnatls
|
|
|
|
PKGSRC_GNT?= gnat
|
|
|
|
.endif
|
Modify the way that the toolchain variables, e.g. CC, CPP, CXX, LD, etc.,
are handled. The idea now is to simply remove the paths in the values
of these variables, leaving behind only the basename plus any arguments,
e.g.:
CC= /usr/local/bin/gcc becomes CC= gcc
CPP= /usr/local/bin/gcc -E becomes CPP= gcc -E
The wrapper scripts are generated for every unique executable mentioned
by the toolchain variables, so for the example above, only a "gcc"
wrapper script is generated for ${CC} and ${CPP}. PKG_{CC,CPP,CXX,etc.}
are the paths to the executables wrapped by the wrapper scripts.
Note that it's now possible to set "CC" to something more than just the
path to the compiler, e.g.
CC= cc -ffast-math -funroll-loops -fomit-frame-pointer
and the full value of ${CC} will be passed through via CONFIGURE_ENV
and MAKE_ENV.
2004-11-30 15:50:37 +01:00
|
|
|
_COMPILER_STRIP_VARS+= ${_GCC_VARS}
|
New compiler specification framework, based on mk/compiler.mk. The
changes from the old compiler.mk are:
* Split apart the compiler-specific logic into separate files. This
should make supporting other compilers a bit easier.
* Deprecate all of the USE_* compiler.mk variables, e.g. USE_GCC[23],
USE_SUNPRO, etc. It's all replaced with a new PKGSRC_COMPILER
variable.
* Clean up the GCC handling so that it's all controlled by a single
variable GCC_REQD. The following behaviour is expected:
(a) If USE_PKGSRC_GCC is defined, then pretend there is no GCC on
the system.
(b) If there is no GCC, then the appropriate GCC corresponding to
GCC_REQD is installed and used.
(c) If there is a GCC, if it satisfies GCC_REQD, then use it;
otherwise install and use the appropriate GCC package.
(d) If lang/gcc is installed and GCC_REQD > 2.95.3, then lang/gcc3
is installed and used.
(e) If lang/gcc3 is installed and GCC_REQD = 2.95.3, then gcc3 is
still used instead of installing lang/gcc.
New features include:
* PKGSRC_COMPILER takes a list of values specifying the chain of
compilers to call when building packages. Valid values are:
distcc distributed C/C++ (chainable)
ccache compiler cache (chainable)
gcc GNU
mipspro Silicon Graphics, Inc. MIPSpro
sunpro Sun Microsystems, Inc. WorkShip/Forte/Sun
ONE Studio
The default is "gcc". You can use ccache and/or distcc with an
appropriate PKGSRC_COMPILER setting, e.g. "ccache distcc gcc".
* Change GCC_REQD to hold a list of values that we scan through to
find the highest version of GCC required by the build. Package
Makefiles should now do "GCC_REQD+=..." instead of "GCC_REQD=...".
2004-02-01 01:31:00 +01:00
|
|
|
|
|
|
|
# Pass the required flags to imake to tell it we're using gcc on Solaris.
|
2004-02-18 14:32:38 +01:00
|
|
|
.if ${OPSYS} == "SunOS"
|
New compiler specification framework, based on mk/compiler.mk. The
changes from the old compiler.mk are:
* Split apart the compiler-specific logic into separate files. This
should make supporting other compilers a bit easier.
* Deprecate all of the USE_* compiler.mk variables, e.g. USE_GCC[23],
USE_SUNPRO, etc. It's all replaced with a new PKGSRC_COMPILER
variable.
* Clean up the GCC handling so that it's all controlled by a single
variable GCC_REQD. The following behaviour is expected:
(a) If USE_PKGSRC_GCC is defined, then pretend there is no GCC on
the system.
(b) If there is no GCC, then the appropriate GCC corresponding to
GCC_REQD is installed and used.
(c) If there is a GCC, if it satisfies GCC_REQD, then use it;
otherwise install and use the appropriate GCC package.
(d) If lang/gcc is installed and GCC_REQD > 2.95.3, then lang/gcc3
is installed and used.
(e) If lang/gcc3 is installed and GCC_REQD = 2.95.3, then gcc3 is
still used instead of installing lang/gcc.
New features include:
* PKGSRC_COMPILER takes a list of values specifying the chain of
compilers to call when building packages. Valid values are:
distcc distributed C/C++ (chainable)
ccache compiler cache (chainable)
gcc GNU
mipspro Silicon Graphics, Inc. MIPSpro
sunpro Sun Microsystems, Inc. WorkShip/Forte/Sun
ONE Studio
The default is "gcc". You can use ccache and/or distcc with an
appropriate PKGSRC_COMPILER setting, e.g. "ccache distcc gcc".
* Change GCC_REQD to hold a list of values that we scan through to
find the highest version of GCC required by the build. Package
Makefiles should now do "GCC_REQD+=..." instead of "GCC_REQD=...".
2004-02-01 01:31:00 +01:00
|
|
|
IMAKEOPTS+= -DHasGcc2=YES -DHasGcc2ForCplusplus=YES
|
2004-02-18 14:32:38 +01:00
|
|
|
.endif
|
New compiler specification framework, based on mk/compiler.mk. The
changes from the old compiler.mk are:
* Split apart the compiler-specific logic into separate files. This
should make supporting other compilers a bit easier.
* Deprecate all of the USE_* compiler.mk variables, e.g. USE_GCC[23],
USE_SUNPRO, etc. It's all replaced with a new PKGSRC_COMPILER
variable.
* Clean up the GCC handling so that it's all controlled by a single
variable GCC_REQD. The following behaviour is expected:
(a) If USE_PKGSRC_GCC is defined, then pretend there is no GCC on
the system.
(b) If there is no GCC, then the appropriate GCC corresponding to
GCC_REQD is installed and used.
(c) If there is a GCC, if it satisfies GCC_REQD, then use it;
otherwise install and use the appropriate GCC package.
(d) If lang/gcc is installed and GCC_REQD > 2.95.3, then lang/gcc3
is installed and used.
(e) If lang/gcc3 is installed and GCC_REQD = 2.95.3, then gcc3 is
still used instead of installing lang/gcc.
New features include:
* PKGSRC_COMPILER takes a list of values specifying the chain of
compilers to call when building packages. Valid values are:
distcc distributed C/C++ (chainable)
ccache compiler cache (chainable)
gcc GNU
mipspro Silicon Graphics, Inc. MIPSpro
sunpro Sun Microsystems, Inc. WorkShip/Forte/Sun
ONE Studio
The default is "gcc". You can use ccache and/or distcc with an
appropriate PKGSRC_COMPILER setting, e.g. "ccache distcc gcc".
* Change GCC_REQD to hold a list of values that we scan through to
find the highest version of GCC required by the build. Package
Makefiles should now do "GCC_REQD+=..." instead of "GCC_REQD=...".
2004-02-01 01:31:00 +01:00
|
|
|
|
2015-04-27 12:33:49 +02:00
|
|
|
# On HP-UX the GCC toolchain must be specifically targeted to an ABI,
|
|
|
|
# -m32 or -m64 are not recognized.
|
|
|
|
.if ${OPSYS} == "HPUX"
|
|
|
|
_COMPILER_ABI_FLAG.32= # empty
|
|
|
|
_COMPILER_ABI_FLAG.64= # empty
|
|
|
|
.else
|
|
|
|
_COMPILER_ABI_FLAG.32= -m32
|
|
|
|
_COMPILER_ABI_FLAG.64= -m64
|
|
|
|
.endif
|
2009-09-12 23:42:27 +02:00
|
|
|
|
2004-02-18 14:32:38 +01:00
|
|
|
.if !empty(_USE_PKGSRC_GCC:M[yY][eE][sS])
|
2004-11-23 06:32:22 +01:00
|
|
|
. if exists(${CCPATH})
|
|
|
|
CC_VERSION_STRING!= ${CCPATH} -v 2>&1
|
2004-02-12 09:54:48 +01:00
|
|
|
CC_VERSION!= \
|
2004-11-23 06:32:22 +01:00
|
|
|
if ${CCPATH} -dumpversion > /dev/null 2>&1; then \
|
|
|
|
${ECHO} "gcc-`${CCPATH} -dumpversion`"; \
|
2004-02-12 09:54:48 +01:00
|
|
|
else \
|
|
|
|
${ECHO} "gcc-${_GCC_REQD}"; \
|
|
|
|
fi
|
2004-05-04 02:11:23 +02:00
|
|
|
|
2004-02-18 14:32:38 +01:00
|
|
|
. else
|
2004-02-12 09:54:48 +01:00
|
|
|
CC_VERSION_STRING= ${CC_VERSION}
|
|
|
|
CC_VERSION= gcc-${_GCC_REQD}
|
2004-02-18 14:32:38 +01:00
|
|
|
. endif
|
|
|
|
.else
|
2004-02-12 09:54:48 +01:00
|
|
|
CC_VERSION_STRING= ${CC_VERSION}
|
|
|
|
CC_VERSION= ${_GCC_PKG}
|
2004-02-18 14:32:38 +01:00
|
|
|
.endif
|
2004-02-05 04:35:20 +01:00
|
|
|
|
|
|
|
# Prepend the path to the compiler to the PATH.
|
2004-02-18 14:32:38 +01:00
|
|
|
.if !empty(_LANGUAGES.gcc)
|
2004-02-07 03:58:10 +01:00
|
|
|
PREPEND_PATH+= ${_GCC_DIR}/bin
|
2004-02-18 14:32:38 +01:00
|
|
|
.endif
|
2004-02-05 04:35:20 +01:00
|
|
|
|
|
|
|
# Add the dependency on GCC.
|
2004-02-18 14:32:38 +01:00
|
|
|
.if !empty(_USE_PKGSRC_GCC:M[yY][eE][sS])
|
2005-03-24 18:46:00 +01:00
|
|
|
. for _dir_ in ${_GCC_PKGSRCDIR}
|
|
|
|
. include "${_dir_}/buildlink3.mk"
|
|
|
|
. endfor
|
2004-02-18 14:32:38 +01:00
|
|
|
.endif
|
2004-02-07 03:58:10 +01:00
|
|
|
|
2012-09-16 09:31:18 +02:00
|
|
|
# Add dependency on GCC libraries if requested.
|
2012-09-17 06:43:56 +02:00
|
|
|
.if (defined(_USE_GCC_SHLIB) && !empty(_USE_GCC_SHLIB:M[Yy][Ee][Ss])) && !empty(USE_PKGSRC_GCC_RUNTIME:M[Yy][Ee][Ss])
|
2012-09-16 09:31:18 +02:00
|
|
|
# Special case packages which are themselves a dependency of gcc runtime.
|
2014-10-31 15:22:20 +01:00
|
|
|
. if empty(PKGPATH:Mdevel/libtool-base) && empty(PKGPATH:Mdevel/binutils) && empty(PKGPATH:Mlang/gcc??)
|
2015-01-01 02:33:05 +01:00
|
|
|
. if !empty(CC_VERSION:Mgcc-4.6*)
|
|
|
|
. include "../../lang/gcc46-libs/buildlink3.mk"
|
|
|
|
. elif !empty(CC_VERSION:Mgcc-4.7*)
|
2013-06-13 12:45:46 +02:00
|
|
|
. include "../../lang/gcc47-libs/buildlink3.mk"
|
2013-07-09 12:13:43 +02:00
|
|
|
. elif !empty(CC_VERSION:Mgcc-4.8*)
|
2013-06-13 12:45:46 +02:00
|
|
|
. include "../../lang/gcc48-libs/buildlink3.mk"
|
2014-09-04 20:52:53 +02:00
|
|
|
. elif !empty(CC_VERSION:Mgcc-4.9*)
|
|
|
|
. include "../../lang/gcc49-libs/buildlink3.mk"
|
2015-07-16 14:09:04 +02:00
|
|
|
. elif !empty(CC_VERSION:Mgcc-5.*)
|
|
|
|
. include "../../lang/gcc5-libs/buildlink3.mk"
|
2013-06-13 12:45:46 +02:00
|
|
|
. else
|
|
|
|
PKG_FAIL_REASON= "No USE_PKGSRC_GCC_RUNTIME support for ${CC_VERSION}"
|
|
|
|
. endif
|
2012-09-16 09:31:18 +02:00
|
|
|
. endif
|
|
|
|
.endif
|
|
|
|
|
Modify the way that the toolchain variables, e.g. CC, CPP, CXX, LD, etc.,
are handled. The idea now is to simply remove the paths in the values
of these variables, leaving behind only the basename plus any arguments,
e.g.:
CC= /usr/local/bin/gcc becomes CC= gcc
CPP= /usr/local/bin/gcc -E becomes CPP= gcc -E
The wrapper scripts are generated for every unique executable mentioned
by the toolchain variables, so for the example above, only a "gcc"
wrapper script is generated for ${CC} and ${CPP}. PKG_{CC,CPP,CXX,etc.}
are the paths to the executables wrapped by the wrapper scripts.
Note that it's now possible to set "CC" to something more than just the
path to the compiler, e.g.
CC= cc -ffast-math -funroll-loops -fomit-frame-pointer
and the full value of ${CC} will be passed through via CONFIGURE_ENV
and MAKE_ENV.
2004-11-30 15:50:37 +01:00
|
|
|
.for _var_ in ${_GCC_VARS}
|
|
|
|
. if !target(${_GCC_${_var_}})
|
2006-12-15 13:46:23 +01:00
|
|
|
override-tools: ${_GCC_${_var_}}
|
Modify the way that the toolchain variables, e.g. CC, CPP, CXX, LD, etc.,
are handled. The idea now is to simply remove the paths in the values
of these variables, leaving behind only the basename plus any arguments,
e.g.:
CC= /usr/local/bin/gcc becomes CC= gcc
CPP= /usr/local/bin/gcc -E becomes CPP= gcc -E
The wrapper scripts are generated for every unique executable mentioned
by the toolchain variables, so for the example above, only a "gcc"
wrapper script is generated for ${CC} and ${CPP}. PKG_{CC,CPP,CXX,etc.}
are the paths to the executables wrapped by the wrapper scripts.
Note that it's now possible to set "CC" to something more than just the
path to the compiler, e.g.
CC= cc -ffast-math -funroll-loops -fomit-frame-pointer
and the full value of ${CC} will be passed through via CONFIGURE_ENV
and MAKE_ENV.
2004-11-30 15:50:37 +01:00
|
|
|
${_GCC_${_var_}}:
|
2008-02-07 21:59:05 +01:00
|
|
|
${RUN}${MKDIR} ${.TARGET:H}
|
2009-05-30 20:16:26 +02:00
|
|
|
. if !empty(COMPILER_USE_SYMLINKS:M[Yy][Ee][Ss])
|
2008-02-07 21:59:05 +01:00
|
|
|
${RUN}${RM} -f ${.TARGET}
|
|
|
|
${RUN}${LN} -s ${_GCCBINDIR}/${.TARGET:T} ${.TARGET}
|
2005-01-21 22:59:14 +01:00
|
|
|
. else
|
2008-02-07 21:59:05 +01:00
|
|
|
${RUN} \
|
2004-02-09 01:37:32 +01:00
|
|
|
(${ECHO} '#!${TOOLS_SHELL}'; \
|
Modify the way that the toolchain variables, e.g. CC, CPP, CXX, LD, etc.,
are handled. The idea now is to simply remove the paths in the values
of these variables, leaving behind only the basename plus any arguments,
e.g.:
CC= /usr/local/bin/gcc becomes CC= gcc
CPP= /usr/local/bin/gcc -E becomes CPP= gcc -E
The wrapper scripts are generated for every unique executable mentioned
by the toolchain variables, so for the example above, only a "gcc"
wrapper script is generated for ${CC} and ${CPP}. PKG_{CC,CPP,CXX,etc.}
are the paths to the executables wrapped by the wrapper scripts.
Note that it's now possible to set "CC" to something more than just the
path to the compiler, e.g.
CC= cc -ffast-math -funroll-loops -fomit-frame-pointer
and the full value of ${CC} will be passed through via CONFIGURE_ENV
and MAKE_ENV.
2004-11-30 15:50:37 +01:00
|
|
|
${ECHO} 'exec ${_GCCBINDIR}/${.TARGET:T} "$$@"'; \
|
2004-02-08 04:29:16 +01:00
|
|
|
) > ${.TARGET}
|
2008-02-07 21:59:05 +01:00
|
|
|
${RUN}${CHMOD} +x ${.TARGET}
|
2005-01-21 22:59:14 +01:00
|
|
|
. endif
|
Modify the way that the toolchain variables, e.g. CC, CPP, CXX, LD, etc.,
are handled. The idea now is to simply remove the paths in the values
of these variables, leaving behind only the basename plus any arguments,
e.g.:
CC= /usr/local/bin/gcc becomes CC= gcc
CPP= /usr/local/bin/gcc -E becomes CPP= gcc -E
The wrapper scripts are generated for every unique executable mentioned
by the toolchain variables, so for the example above, only a "gcc"
wrapper script is generated for ${CC} and ${CPP}. PKG_{CC,CPP,CXX,etc.}
are the paths to the executables wrapped by the wrapper scripts.
Note that it's now possible to set "CC" to something more than just the
path to the compiler, e.g.
CC= cc -ffast-math -funroll-loops -fomit-frame-pointer
and the full value of ${CC} will be passed through via CONFIGURE_ENV
and MAKE_ENV.
2004-11-30 15:50:37 +01:00
|
|
|
. for _alias_ in ${_ALIASES.${_var_}:S/^/${.TARGET:H}\//}
|
2008-02-07 21:59:05 +01:00
|
|
|
${RUN} \
|
Modify the way that the toolchain variables, e.g. CC, CPP, CXX, LD, etc.,
are handled. The idea now is to simply remove the paths in the values
of these variables, leaving behind only the basename plus any arguments,
e.g.:
CC= /usr/local/bin/gcc becomes CC= gcc
CPP= /usr/local/bin/gcc -E becomes CPP= gcc -E
The wrapper scripts are generated for every unique executable mentioned
by the toolchain variables, so for the example above, only a "gcc"
wrapper script is generated for ${CC} and ${CPP}. PKG_{CC,CPP,CXX,etc.}
are the paths to the executables wrapped by the wrapper scripts.
Note that it's now possible to set "CC" to something more than just the
path to the compiler, e.g.
CC= cc -ffast-math -funroll-loops -fomit-frame-pointer
and the full value of ${CC} will be passed through via CONFIGURE_ENV
and MAKE_ENV.
2004-11-30 15:50:37 +01:00
|
|
|
if [ ! -x "${_alias_}" ]; then \
|
2005-01-21 22:59:14 +01:00
|
|
|
${LN} -f -s ${.TARGET:T} ${_alias_}; \
|
Modify the way that the toolchain variables, e.g. CC, CPP, CXX, LD, etc.,
are handled. The idea now is to simply remove the paths in the values
of these variables, leaving behind only the basename plus any arguments,
e.g.:
CC= /usr/local/bin/gcc becomes CC= gcc
CPP= /usr/local/bin/gcc -E becomes CPP= gcc -E
The wrapper scripts are generated for every unique executable mentioned
by the toolchain variables, so for the example above, only a "gcc"
wrapper script is generated for ${CC} and ${CPP}. PKG_{CC,CPP,CXX,etc.}
are the paths to the executables wrapped by the wrapper scripts.
Note that it's now possible to set "CC" to something more than just the
path to the compiler, e.g.
CC= cc -ffast-math -funroll-loops -fomit-frame-pointer
and the full value of ${CC} will be passed through via CONFIGURE_ENV
and MAKE_ENV.
2004-11-30 15:50:37 +01:00
|
|
|
fi
|
|
|
|
. endfor
|
2004-02-18 14:32:38 +01:00
|
|
|
. endif
|
|
|
|
.endfor
|
|
|
|
|
2013-06-15 21:06:31 +02:00
|
|
|
# On systems without a Fortran compiler, pull one in if needed.
|
|
|
|
# The default is g95 as it supports a modern dialect, but it can
|
2013-06-16 00:32:18 +02:00
|
|
|
# be overridden in mk.conf to use only f2c.
|
2005-01-12 16:31:58 +01:00
|
|
|
#
|
2010-12-26 15:13:44 +01:00
|
|
|
PKGSRC_FORTRAN?=g95
|
2009-07-08 23:25:30 +02:00
|
|
|
|
|
|
|
_GCC_NEEDS_A_FORTRAN= no
|
2012-02-28 13:57:24 +01:00
|
|
|
.if empty(_USE_PKGSRC_GCC:M[yY][eE][sS]) && !exists(${FCPATH})
|
2009-07-08 23:25:30 +02:00
|
|
|
_GCC_NEEDS_A_FORTRAN= yes
|
2005-01-12 16:31:58 +01:00
|
|
|
.else
|
|
|
|
. for _pattern_ in 0.* 1.[0-4] 1.[0-4].*
|
|
|
|
. if !empty(MACHINE_PLATFORM:MNetBSD-${_pattern_}-*)
|
2009-07-08 23:25:30 +02:00
|
|
|
_GCC_NEEDS_A_FORTRAN= yes
|
2005-01-12 16:31:58 +01:00
|
|
|
. endif
|
|
|
|
. endfor
|
|
|
|
.endif
|
2009-07-08 23:25:30 +02:00
|
|
|
.if !empty(_GCC_NEEDS_A_FORTRAN:M[yY][eE][sS])
|
|
|
|
. include "../../mk/compiler/${PKGSRC_FORTRAN}.mk"
|
2005-01-12 16:31:58 +01:00
|
|
|
.endif
|
|
|
|
|
2013-11-23 09:55:28 +01:00
|
|
|
.if ${OPSYS} == "Interix" && !empty(_GCCBINDIR:M/opt/gcc.*)
|
|
|
|
COMPILER_INCLUDE_DIRS= ${_GCCBINDIR:H}/include ${_OPSYS_INCLUDE_DIRS}
|
|
|
|
COMPILER_LIB_DIRS= ${_GCCBINDIR:H}/lib ${_OPSYS_LIB_DIRS}
|
|
|
|
.endif
|
|
|
|
|
2004-02-18 14:32:38 +01:00
|
|
|
.endif # COMPILER_GCC_MK
|