re-order library dependencies to make sure that -lintl and -lz are after

the rest of the libraries so that static linking works.
This commit is contained in:
christos 2013-02-14 21:29:35 +00:00
parent cbad08c3fb
commit c48559910e
8 changed files with 42 additions and 53 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.inc,v 1.3 2011/05/30 14:41:26 joerg Exp $
# $NetBSD: Makefile.inc,v 1.4 2013/02/14 21:29:35 christos Exp $
BINDIR?= /usr/bin
@ -13,9 +13,6 @@ CPPFLAGS+= ${GNUCPPFLAGS:M-D*:N-DLOCALEDIR*} ${GNUCPPFLAGS:M-I*:N-I.*} \
-I${TOP}/${BFDSUBDIR}/libbfd/arch/${MACHINE_ARCH} \
-I${DIST}/include -I${DIST}/bfd -I${DIST}/binutils \
-DLOCALEDIR=\"${LOCALEDIR}\"
LDADD+=-lz
DPADD+=${LIBZ}
NOGCCERROR= # defined
.endif # __MAKEFILE_INC_INCLUDED__

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.prog,v 1.5 2013/02/14 03:36:44 christos Exp $
# $NetBSD: Makefile.prog,v 1.6 2013/02/14 21:29:35 christos Exp $
#
# Common Makefile fragment for a binutils program.
#
@ -20,24 +20,24 @@ MAN= ${G_man_MANS:M${PROG}.1}
CPPFLAGS+= -I${.CURDIR}/../common/arch/${MACHINE_ARCH}
LDADD+= -lintl
DPADD+= ${LIBINTL}
.if !empty(G_${BUPROG}_DEPENDENCIES:M*/libopcodes*)
PROGDPLIBS+= opcodes ${TOP}/${BFDSUBDIR}/libopcodes
PROGDPLIBS+= opcodes ${TOP}/${BFDSUBDIR}/libopcodes
.endif
.if !empty(G_${BUPROG}_DEPENDENCIES:M*/libbfd*)
PROGDPLIBS+= bfd ${TOP}/${BFDSUBDIR}/libbfd
PROGDPLIBS+= bfd ${TOP}/${BFDSUBDIR}/libbfd
.endif
.if !empty(G_${BUPROG}_DEPENDENCIES:M*/libiberty*)
PROGDPLIBS+= iberty ${TOP}/${BFDSUBDIR}/libiberty
PROGDPLIBS+= iberty ${TOP}/${BFDSUBDIR}/libiberty
.endif
.PATH: ${DIST}/binutils ${DIST}/binutils/doc
.include <bsd.prog.mk>
LDADD+= -lintl -lz
DPADD+= ${LIBINTL} ${LIBZ}
# Override the .y.c and .y.l rules *after* <bsd.prog.mk>
.y.c .l.c:

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.8 2013/02/14 03:36:44 christos Exp $
# $NetBSD: Makefile,v 1.9 2013/02/14 21:29:35 christos Exp $
.include <bsd.own.mk>
@ -24,12 +24,9 @@ CPPFLAGS+= -I${.CURDIR}/arch/${MACHINE_ARCH}
CPPFLAGS+= -I${DIST}/gas -I${DIST}/gas/config
CPPFLAGS+= -I${DIST}
PROGDPLIBS+= opcodes ${TOP}/${BFDSUBDIR}/libopcodes
PROGDPLIBS+= bfd ${TOP}/${BFDSUBDIR}/libbfd
PROGDPLIBS+= iberty ${TOP}/${BFDSUBDIR}/libiberty
LDADD= -lintl
DPADD= ${LIBINTL}
PROGDPLIBS+= opcodes ${TOP}/${BFDSUBDIR}/libopcodes
PROGDPLIBS+= bfd ${TOP}/${BFDSUBDIR}/libbfd
PROGDPLIBS+= iberty ${TOP}/${BFDSUBDIR}/libiberty
TEXINFO= as.texinfo
COMMONOBJDIR!= cd ${TOP}/usr.bin/common && ${PRINTOBJDIR}
@ -41,3 +38,6 @@ as.info: bfdver.texi
.include <bsd.prog.mk>
.include <bsd.info.mk>
LDADD+= -lintl -lz
DPADD+= ${LIBINTL} ${LIBZ}

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.6 2013/02/14 00:53:30 matt Exp $
# $NetBSD: Makefile,v 1.7 2013/02/14 21:29:35 christos Exp $
.include <bsd.own.mk>
@ -11,22 +11,8 @@ PROG= gprof
SRCS= ${G_gprof_OBJECTS:.o=.c}
CPPFLAGS+= -I${.CURDIR}/arch/${MACHINE_ARCH}
LDADD= -lintl
DPADD= ${LIBINTL}
BFDOBJ!= cd ${TOP}/${BFDSUBDIR}/libbfd && ${PRINTOBJDIR}
LDADD+= -L${BFDOBJ} -lbfd
.if ${MKPICLIB} != "no"
DPADD+= ${BFDOBJ}/libbfd_pic.a
.elif ${MKPIC} != "no"
DPADD+= ${BFDOBJ}/libbfd.so
.else
DPADD+= ${BFDOBJ}/libbfd.a
.endif
IBERTYOBJ!= cd ${TOP}/${BFDSUBDIR}/libiberty && ${PRINTOBJDIR}
LDADD+= -L${IBERTYOBJ} -liberty
DPADD+= ${IBERTYOBJ}/libiberty.a
PROGDPLIBS+= bfd ${TOP}/${BFDSUBDIR}/libbfd
PROGDPLIBS+= iberty ${TOP}/${BFDSUBDIR}/libiberty
TEXINFO= ${G_TEXINFOS}
COMMONOBJDIR!= cd ${TOP}/usr.bin/common && ${PRINTOBJDIR}
@ -38,3 +24,6 @@ gprof.info: bfdver.texi
.include <bsd.prog.mk>
.include <bsd.info.mk>
LDADD+= -lintl -lz
DPADD+= ${LIBINTL} ${LIBZ}

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.15 2013/02/14 03:36:44 christos Exp $
# $NetBSD: Makefile,v 1.16 2013/02/14 21:29:35 christos Exp $
.include <bsd.own.mk>
@ -20,13 +20,10 @@ CPPFLAGS+= -I${.CURDIR}/arch/${MACHINE_ARCH} \
-DTOOLBINDIR=\"/usr/bin\" \
-DENABLE_PLUGINS
LDADD= -lintl
DPADD= ${LIBINTL}
COPTS.ldgram.c = -Wno-stack-protector
PROGDPLIBS+= bfd ${TOP}/${BFDSUBDIR}/libbfd
PROGDPLIBS+= iberty ${TOP}/${BFDSUBDIR}/libiberty
PROGDPLIBS+= bfd ${TOP}/${BFDSUBDIR}/libbfd
PROGDPLIBS+= iberty ${TOP}/${BFDSUBDIR}/libiberty
TEXINFO= ${G_TEXINFOS}
COMMONOBJDIR!= cd ${TOP}/usr.bin/common && ${PRINTOBJDIR}
@ -124,3 +121,6 @@ FILES+= ${f}.xc ${f}.xs ${f}.xsc ${f}.xsw ${f}.xw
cleanprog: __cleanldscripts
__cleanldscripts:
-rm -rf ldscripts tmpdir
LDADD+= -lintl -lz
DPADD+= ${LIBINTL} ${LIBZ}

View File

@ -1,10 +1,7 @@
# $NetBSD: Makefile,v 1.1 2009/08/18 20:22:20 skrll Exp $
# $NetBSD: Makefile,v 1.2 2013/02/14 21:29:36 christos Exp $
PROG= readelf
DPADD= ${LIBZ}
LDADD= -lz
.include <bsd.own.mk>
.include "${.CURDIR}/../common/Makefile.prog"

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.6 2013/02/14 03:36:44 christos Exp $
# $NetBSD: Makefile,v 1.7 2013/02/14 21:29:36 christos Exp $
.include <bsd.own.mk>
@ -15,8 +15,8 @@ MAN= dbsym.8
CPPFLAGS+= -I${DIST}/bfd -I${DIST}/binutils -I${DIST}/include
.if !defined(HOSTPROG)
PROGDPLIBS+= bfd ${TOP}/${BFDSUBDIR}/libbfd
PROGDPLIBS+= iberty ${TOP}/${BFDSUBDIR}/libiberty
PROGDPLIBS+= bfd ${TOP}/${BFDSUBDIR}/libbfd
PROGDPLIBS+= iberty ${TOP}/${BFDSUBDIR}/libiberty
.else
CPPFLAGS+= -I${BFDDIR}
DPADD+= ${BFDDIR}/libbfd.a
@ -25,6 +25,8 @@ DPADD+= ${IBERTYDIR}/libiberty.a
LDADD+= -L${IBERTYDIR} -liberty
.endif
.include <bsd.prog.mk>
.ifndef HOSTPROG
.include "${TOP}/${BFDSUBDIR}/libbfd/arch/${MACHINE_ARCH}/defs.mk"
CPPFLAGS+= -I${TOP}/${BFDSUBDIR}/libbfd/arch/${MACHINE_ARCH} ${G_INCLUDES}
@ -33,4 +35,6 @@ DPADD+= ${LIBINTL}
.endif # HOSTPROG
.endif # MKBINUTILS != no
.include <bsd.prog.mk>
LDADD+= -lz
DPADD+= ${LIBZ}

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.6 2013/02/14 03:36:44 christos Exp $
# $NetBSD: Makefile,v 1.7 2013/02/14 21:29:36 christos Exp $
.include <bsd.own.mk>
@ -15,8 +15,8 @@ MAN= mdsetimage.8
CPPFLAGS+= -I${DIST}/bfd -I${DIST}/binutils -I${DIST}/include
.if !defined(HOSTPROG)
PROGDPLIBS+= bfd ${TOP}/${BFDSUBDIR}/libbfd
PROGDPLIBS+= iberty ${TOP}/${BFDSUBDIR}/libiberty
PROGDPLIBS+= bfd ${TOP}/${BFDSUBDIR}/libbfd
PROGDPLIBS+= iberty ${TOP}/${BFDSUBDIR}/libiberty
.else
DPADD+= ${BFDDIR}/libbfd.a
LDADD+= -L${BFDDIR} -lbfd
@ -25,6 +25,7 @@ LDADD+= -L${IBERTYDIR} -liberty
CPPFLAGS+= -I${BFDDIR}
.endif
.include <bsd.prog.mk>
.ifndef HOSTPROG
.include "${TOP}/${BFDSUBDIR}/libbfd/arch/${MACHINE_ARCH}/defs.mk"
@ -35,4 +36,5 @@ DPADD+= ${LIBINTL}
.endif # HOSTPROG
.endif # MKBINUTILS != no
.include <bsd.prog.mk>
LDADD+= -lz
DPADD+= ${LIBZ}