Explicitly prefix ld(1) options in LDFLAGS with "-Wl," rather than

using the ${LDFLAGS:@F@-Wl,$F@} make substitution because that breaks
if LDFLAGS is already set.
This commit is contained in:
lukem 2005-06-04 16:17:17 +00:00
parent 5cc5caddf2
commit 3ed9ffcae1
14 changed files with 31 additions and 31 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.71 2005/01/11 07:47:37 martin Exp $
# $NetBSD: Makefile,v 1.72 2005/06/04 16:17:17 lukem Exp $
.include <bsd.own.mk> # for OBJECT_FMT definition
.include <bsd.shlib.mk> # for SHLINKINSTALLDIR definition
@ -23,8 +23,8 @@ M= ${.CURDIR}/arch/${ARCHSUBDIR}
PROG= ld.elf_so
LINKFLAGS+= -shared -symbolic -nostartfiles
LDFLAGS+= -non_shared
LDFLAGS+= -shared -symbolic -nostartfiles
LDFLAGS+= -Wl,-non_shared
# Adds SRCS, CPPFLAGS, LDFLAGS, etc. Must go first so MD startup source
# is first.
@ -65,7 +65,7 @@ STRIPFLAG=
${PROG}: ${OBJS} ${DPADD}
${_MKMSG_LINK} ${PROG}
${CC} ${LINKFLAGS} ${LDFLAGS:@F@-Wl,$F@} -o ${PROG} ${OBJS} ${LDADD}
${CC} ${LDFLAGS} -o ${PROG} ${OBJS} ${LDADD}
.if ${SHLINKINSTALLDIR} != "/usr/libexec"
SYMLINKS+= ${SHLINKINSTALLDIR}/${PROG} /usr/libexec/${PROG}

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.inc,v 1.11 2004/02/21 15:56:03 skrll Exp $
# $NetBSD: Makefile.inc,v 1.12 2005/06/04 16:17:17 lukem Exp $
SRCS+= rtld_start.S alpha_reloc.c
@ -8,4 +8,4 @@ CPPFLAGS+= -fpic -mno-fp-regs
CPPFLAGS+= -DELFSIZE=64
#CPPFLAGS+= -DRTLD_DEBUG_ALPHA
LDFLAGS+= -e _rtld_start
LDFLAGS+= -Wl,-e,_rtld_start

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.inc,v 1.10 2004/02/21 15:56:03 skrll Exp $
# $NetBSD: Makefile.inc,v 1.11 2005/06/04 16:17:17 lukem Exp $
SRCS+= rtld_start.S mdreloc.c
@ -7,4 +7,4 @@ CPPFLAGS+= -fpic
CPPFLAGS+= -DELFSIZE=32
LDFLAGS+= -e _rtld_start
LDFLAGS+= -Wl,-e,_rtld_start

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.inc,v 1.6 2004/05/17 13:16:02 skrll Exp $
# $NetBSD: Makefile.inc,v 1.7 2005/06/04 16:17:17 lukem Exp $
SRCS+= rtld_start.S hppa_reloc.c
@ -11,4 +11,4 @@ CPPFLAGS+= -DELFSIZE=32
#CPPFLAGS+= -DRTLD_DEBUG_RELOC
#CPPFLAGS+= -DRTLD_DEBUG_HPPA
LDFLAGS+= -e '$$$$rtld_start'
LDFLAGS+= -Wl,-e,'$$$$rtld_start'

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.inc,v 1.9 2004/02/21 15:56:03 skrll Exp $
# $NetBSD: Makefile.inc,v 1.10 2005/06/04 16:17:17 lukem Exp $
SRCS+= rtld_start.S mdreloc.c
@ -7,4 +7,4 @@ CPPFLAGS+= -fpic
CPPFLAGS+= -DELFSIZE=32
LDFLAGS+= -e .rtld_start
LDFLAGS+= -Wl,-e,.rtld_start

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.inc,v 1.9 2004/02/21 15:56:03 skrll Exp $
# $NetBSD: Makefile.inc,v 1.10 2005/06/04 16:17:17 lukem Exp $
SRCS+= rtld_start.S mdreloc.c
@ -7,4 +7,4 @@ CPPFLAGS+= -fpic
CPPFLAGS+= -DELFSIZE=32
LDFLAGS+= -e .rtld_start
LDFLAGS+= -Wl,-e,.rtld_start

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.inc,v 1.14 2004/02/21 15:56:03 skrll Exp $
# $NetBSD: Makefile.inc,v 1.15 2005/06/04 16:17:17 lukem Exp $
SRCS+= rtld_start.S mips_reloc.c
@ -8,4 +8,4 @@ CPPFLAGS+= -mabicalls -G0 -fPIC
CPPFLAGS+= -DELFSIZE=32
CPPFLAGS+= -DRTLD_INHIBIT_COPY_RELOCS
LDFLAGS+= -e .rtld_start
LDFLAGS+= -Wl,-e,.rtld_start

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.inc,v 1.9 2004/02/21 15:56:03 skrll Exp $
# $NetBSD: Makefile.inc,v 1.10 2005/06/04 16:17:17 lukem Exp $
SRCS+= rtld_start.S ppc_reloc.c
@ -7,5 +7,5 @@ CPPFLAGS+= -fpic -msoft-float
CPPFLAGS+= -DELFSIZE=32
LDFLAGS+= -e .rtld_start
LDFLAGS+= --script ${.CURDIR}/arch/powerpc/ld.so.script
LDFLAGS+= -Wl,-e,.rtld_start
LDFLAGS+= -Wl,--script,${.CURDIR}/arch/powerpc/ld.so.script

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.inc,v 1.6 2004/02/21 16:02:06 skrll Exp $
# $NetBSD: Makefile.inc,v 1.7 2005/06/04 16:17:17 lukem Exp $
SRCS+= rtld_start.S mdreloc.c
@ -7,4 +7,4 @@ CPPFLAGS+= -fpic
CPPFLAGS+= -DELFSIZE=32
LDFLAGS+= -e .rtld_start
LDFLAGS+= -Wl,-e,.rtld_start

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.inc,v 1.3 2004/02/21 15:56:03 skrll Exp $
# $NetBSD: Makefile.inc,v 1.4 2005/06/04 16:17:17 lukem Exp $
SRCS+= rtld_start.S mdreloc.c
@ -7,4 +7,4 @@ CPPFLAGS+= -fpic
CPPFLAGS+= -DELFSIZE=32
LDFLAGS+= -e .rtld_start
LDFLAGS+= -Wl,-e,.rtld_start

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.inc,v 1.9 2004/02/21 15:56:03 skrll Exp $
# $NetBSD: Makefile.inc,v 1.10 2005/06/04 16:17:17 lukem Exp $
SRCS+= rtld_start.S mdreloc.c
@ -7,4 +7,4 @@ CPPFLAGS+= -fpic
CPPFLAGS+= -DELFSIZE=32
LDFLAGS+= -e _rtld_start
LDFLAGS+= -Wl,-e,_rtld_start

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.inc,v 1.7 2004/02/21 15:56:03 skrll Exp $
# $NetBSD: Makefile.inc,v 1.8 2005/06/04 16:17:17 lukem Exp $
SRCS+= rtld_start.S mdreloc.c
@ -7,4 +7,4 @@ CPPFLAGS+= -fpic
CPPFLAGS+= -DELFSIZE=64
LDFLAGS+= -e _rtld_start
LDFLAGS+= -Wl,-e,_rtld_start

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.inc,v 1.9 2004/04/28 02:04:56 mhitch Exp $
# $NetBSD: Makefile.inc,v 1.10 2005/06/04 16:17:17 lukem Exp $
SRCS+= rtld_start.S mdreloc.c
@ -7,4 +7,4 @@ CPPFLAGS+= -fpic
CPPFLAGS+= -DELFSIZE=32
LDFLAGS+= -Bsymbolic -e .rtld_start
LDFLAGS+= -Wl,-Bsymbolic -Wl,-e,.rtld_start

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.inc,v 1.6 2004/02/21 15:56:03 skrll Exp $
# $NetBSD: Makefile.inc,v 1.7 2005/06/04 16:17:17 lukem Exp $
SRCS+= rtld_start.S mdreloc.c
@ -7,4 +7,4 @@ CPPFLAGS+= -fPIC
CPPFLAGS+= -DELFSIZE=64
LDFLAGS+= -e .rtld_start
LDFLAGS+= -Wl,-e,.rtld_start