opnsense-src/gnu/usr.bin/binutils/ld/Makefile.i386
David E. O'Brien 87120eee8e Support linking with -z combreloc (combine and sort reloc sections) and with
--shared -z combreloc (shared library, combine & sort relocs)

Submitted by:		peter
Bribed by:		peter
Fixes:			IA-64, Kaffe, and QT
Doesn't fix ports by:	kris
Tested on:		make(1) release w/docproj
Desired for:		5.0-DP#1
Approved by:		murray
Seconded by:		jhb
2002-03-13 18:26:59 +00:00

41 lines
1.2 KiB
Makefile

# $FreeBSD$
TARGET_TUPLE?= i386-unknown-freebsd
.if ${TARGET_ARCH} == "i386"
HOST= ${TARGET_TUPLE}
CFLAGS+= -DDEFAULT_EMULATION=\"elf_i386\"
CFLAGS+= -DTARGET=\"${TARGET_TUPLE}\"
_i386_path= \"${TOOLS_PREFIX}/usr/lib\"
.else
_i386_path= \"/usr/cross/i386-freebsd/usr/lib\"
.endif
EMS+= ld_elf_i386_emulation
LDSCRIPTS+= elf_i386.x elf_i386.xbn elf_i386.xn elf_i386.xr \
elf_i386.xs elf_i386.xu elf_i386.xc elf_i386.xsc
SRCS+= eelf_i386.c
CLEANFILES+= eelf_i386.c
eelf_i386.c: emulparams/elf_i386.sh emultempl/elf32.em scripttempl/elf.sc \
genscripts.sh stringify.sed
sh ${.CURDIR}/genscripts.sh ${SRCDIR}/ld ${_i386_path} \
${HOST} ${TARGET_TUPLE} ${TARGET_TUPLE} \
elf_i386 "" elf_i386 ${TARGET_TUPLE}
.if defined(BINUTILSDISTDIR) && exists(${BINUTILSDISTDIR})
EMS+= ld_i386pe_emulation
LDSCRIPTS+= i386pe.x \
i386pe.xbn \
i386pe.xn \
i386pe.xr \
i386pe.xu
SRCS+= ei386pe.c
CLEANFILES+= ei386pe.c
ei386pe.c: emulparams/i386pe.sh emultempl/pe.em scripttempl/pe.sc \
genscripts.sh stringify.sed
sh ${.CURDIR}/genscripts.sh ${BINUTILSDISTDIR}/ld \
/usr/cross/winnt/lib ${HOST} ${TARGET_TUPLE}winnt \
${TARGET_TUPLE}winnt i386pe "" i386pe \
${TARGET_TUPLE}winnt
.endif