2012-02-01 22:17:05 +01:00
|
|
|
# $NetBSD: buildlink3.mk,v 1.7 2012/02/01 21:17:05 hans Exp $
|
2009-09-18 13:24:50 +02:00
|
|
|
|
|
|
|
BUILDLINK_TREE+= gcc44
|
|
|
|
|
|
|
|
.if !defined(GCC44_BUILDLINK3_MK)
|
|
|
|
GCC44_BUILDLINK3_MK:=
|
|
|
|
|
2010-03-15 09:27:06 +01:00
|
|
|
FIND_PREFIX:= BUILDLINK_PREFIX.gcc44=gcc44
|
2009-09-18 13:24:50 +02:00
|
|
|
.include "../../mk/find-prefix.mk"
|
|
|
|
|
2009-09-18 15:35:41 +02:00
|
|
|
_GCC44_SUBDIR= gcc44
|
|
|
|
_GCC44_PREFIX= ${BUILDLINK_PREFIX.gcc44}/${_GCC44_SUBDIR}
|
|
|
|
|
2009-09-18 13:24:50 +02:00
|
|
|
BUILDLINK_API_DEPENDS.gcc44+= gcc44>=${_GCC_REQD}
|
2011-04-22 15:41:54 +02:00
|
|
|
BUILDLINK_ABI_DEPENDS.gcc44?= gcc44>=4.4.5nb2
|
2009-09-18 13:24:50 +02:00
|
|
|
BUILDLINK_PKGSRCDIR.gcc44?= ../../lang/gcc44
|
|
|
|
|
2010-03-15 09:27:06 +01:00
|
|
|
.if exists(${_GCC44_PREFIX}/bin/gcc)
|
2009-09-18 13:24:50 +02:00
|
|
|
|
|
|
|
# logic for detecting the ADA compiler (not yet supported)
|
2009-09-18 15:35:41 +02:00
|
|
|
#gcc44_GNAT1!=${_GCC44_PREFIX}/bin/gcc -print-prog-name=gnat1
|
2010-03-15 09:27:06 +01:00
|
|
|
#. if exists(${gcc44_GNAT1})
|
2009-09-18 15:35:41 +02:00
|
|
|
#CONFIGURE_ENV+= ADAC=${_GCC44_PREFIX}/bin/gcc
|
|
|
|
#MAKE_ENV+= ADAC=${_GCC44_PREFIX}/bin/gcc
|
2010-03-15 09:27:06 +01:00
|
|
|
#. endif
|
2009-09-18 13:24:50 +02:00
|
|
|
|
|
|
|
# add libraries
|
2009-09-18 15:35:41 +02:00
|
|
|
BUILDLINK_LIBDIRS.gcc44+= ${_GCC44_SUBDIR}/lib
|
2009-09-18 13:24:50 +02:00
|
|
|
|
|
|
|
# find the gcc architecture
|
2009-09-18 15:35:41 +02:00
|
|
|
gcc44_GCC_ARCHDIR!= ${DIRNAME} `${_GCC44_PREFIX}/bin/gcc --print-libgcc-file-name`
|
2009-09-18 13:24:50 +02:00
|
|
|
|
|
|
|
# add the architecture dep libraries
|
2010-03-15 09:27:06 +01:00
|
|
|
. if empty(gcc44_GCC_ARCHDIR:M*not_found*)
|
2009-09-18 13:24:50 +02:00
|
|
|
BUILDLINK_LIBDIRS.gcc44+= ${gcc44_GCC_ARCHDIR:S/^${BUILDLINK_PREFIX.gcc44}\///}/
|
|
|
|
|
|
|
|
# add the ada libraries (not yet supported)
|
2010-03-15 09:27:06 +01:00
|
|
|
#. if exists(${gcc44_GNAT1})
|
2009-09-18 13:24:50 +02:00
|
|
|
#BUILDLINK_LIBDIRS.gcc44+= ${gcc44_GCC_ARCHDIR:S/^${BUILDLINK_PREFIX.gcc44}\///}/adalib
|
2010-03-15 09:27:06 +01:00
|
|
|
#. endif
|
2009-09-18 13:24:50 +02:00
|
|
|
|
|
|
|
# add the header files
|
2009-09-18 15:35:41 +02:00
|
|
|
BUILDLINK_INCDIRS.gcc44+= ${_GCC44_SUBDIR}/include ${gcc44_GCC_ARCHDIR:S/^${BUILDLINK_PREFIX.gcc44}\///}/include
|
2009-09-18 13:24:50 +02:00
|
|
|
. endif
|
2010-03-15 09:27:06 +01:00
|
|
|
.endif
|
2009-09-18 13:24:50 +02:00
|
|
|
|
|
|
|
BUILDLINK_FILES_CMD.gcc44= \
|
|
|
|
(cd ${BUILDLINK_PREFIX.gcc44} && \
|
2012-02-01 22:17:05 +01:00
|
|
|
${FIND} ${_GCC44_SUBDIR}/bin ${_GCC44_SUBDIR}/include ${_GCC44_SUBDIR}/libexec ${_GCC44_SUBDIR}/lib \( -type f -o -type l \) -print)
|
2009-09-18 13:24:50 +02:00
|
|
|
|
2011-07-14 21:54:55 +02:00
|
|
|
# When not using the GNU linker, gcc will always link shared libraries
|
|
|
|
# against the shared version of libgcc. Always enable _USE_GCC_SHILB on
|
|
|
|
# platforms that don't use the GNU linker, such as SunOS.
|
|
|
|
.include "../../mk/bsd.prefs.mk"
|
|
|
|
.if ${OPSYS} == "SunOS"
|
|
|
|
_USE_GCC_SHLIB= yes
|
|
|
|
.endif
|
|
|
|
|
2009-09-18 13:24:50 +02:00
|
|
|
# Packages that link against shared libraries need a full dependency.
|
2010-03-15 09:27:06 +01:00
|
|
|
.if defined(_USE_GCC_SHLIB)
|
2009-09-18 13:24:50 +02:00
|
|
|
BUILDLINK_DEPMETHOD.gcc44+= full
|
2010-03-15 09:27:06 +01:00
|
|
|
.else
|
2009-09-18 13:24:50 +02:00
|
|
|
BUILDLINK_DEPMETHOD.gcc44?= build
|
2010-03-15 09:27:06 +01:00
|
|
|
.endif
|
2009-09-18 13:24:50 +02:00
|
|
|
|
|
|
|
.include "../../mk/pthread.buildlink3.mk"
|
2011-04-14 21:38:13 +02:00
|
|
|
pkgbase := gcc44
|
|
|
|
.include "../../mk/pkg-build-options.mk"
|
|
|
|
.if !empty(PKG_BUILD_OPTIONS.gcc44:Mnls)
|
2009-09-18 13:24:50 +02:00
|
|
|
.include "../../devel/gettext-lib/buildlink3.mk"
|
2011-04-14 21:38:13 +02:00
|
|
|
.endif
|
2009-09-18 13:24:50 +02:00
|
|
|
.endif # GCC44_BUILDLINK3_MK
|
|
|
|
|
|
|
|
BUILDLINK_TREE+= -gcc44
|