pkgsrc/lang/gcc-aux/options.mk
marino bb0ffc7bb6 Import lang/gcc-aux based on gcc-4.7.1
The primary difference between this compiler package and lang/gcc47 is
that lang/gcc-aux supports the Ada language.  Additionally, it is
intended that the USE_LANGUAGES makefile variable whill be extended to
recognize "ada" as a valid language, and that specifying it will cause
lang/gcc-aux to be used to build the package.

All current Ada-based packages will be modified to build with
USE_LANGUAGES+= ada rather than specifying a dependency on lang/gnat-aux,
the other Ada-capable compiler in pkgsrc based on gcc-4.6.3.

lang/gcc-aux supports C, C++, Objective-C, Fortran, and Ada by default,
but the latter four languages can be disabled via the options framework.
The three non-default options are "nls", "testsuite" and "static" which
enable Native Language Support, languages tests, and building the compiler
statically.

The "static" option is unalterably enabled for NetBSD in order to use dl_iterate_phdr error handling on NetBSD 6.  On the NetBSD 6 beta builds,
exceptions won't unwind properly with the libgcc_s shared library, and
the issue seems to be external to gcc-aux.  It's hoped the libgcc_s
exception handling works on NetBSD 5.x series as dl_iterate_phdr isn't
supported by rtld there, but gcc-aux hasn't been tested on 5.x yet.

lang/gcc-aux can be built by 5 platforms currently:  NetBSD i386/x86_64,
DragonFly i386/x86_64, and OpenSolaris i386.  New platform support
requires new bootstraps.  FreeBSD i386/x86_64 could be added easily as
bootstrap compilers are available for FreeBSD ports lang/gnat-aux.
OpenBSD bootstrap compilers have been built but never used, but further
patches are on a couple of gcc's configuration files are needed as well
as testing to provide OpenBSD support.

All five platforms pass all tests (over 3200) in the Ada testsuite.

See http://gcc.gnu.org/gcc-4.7/changes.html

for more information about improvements over the GCC 4.6 series.
2012-07-08 19:30:38 +00:00

96 lines
2.1 KiB
Makefile

# $NetBSD: options.mk,v 1.1 2012/07/08 19:30:38 marino Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.gcc-aux
PKG_SUPPORTED_OPTIONS= ada cxx fortran objc testsuite nls static
PKG_SUGGESTED_OPTIONS= ada cxx fortran objc
.if ${OPSYS} == "NetBSD"
PKG_SUGGESTED_OPTIONS+= static
.endif
.include "../../mk/bsd.options.mk"
#########################
## ADD LANGUAGE: Ada ##
#########################
.if !empty(PKG_OPTIONS:Mada)
LANGS+= ada
APPLY_DIFFS+= ada
.endif
#########################
## ADD LANGUAGE: C++ ##
#########################
.if !empty(PKG_OPTIONS:Mcxx)
LANGS+= c++
APPLY_DIFFS+= cxx
.endif
#############################
## ADD LANGUAGE: Fortran ##
#############################
.if empty(PKG_OPTIONS:Mfortran)
EXTRA_CONFARGS+= --disable-libquadmath
.else
LANGS+= fortran
APPLY_DIFFS+= fortran
.if ${OPSYS} == "NetBSD"
EXTRA_CONFARGS+= --disable-libquadmath
.else
EXTRA_CONFARGS+= --enable-libquadmath
.endif
.endif
#################################
## ADD LANGUAGE: Objective-C ##
#################################
.if !empty(PKG_OPTIONS:Mobjc)
LANGS+= objc
.endif
#########################
## TESTSUITE SUPPORT ##
#########################
.if !empty(PKG_OPTIONS:Mtestsuite)
BUILD_DEPENDS+= dejagnu>=1.4:../../devel/dejagnu
APPLY_DIFFS+= ada-testsuite
APPLY_DIFFS+= cxx-testsuite
APPLY_DIFFS+= gcc-testsuite
APPLY_DIFFS+= fortran-testsuite
.endif
#################################
## NATIONAL LANGUAGE SUPPORT ##
#################################
.if !empty(PKG_OPTIONS:Mnls)
USE_TOOLS+= msgfmt
EXTRA_CONFARGS+= --enable-nls
.include "../../devel/gettext-lib/buildlink3.mk"
.else
EXTRA_CONFARGS+= --disable-nls
.endif
###############################
## STATICALLY BUILT OPTION ##
###############################
# NetBSD must be built statically to support dl_iterate_phdr
# error handling. The base compiler doesn't support despite it although
# NetBSD's realtime linker supports dl_iterate_phdr
# Setting the option by default on NetBSD is cosmetic; regardless of
# setting, NetBSD will always be built statically.
#
# The "static" option is handled in the post-extract phase.