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.
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.
11 RELSRC= ${RELTOP}/../../../contrib/binutils-2.27
12 SRCDIR= ${.CURDIR}/${RELSRC}
13 OBJTOP= ${.OBJDIR}/${RELTOP}
14 TSR= /${USRDATA_PREFIX}
18 CFLAGS+= -DHAVE_CONFIG_H
19 CFLAGS+= -D_LARGEFILE_SOURCE
20 CFLAGS+= -D_FILE_OFFSET_BITS=64
21 CFLAGS+= -DBINDIR="\"${TOOLS_PREFIX}${BINDIR}\""
22 CFLAGS+= -DTOOLBINDIR="\"${TOOLS_PREFIX}${BINDIR}\""
23 CFLAGS+= -DTOOLLIBDIR="\"${TOOLS_PREFIX}${LIBDIR}\""
24 CFLAGS+= -DTARGET_SYSTEM_ROOT="\"${TSR:S|//|/|}\""
25 CFLAGS+= -I. -I${.CURDIR} -I${SRCDIR}/gold
26 CFLAGS+= -I${SRCDIR}/include -I${SRCDIR}/elfcpp
28 # XXX: Do we want -Wl,-z,relro on by default? Differs for ld.bfd and lg.gold.
29 CFLAGS+= -DDEFAULT_LD_Z_RELRO=0
31 LDADD_IBERTY= ${OBJTOP}/block1/libiberty/libiberty.a
32 LDADD_GOLD= ${OBJTOP}/block2/libgold/libgold.a
33 STD_LDADD= ${LDADD_GOLD} ${LDADD_IBERTY} -lz
35 # source files common to both ld.gold and incremental-dump
37 GOLD_COMMON= i386.cc \
43 arm-reloc-property.cc \
47 aarch64-reloc-property.cc