minix/usr.bin/ldd/elf64/Makefile
Ben Gras 4b999f1962 build shared versions of libraries
building defaults to off until clang is updated.

current clang does not handle -shared, necessary to change the ld
invocation to build shared libraries properly. a new clang should be
installed and MKPIC defaults to no unless the newer clang is detected.

changes:

	. mainly small imports of a Makefile or two and small fixes
	  (turning things back on that were turned off in Makefiles)
	. e.g.: dynamic librefuse now depends on dynamic
	  libpuffs, so libpuffs has to be built dynamically too
	  and a make dependency barrier is needed in lib/Makefile
	. all library objects now have a PIC (for .so) and non-PIC
	  version, so everything is built twice.
	. generate PIC versions of the compat (un-RENAMEd) jump files,
	  include function type annotation in generated assembly
	. build progs with -static by default for now
	. also build ld.elf_so
	. also import NetBSD ldd
2012-04-16 05:21:20 +02:00

48 lines
1 KiB
Makefile

# $NetBSD: Makefile,v 1.5 2009/12/13 08:50:57 mrg Exp $
.include <bsd.own.mk>
CPPFLAGS+= -DELFSIZE=64
LIB= ldd_elf64
# XXX Force one member
SRCS= dummy.c
LIBISPRIVATE= yes
.PATH: ${.CURDIR}/..
.if (${MACHINE_ARCH} == "alpha") || (${MACHINE_ARCH} == "sparc64") || \
(${MACHINE_ARCH} == "x86_64") || (${MACHINE_ARCH} == "powerpc64") || \
(${MACHINE_ARCH} == "mips64el") || (${MACHINE_ARCH} == "mips64eb")
# XXX we need to make sure that we don't accidentally get the elf32
# XXX versions of these.
RTLD_FUNCS = \
_rtld_expand_path \
_rtld_digest_dynamic \
_rtld_digest_phdr \
_rtld_load_needed_objects \
_rtld_load_object \
_rtld_map_object \
_rtld_obj_free \
_rtld_obj_new \
_rtld_add_paths \
_rtld_process_hints \
_rtld_sysctl \
_rtld_load_library
.for _d in ${RTLD_FUNCS}
CPPFLAGS+= -D${_d}=_elf64_${_d}
.endfor
.if (${MACHINE_ARCH} == "mips64el") || (${MACHINE_ARCH} == "mips64eb")
CPPFLAGS+= -DRTLD_ARCH_SUBDIR=\"${MLIBDIR}\"
.endif
.include "../Makefile.elf"
.endif
.include <bsd.lib.mk>