2019-11-03 11:39:04 +01:00
|
|
|
# $NetBSD: Makefile,v 1.78 2019/11/03 10:39:06 rillig Exp $
|
2002-04-30 14:33:29 +02:00
|
|
|
|
2016-08-15 21:29:13 +02:00
|
|
|
DISTNAME= binutils-2.26.1
|
2018-05-28 16:15:38 +02:00
|
|
|
PKGREVISION= 1
|
2002-04-30 14:33:29 +02:00
|
|
|
CATEGORIES= devel
|
|
|
|
MASTER_SITES= ${MASTER_SITE_GNU:=binutils/}
|
|
|
|
|
2006-03-04 22:28:51 +01:00
|
|
|
MAINTAINER= pkgsrc-users@NetBSD.org
|
2017-08-16 21:59:50 +02:00
|
|
|
HOMEPAGE= https://www.gnu.org/software/binutils/
|
2002-04-30 14:33:29 +02:00
|
|
|
COMMENT= GNU binary utilities
|
2012-07-23 14:24:34 +02:00
|
|
|
LICENSE= gnu-gpl-v2 AND gnu-gpl-v3 AND gnu-lgpl-v2 AND gnu-lgpl-v3
|
|
|
|
EXTRACT_SUFX= .tar.bz2
|
2002-04-30 14:33:29 +02:00
|
|
|
|
2015-03-20 23:46:09 +01:00
|
|
|
# bfd.h used without depending on it
|
|
|
|
MAKE_JOBS_SAFE= no
|
|
|
|
|
2004-01-31 12:25:31 +01:00
|
|
|
CONFLICTS= avr-binutils<2.13.2.1nb1
|
|
|
|
|
2019-11-03 11:39:04 +01:00
|
|
|
USE_PKGLOCALEDIR= yes
|
2005-03-17 23:49:09 +01:00
|
|
|
REPLACE_LOCALEDIR_PATTERNS+= Make-in
|
Update to binutils "2.14.0.0". (The ".0.0" is to allow any PKGREVISION
bumps to correctly sort before "2.14.1", and "2.14.1.1", and so on.)
Follows is a list of additions to the "NEWS" files since 2.13. The "NEWS"
files were apparently not updated for "2.13.2.1" however, so all of this
is not really new. The "--with-sysroot" and "--with-lib-path" configure
options for "ld" are truly new, though, and the package now takes advantage
of "--with-lib-path" to prevent picking up crud from "${PREFIX}/lib", to
better support using this "ld" with which to build pkgsrc packages.
----- binutils/binutils/NEWS -----
* Added --info switch to objcopy and strip.
* Support for Vitesse IQ2000 added by Red Hat.
* Added 'S' encoding to strings to allow the display of 8-bit characters.
* Added --prefix-symbols=<text>, --prefix-sections=<text> and
--prefix-alloc-sections=<text> to objcopy.
* readelf can handle the extensions to the DWARF2 spec used by the Unified
Parallel C compiler.
* BFD no longer declares a "boolean" type, to avoid clashes with other
headers that declare the same. Users of BFD should replace boolean,
false and true, with int, 0 and 1, or define their own boolean type.
* Support for IP2K added by Denis Chertykov.
----- binutils/gas/NEWS -----
* Added support for MIPS32 Release 2.
* Added support for Xtensa architecture.
* Support for Intel's iWMMXt processor (an ARM variant) added.
* An assembler test generator has been contributed and an example file that
uses it (gas/testsuite/gas/all/test-gen.c and test-exmaple.c).
* Support for SH2E added.
* GASP has now been removed.
* Support for Texas Instruments TMS320C4x and TMS320C3x series of
DSP's contributed by Michael Hayes and Svein E. Seldal.
* Support for the Ubicom IP2xxx microcontroller added.
----- binutils/ld/NEWS -----
* Added support for Xtensa architecture.
* Added --with-sysroot configure switch to specify a target system root, for
linking against a target filesystem image.
* Added --accept-unknown-linker-format to restore old linker behaviour (pre
2.14) of silently accepting and linking in any files in an unknown binary
file format.
* Added --no-omagic to undo the effects of the -N option.
* Support for Texas Instruments TMS320C4x and TMS320C3x series of
DSP's contributed by Michael Hayes and Svein E. Seldal.
* Added --with-lib-path configure switch to specify default value for
LIB_PATH.
* ARM port to QNX operating system added by Graeme Peterson.
* IP2K support added by Denis Chertykov.
2003-07-14 21:01:35 +02:00
|
|
|
|
2012-07-23 14:24:34 +02:00
|
|
|
USE_LANGUAGES= c c++
|
|
|
|
USE_LIBTOOL= yes
|
2015-06-09 22:24:39 +02:00
|
|
|
USE_TOOLS+= gmake
|
2012-07-23 14:24:34 +02:00
|
|
|
|
2014-01-13 16:06:55 +01:00
|
|
|
# PR pkg/48504, ksh is sufficient for NetBSD 5.2 and NetBSD 6.1
|
|
|
|
.include "../../mk/bsd.prefs.mk"
|
|
|
|
.if !empty(MACHINE_PLATFORM:MNetBSD-[5-6].*-*) && \
|
|
|
|
empty(MACHINE_PLATFORM:MNetBSD-6.99.*-*)
|
|
|
|
USE_TOOLS+= ksh
|
|
|
|
CONFIG_SHELL= ksh
|
|
|
|
.endif
|
|
|
|
|
2004-01-31 12:25:31 +01:00
|
|
|
GNU_CONFIGURE= yes
|
2018-05-28 16:15:38 +02:00
|
|
|
# Standard lib dirs on RHEL are named *lib64
|
2019-11-03 11:39:04 +01:00
|
|
|
LIB_PATH= /lib:/usr/lib
|
2018-05-28 16:15:38 +02:00
|
|
|
.if exists(/usr/lib64)
|
2019-11-03 11:39:04 +01:00
|
|
|
LIB_PATH:= /usr/lib64:${LIB_PATH}
|
2018-05-28 16:15:38 +02:00
|
|
|
.endif
|
|
|
|
.if exists(/lib64)
|
2019-11-03 11:39:04 +01:00
|
|
|
LIB_PATH:= /lib64:${LIB_PATH}
|
2018-05-28 16:15:38 +02:00
|
|
|
.endif
|
2019-11-03 11:39:04 +01:00
|
|
|
CONFIGURE_ARGS+= --with-lib-path=${LIB_PATH}
|
2012-06-02 13:54:38 +02:00
|
|
|
CONFIGURE_ARGS+= --program-prefix=g
|
2004-01-31 12:25:31 +01:00
|
|
|
BINUTILS_PREFIX= ${PREFIX}/${MACHINE_GNU_PLATFORM}
|
2003-09-19 15:00:43 +02:00
|
|
|
|
2002-12-25 17:53:51 +01:00
|
|
|
PLIST_SRC= ${PKGDIR}/PLIST.common
|
|
|
|
PLIST_SRC+= ${WRKDIR}/PLIST_DYNAMIC
|
2002-08-12 04:17:23 +02:00
|
|
|
|
2011-08-22 10:51:46 +02:00
|
|
|
INFO_FILES= yes
|
2004-07-04 19:16:32 +02:00
|
|
|
|
2012-12-31 01:27:36 +01:00
|
|
|
INSTALLATION_DIRS= ${PKGGNUDIR}bin ${PKGGNUDIR}${PKGMANDIR}/man1
|
2012-06-02 13:54:38 +02:00
|
|
|
|
2004-08-07 21:06:59 +02:00
|
|
|
# gprof (XXX: and others?) cannot be built on all platforms
|
2004-07-04 19:16:32 +02:00
|
|
|
#
|
2015-06-09 22:24:39 +02:00
|
|
|
PLIST_VARS+= gprof ld gold SunOS
|
2012-11-21 01:17:11 +01:00
|
|
|
|
2004-07-04 19:16:32 +02:00
|
|
|
.include "../../mk/bsd.prefs.mk"
|
2012-11-21 01:17:11 +01:00
|
|
|
|
2017-05-28 04:28:24 +02:00
|
|
|
.if ${OPSYS} != "IRIX" && ${OPSYS} != "AIX"
|
2008-04-13 00:42:57 +02:00
|
|
|
PLIST.gprof= yes
|
2012-11-21 00:05:22 +01:00
|
|
|
EXTRA_FILES+= gprof
|
|
|
|
.endif
|
2012-11-21 01:17:11 +01:00
|
|
|
|
2014-05-12 14:49:59 +02:00
|
|
|
.if ${OPSYS} != SunOS
|
2012-11-21 00:05:22 +01:00
|
|
|
PLIST.ld= yes
|
|
|
|
EXTRA_FILES+= ld
|
2004-07-04 19:16:32 +02:00
|
|
|
.endif
|
|
|
|
|
2015-06-09 22:24:39 +02:00
|
|
|
.if ${OPSYS} == SunOS
|
|
|
|
PLIST.SunOS= yes
|
|
|
|
.endif
|
|
|
|
|
2014-05-12 14:49:59 +02:00
|
|
|
.if ${OPSYS} == DragonFly \
|
2014-05-13 08:41:31 +02:00
|
|
|
|| (${OPSYS} == FreeBSD && empty(OS_VERSION:M[12345678].*)) \
|
|
|
|
|| (${OPSYS} == OpenBSD && empty(OS_VERSION:M[1234].*)) \
|
|
|
|
|| (${OPSYS} == NetBSD && empty(OS_VERSION:M[12345].*))
|
2019-11-03 11:39:04 +01:00
|
|
|
BUILD_GOLD= yes
|
|
|
|
PLIST.gold= yes
|
|
|
|
USE_TOOLS+= bison
|
|
|
|
EXTRA_FILES+= dwp ld.gold
|
|
|
|
CONFIGURE_ARGS+= --enable-gold --enable-plugins
|
2014-05-12 14:49:59 +02:00
|
|
|
.endif
|
|
|
|
|
2014-01-26 04:49:01 +01:00
|
|
|
CFLAGS.OpenBSD+= -Wno-bounded
|
|
|
|
|
2011-09-08 01:41:04 +02:00
|
|
|
.include "../../mk/compiler.mk"
|
|
|
|
.if !empty(PKGSRC_COMPILER:Mclang)
|
|
|
|
CFLAGS+= -Wno-unused-value -Wno-format-security \
|
2012-10-21 00:06:55 +02:00
|
|
|
-Wno-uninitialized -Wno-format -Wno-string-plus-int \
|
2015-02-21 01:09:50 +01:00
|
|
|
-Wno-empty-body -Wno-self-assign -Wno-unused-function \
|
|
|
|
-Wno-error=unused-const-variable
|
2011-09-08 01:41:04 +02:00
|
|
|
.endif
|
|
|
|
|
2014-09-06 10:55:43 +02:00
|
|
|
# Issue is fixed in upstream binutils, remove this when upgraded past 2.24
|
|
|
|
.if !empty(CC_VERSION:Mgcc-4.9.*)
|
|
|
|
CONFIGURE_ARGS+= --disable-werror
|
|
|
|
.endif
|
|
|
|
|
2012-07-23 14:24:34 +02:00
|
|
|
# Prevent the need to run texi2pod.pl and pod2man which would
|
|
|
|
# require perl as a build dependency.
|
2003-06-23 12:12:35 +02:00
|
|
|
post-configure:
|
2007-05-29 14:25:03 +02:00
|
|
|
.for f in ld/ldver.texi ld/ld.1 gas/doc/gasver.texi gas/doc/as.1
|
2012-06-02 13:54:38 +02:00
|
|
|
set -e; \
|
2007-05-29 14:25:03 +02:00
|
|
|
if [ -f ${WRKSRC}/${f} ]; then \
|
2012-07-23 14:24:34 +02:00
|
|
|
${TOUCH} ${WRKSRC}/${f}; \
|
2004-01-31 12:25:31 +01:00
|
|
|
fi
|
|
|
|
.endfor
|
2003-06-23 12:12:35 +02:00
|
|
|
|
2012-11-21 00:05:22 +01:00
|
|
|
SYMLINK_FILES = addr2line ar as c++filt dlltool elfedit ld.bfd \
|
|
|
|
nlmconv nm objcopy objdump ranlib readelf size strings \
|
|
|
|
strip windmc windres
|
2012-11-21 08:46:40 +01:00
|
|
|
.if defined(PLIST.gprof)
|
2012-11-21 00:05:22 +01:00
|
|
|
SYMLINK_FILES+= gprof
|
|
|
|
.endif
|
2012-11-21 08:46:40 +01:00
|
|
|
.if defined(PLIST.ld)
|
2012-11-21 00:05:22 +01:00
|
|
|
SYMLINK_FILES+= ld
|
|
|
|
.endif
|
2014-05-12 14:49:59 +02:00
|
|
|
.if defined(BUILD_GOLD)
|
|
|
|
SYMLINK_FILES+= ld.gold dwp
|
|
|
|
.endif
|
2012-11-21 00:05:22 +01:00
|
|
|
|
2002-08-12 04:17:23 +02:00
|
|
|
post-install:
|
2012-07-23 14:24:34 +02:00
|
|
|
cd ${DESTDIR}${PREFIX} && \
|
|
|
|
find ${MACHINE_GNU_PLATFORM}/lib/ldscripts -type f -print \
|
|
|
|
| sort -r \
|
|
|
|
> ${WRKDIR}/PLIST_DYNAMIC
|
2012-11-21 00:05:22 +01:00
|
|
|
.for f in ${SYMLINK_FILES}
|
2012-06-02 13:54:38 +02:00
|
|
|
set -e; \
|
2012-07-23 14:24:34 +02:00
|
|
|
if [ -f ${DESTDIR}${PREFIX}/bin/g${f:Q} ]; then \
|
2012-12-06 12:38:19 +01:00
|
|
|
${LN} -sf ${PREFIX}/bin/g${f} ${DESTDIR}${PREFIX}/${PKGGNUDIR}bin/${f}; \
|
2012-06-02 13:54:38 +02:00
|
|
|
fi
|
2012-07-23 14:24:34 +02:00
|
|
|
if [ -f ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/g${f:Q}.1 ]; then \
|
|
|
|
${LN} -sf ${PREFIX}/${PKGMANDIR}/man1/g${f}.1 \
|
2012-12-06 12:38:19 +01:00
|
|
|
${DESTDIR}${PREFIX}/${PKGGNUDIR}${PKGMANDIR}/man1/${f}.1; \
|
2012-06-02 13:54:38 +02:00
|
|
|
fi
|
|
|
|
.endfor
|
2002-08-12 04:17:23 +02:00
|
|
|
|
2014-05-27 11:56:10 +02:00
|
|
|
.include "../../mk/dlopen.buildlink3.mk"
|
2002-04-30 14:33:29 +02:00
|
|
|
.include "../../mk/bsd.pkg.mk"
|