1999-08-28 00:22:10 +00:00
|
|
|
# $FreeBSD$
|
2000-03-27 16:11:27 +00:00
|
|
|
|
2007-05-13 14:12:40 +00:00
|
|
|
.include <bsd.own.mk>
|
2009-02-21 15:04:31 +00:00
|
|
|
MK_SSP= no
|
2007-05-13 14:12:40 +00:00
|
|
|
|
2004-03-21 01:21:26 +00:00
|
|
|
PROG?= ld-elf.so.1
|
2004-05-14 21:01:52 +00:00
|
|
|
SRCS= rtld_start.S \
|
|
|
|
reloc.c rtld.c rtld_lock.c map_object.c \
|
2004-05-14 12:15:51 +00:00
|
|
|
malloc.c xmalloc.c debug.c libmap.c
|
2001-03-26 14:22:12 +00:00
|
|
|
MAN= rtld.1
|
2003-06-04 05:42:04 +00:00
|
|
|
CSTD?= gnu99
|
2003-05-29 22:58:26 +00:00
|
|
|
CFLAGS+= -Wall -DFREEBSD_ELF -DIN_RTLD
|
|
|
|
CFLAGS+= -I${.CURDIR}/${MACHINE_ARCH} -I${.CURDIR}
|
1999-04-09 00:28:43 +00:00
|
|
|
LDFLAGS+= -nostdlib -e .rtld_start
|
2004-11-03 18:01:21 +00:00
|
|
|
INSTALLFLAGS= -C -b
|
|
|
|
PRECIOUSPROG=
|
2003-08-17 08:06:00 +00:00
|
|
|
BINDIR= /libexec
|
2003-08-17 22:12:26 +00:00
|
|
|
SYMLINKS= ${BINDIR}/${PROG} /usr/libexec/${PROG}
|
2003-02-13 23:07:28 +00:00
|
|
|
MLINKS= rtld.1 ld-elf.so.1.1 \
|
|
|
|
rtld.1 ld.so.1
|
1998-09-04 19:03:57 +00:00
|
|
|
|
1999-04-09 00:28:43 +00:00
|
|
|
CFLAGS+= -fpic -DPIC
|
|
|
|
LDFLAGS+= -shared -Wl,-Bsymbolic
|
2000-03-27 16:11:27 +00:00
|
|
|
DPADD= ${LIBC_PIC}
|
|
|
|
LDADD= -lc_pic
|
2007-04-03 19:01:06 +00:00
|
|
|
|
2007-05-16 23:24:15 +00:00
|
|
|
.if ${MACHINE_ARCH} != "ia64"
|
2007-05-13 14:12:40 +00:00
|
|
|
.if ${MK_SYMVER} == "yes"
|
2007-04-29 16:12:06 +00:00
|
|
|
LIBCDIR= ${.CURDIR}/../../lib/libc
|
|
|
|
VERSION_DEF= ${LIBCDIR}/Versions.def
|
2007-04-03 19:01:06 +00:00
|
|
|
SYMBOL_MAPS= ${.CURDIR}/Symbol.map
|
|
|
|
VERSION_MAP= Version.map
|
|
|
|
LDFLAGS+= -Wl,--version-script=${VERSION_MAP}
|
|
|
|
|
|
|
|
${PROG}: ${VERSION_MAP}
|
|
|
|
|
|
|
|
.if exists(${.CURDIR}/${MACHINE_ARCH}/Symbol.map)
|
|
|
|
SYMBOL_MAPS+= ${.CURDIR}/${MACHINE_ARCH}/Symbol.map
|
|
|
|
.endif
|
1999-04-09 00:28:43 +00:00
|
|
|
.endif
|
2007-05-16 23:24:15 +00:00
|
|
|
.endif
|
1999-04-09 00:28:43 +00:00
|
|
|
|
2007-04-03 19:01:06 +00:00
|
|
|
.if exists(${.CURDIR}/${MACHINE_ARCH}/Makefile.inc)
|
|
|
|
.include "${.CURDIR}/${MACHINE_ARCH}/Makefile.inc"
|
|
|
|
.endif
|
1998-03-07 19:24:35 +00:00
|
|
|
|
2003-08-17 18:50:56 +00:00
|
|
|
# Since moving rtld-elf to /libexec, we need to create a symlink.
|
|
|
|
# Fixup the existing binary that's there so we can symlink over it.
|
|
|
|
beforeinstall:
|
2004-11-14 22:18:31 +00:00
|
|
|
.if exists(${DESTDIR}/usr/libexec/${PROG})
|
2004-11-14 21:14:06 +00:00
|
|
|
-chflags noschg ${DESTDIR}/usr/libexec/${PROG}
|
2004-11-14 22:18:31 +00:00
|
|
|
.endif
|
2003-08-17 18:50:56 +00:00
|
|
|
|
1998-09-04 19:03:57 +00:00
|
|
|
.PATH: ${.CURDIR}/${MACHINE_ARCH}
|
1998-03-07 19:24:35 +00:00
|
|
|
|
2007-04-03 19:01:06 +00:00
|
|
|
.include <bsd.symver.mk>
|
1998-03-07 19:24:35 +00:00
|
|
|
.include <bsd.prog.mk>
|