summaryrefslogtreecommitdiffstats
path: root/libexec
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1997-04-16 11:31:32 +0000
committerbde <bde@FreeBSD.org>1997-04-16 11:31:32 +0000
commitea4c076a106bb84d86d8b749dccf42dadf704618 (patch)
treea276a39f0ac64af9dc2aa8d5a370735f0c788c2e /libexec
parent285de91cc0df210432861321a4d987bea8b0c668 (diff)
downloadFreeBSD-src-ea4c076a106bb84d86d8b749dccf42dadf704618.zip
FreeBSD-src-ea4c076a106bb84d86d8b749dccf42dadf704618.tar.gz
Fixed `make depend' and related bogons. LDFLAGS was used for
ld-specific flags. LDFLAGS is really for ld-related flags for cc, not for ld, and some flags, e.g., -Bshareable, mean completely different things to cc and ld. Having the wrong things in LDFLAGS also broke the standard ${PROG} target. This was kludged around by using a special rule that depended on LDFLAGS being bogus. Fixing `make depend' broke the special rule but fixed the standard rule (except in the DESTDIR case, which was handled more strictly here than elsewhere).
Diffstat (limited to 'libexec')
-rw-r--r--libexec/rtld-aout/Makefile12
1 files changed, 2 insertions, 10 deletions
diff --git a/libexec/rtld-aout/Makefile b/libexec/rtld-aout/Makefile
index 22c5c656..4177f6b 100644
--- a/libexec/rtld-aout/Makefile
+++ b/libexec/rtld-aout/Makefile
@@ -1,4 +1,4 @@
-# $Id$
+# $Id: Makefile,v 1.23 1997/02/22 15:46:46 peter Exp $
PROG= ld.so
SRCS= mdprologue.S rtld.c malloc.c shlib.c md.c support.c sbrk.c
@@ -7,7 +7,7 @@ LDDIR?= $(.CURDIR)/..
# As there is relocation going on behind GCC's back, don't cache function addresses.
PICFLAG=-fpic -fno-function-cse
CFLAGS+=-I$(LDDIR) -I$(.CURDIR) -I$(LDDIR)/$(MACHINE) $(PICFLAG) -DRTLD
-LDFLAGS+=-Bshareable -Bsymbolic -assert nosymbolic
+LDFLAGS+=-nostdlib -Wl,-Bshareable -Wl,-Bsymbolic -Wl,-assert -Wl,nosymbolic
ASFLAGS+=-k
DPADD+= ${LIBC:S/c.a/c_pic.a/} ${LIBC:S/c.a/gcc_pic.a/}
LDADD+= -lc_pic -lgcc_pic
@@ -17,12 +17,4 @@ MLINKS= rtld.1 ld.so.1
.PATH: $(LDDIR) $(LDDIR)/$(MACHINE)
-.if defined(DESTDIR)
-$(PROG):
- $(LD) -o $(PROG) $(LDFLAGS) -nostdlib -L${DESTDIR}/usr/lib $(OBJS) $(LDADD)
-.else
-$(PROG):
- $(LD) -o $(PROG) $(LDFLAGS) $(OBJS) $(LDADD)
-.endif
-
.include <bsd.prog.mk>
OpenPOWER on IntegriCloud