From b9c727d84e270aa45bf5a4582fc49ac698c5483c Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Thu, 11 Nov 2010 22:53:55 +0000 Subject: [PATCH] Use -fPIC to build libexec/rtld-elf on sparc64, so it will also be able to link with newer binutils, without overflowing the GOT. Obtained from: projects/binutils-2.17 --- libexec/rtld-elf/Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libexec/rtld-elf/Makefile b/libexec/rtld-elf/Makefile index 62aaaab96a99..bc23f7c139da 100644 --- a/libexec/rtld-elf/Makefile +++ b/libexec/rtld-elf/Makefile @@ -29,7 +29,12 @@ SYMLINKS= ${BINDIR}/${PROG} /usr/libexec/${PROG} MLINKS= rtld.1 ld-elf.so.1.1 \ rtld.1 ld.so.1 -CFLAGS+= -fpic -DPIC +.if ${MACHINE_CPUARCH} == "sparc64" +CFLAGS+= -fPIC +.else +CFLAGS+= -fpic +.endif +CFLAGS+= -DPIC LDFLAGS+= -shared -Wl,-Bsymbolic DPADD= ${LIBC_PIC} LDADD= -lc_pic -lssp_nonshared