These changes are for NetBSD only although non-functional OpenBSD support continues to be added. The biggest change is configuring the compiler to use the gold linker from binutils 2.24 instead of the system linker. The ld.bfd linker from binutils 2.24 is buggy on NetBSD and OpenBSD; it cannot properly produce/recognize PIC files in every case, which is why gcc-aux had been limited to the system linker. The system linker was too old for gcc-aux and devel/gps failed to link because of it. At the same time, the dormant dl_iterate_phdr support has been activated for NetBSD. It seems to work; the Ada testsuite still passes perfectly. Due to lack of testing, gold is restricted from building on NetBSD 5, which means lang/gcc-aux will fail to build as a result. If someone verifies gold builds on NetBSD 5, then the restriction on binutils can be removed and lang/gcc-aux will be able to build on NetBSD 5 again.
124 lines
3.5 KiB
Makefile
124 lines
3.5 KiB
Makefile
# $NetBSD: options.mk,v 1.4 2014/05/13 08:18:04 marino Exp $
|
|
|
|
PKG_OPTIONS_VAR= PKG_OPTIONS.gcc-aux
|
|
PKG_SUPPORTED_OPTIONS= fortran objc testsuite nls static bootstrap
|
|
PKG_SUGGESTED_OPTIONS= fortran objc nls
|
|
|
|
.include "../../mk/bsd.options.mk"
|
|
|
|
|
|
# Bootstrap is essentially a maintainer option and it will ignore
|
|
# all other options because it is intent on building a bootstrap compiler.
|
|
|
|
|
|
#############################
|
|
## ADD LANGUAGE: Fortran ##
|
|
#############################
|
|
|
|
.if empty(PKG_OPTIONS:Mfortran) || !empty(PKG_OPTIONS:Mbootstrap)
|
|
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) && empty(PKG_OPTIONS:Mbootstrap)
|
|
LANGS+= objc
|
|
.endif
|
|
|
|
|
|
#########################
|
|
## TESTSUITE SUPPORT ##
|
|
#########################
|
|
|
|
.if !empty(PKG_OPTIONS:Mtestsuite) && empty(PKG_OPTIONS:Mbootstrap)
|
|
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) && empty(PKG_OPTIONS:Mbootstrap)
|
|
USE_BUILTIN.iconv= no
|
|
USE_TOOLS+= msgfmt
|
|
EXTRA_CONFARGS+= --enable-nls
|
|
EXTRA_CONFARGS+= --with-libiconv-prefix=${BUILDLINK_PREFIX.iconv}
|
|
MY_MAKE_ENV+= ICONVPREFIX=${BUILDLINK_PREFIX.iconv}
|
|
.include "../../converters/libiconv/buildlink3.mk"
|
|
.include "../../devel/gettext-lib/buildlink3.mk"
|
|
.else
|
|
EXTRA_CONFARGS+= --disable-nls
|
|
.endif
|
|
|
|
|
|
###############################
|
|
## STATICALLY BUILT OPTION ##
|
|
###############################
|
|
|
|
.if !empty(PKG_OPTIONS:Mstatic)
|
|
STATIC_BUILD = yes
|
|
.endif
|
|
|
|
.if defined(STATIC_BUILD) && empty(PKG_OPTIONS:Mbootstrap)
|
|
. if ${OPSYS} == SunOS
|
|
PKG_FAIL_REASON+= SunOS does not support static builds
|
|
. else
|
|
EXTRA_CONFARGS+= --with-stage1-ldflags=-static
|
|
. endif
|
|
.endif
|
|
|
|
|
|
#################################
|
|
## BOOTSTRAP COMPILER OPTION ##
|
|
#################################
|
|
|
|
# Solaris does not support static linking system libraries, so bootstraps
|
|
# on SunOS require gmp&co to be built with gcc. Also, OpenBSD x86-64
|
|
# fails configuration during the linking of -lmpc -lmpfr -lgmp in a contest;
|
|
# it complains of missing references in libm. These libraries are built by
|
|
# a different compiler (the base) so perhaps that's the problem. Building
|
|
# gmp&co in the tree allows the configure step to succeed on OpenBSD.
|
|
|
|
.if ${OPSYS} == OpenBSD || ${OPSYS} == MirBSD || \
|
|
(${OPSYS} == SunOS && !empty(PKG_OPTIONS:Mbootstrap))
|
|
.include "../../devel/gmp/inplace.mk"
|
|
.include "../../math/mpcomplex/inplace.mk"
|
|
.include "../../math/mpfr/inplace.mk"
|
|
.else
|
|
EXTRA_CONFARGS+= --with-gmp=${BUILDLINK_PREFIX.gmp}
|
|
EXTRA_CONFARGS+= --with-mpfr=${BUILDLINK_PREFIX.mpfr}
|
|
EXTRA_CONFARGS+= --with-mpc=${BUILDLINK_PREFIX.mpcomplex}
|
|
.include "../../devel/gmp/buildlink3.mk"
|
|
.include "../../math/mpfr/buildlink3.mk"
|
|
.include "../../math/mpcomplex/buildlink3.mk"
|
|
.endif
|
|
|
|
.if !empty(PKG_OPTIONS:Mbootstrap)
|
|
EXTRA_CONFARGS+= --disable-shared --disable-lto
|
|
EXTRA_CONFARGS+= --disable-libstdcxx-pch
|
|
. if ${OPSYS} != SunOS
|
|
EXTRA_CONFARGS+= --with-stage1-ldflags=-static
|
|
EXTRA_CONFARGS+= --with-boot-ldflags=-static
|
|
EXTRA_CONFARGS+= --with-system-zlib
|
|
. endif
|
|
.else
|
|
EXTRA_CONFARGS+= --enable-shared
|
|
EXTRA_CONFARGS+= --disable-bootstrap
|
|
|
|
.endif
|