1# This is included explicitly at the top of each sub-Makefile. We can't 2# use the normal "Makefile.inc" mechanism, because we need some of these 3# definitions before the sub-Makefile is processed. 4 5RELTOP:= ../.. 6 7# RELTOP is the relative path to this point in the source or object 8# tree, from any subdirectory of same. It gets extra "../" prefixes 9# added to it as we descend into subdirectories. 10 11RELSRC= ${RELTOP}/../../../contrib/binutils-2.27 12SRCDIR= ${.CURDIR}/${RELSRC} 13OBJTOP= ${.OBJDIR}/${RELTOP} 14TSR= /${USRDATA_PREFIX} 15 16.PATH: ${SRCDIR}/gold 17 18CFLAGS+= -DHAVE_CONFIG_H 19CFLAGS+= -D_LARGEFILE_SOURCE 20CFLAGS+= -D_FILE_OFFSET_BITS=64 21CFLAGS+= -DBINDIR="\"${TOOLS_PREFIX}${BINDIR}\"" 22CFLAGS+= -DTOOLBINDIR="\"${TOOLS_PREFIX}${BINDIR}\"" 23CFLAGS+= -DTOOLLIBDIR="\"${TOOLS_PREFIX}${LIBDIR}\"" 24CFLAGS+= -DTARGET_SYSTEM_ROOT="\"${TSR:S|//|/|}\"" 25CFLAGS+= -I. -I${.CURDIR} -I${SRCDIR}/gold 26CFLAGS+= -I${SRCDIR}/include -I${SRCDIR}/elfcpp 27 28# XXX: Do we want -Wl,-z,relro on by default? Differs for ld.bfd and lg.gold. 29CFLAGS+= -DDEFAULT_LD_Z_RELRO=0 30 31LDADD_IBERTY= ${OBJTOP}/block1/libiberty/libiberty.a 32LDADD_GOLD= ${OBJTOP}/block2/libgold/libgold.a 33STD_LDADD= ${LDADD_GOLD} ${LDADD_IBERTY} -lz ${CROSS_LIBDL} 34 35# source files common to both ld.gold and incremental-dump 36 37GOLD_COMMON= i386.cc \ 38 x86_64.cc 39 40# hmmm sparc.cc \ 41 powerpc.cc \ 42 arm.cc \ 43 arm-reloc-property.cc \ 44 tilegx.cc \ 45 mips.cc \ 46 aarch64.cc \ 47 aarch64-reloc-property.cc 48