Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/libexec/ld.elf_so Use CC instead of LD to link the ld.elf_so...



details:   https://anonhg.NetBSD.org/src/rev/a645686e201b
branches:  trunk
changeset: 558680:a645686e201b
user:      uwe <uwe%NetBSD.org@localhost>
date:      Sun Feb 22 01:39:43 2004 +0000

description:
Use CC instead of LD to link the ld.elf_so.  This will correctly link
"millicode" from libgcc_pic.a on platforms that need it.

>From Nick Hudson <skrll@netbsd>.

diffstat:

 libexec/ld.elf_so/Makefile |  10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diffs (38 lines):

diff -r 88c254e0b39d -r a645686e201b libexec/ld.elf_so/Makefile
--- a/libexec/ld.elf_so/Makefile        Sun Feb 22 01:31:16 2004 +0000
+++ b/libexec/ld.elf_so/Makefile        Sun Feb 22 01:39:43 2004 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.65 2004/02/21 15:56:03 skrll Exp $
+#      $NetBSD: Makefile,v 1.66 2004/02/22 01:39:43 uwe Exp $
 
 .include <bsd.own.mk>                  # for OBJECT_FMT definition
 .include <bsd.shlib.mk>                        # for SHLINKINSTALLDIR definition
@@ -23,7 +23,9 @@
 
 PROG=  ld.elf_so
 
-LDFLAGS+= -Bshareable -Bsymbolic
+CFLAGS+=       -shared -symbolic -nostartfiles
+LDFLAGS+=      -non_shared
+
 # Adds SRCS, CPPFLAGS, LDFLAGS, etc.  Must go first so MD startup source
 # is first.
 .if exists($M/Makefile.inc)
@@ -51,7 +53,7 @@
 CPPFLAGS+= -DRTLD_DEFAULT_LIBRARY_PATH=\"${SHLIBDIR}:${LIBDIR}\"
 .endif
 
-LDADD+=        -L${CLIBOBJ} -L${DESTDIR}${LIBDIR} -non_shared -lc_pic
+LDADD+=        -L${CLIBOBJ} -L${DESTDIR}${LIBDIR} -lc_pic
 .if ${MKPICINSTALL} != "no" 
 DPADD+=        ${LIBC_PIC}
 .endif
@@ -63,7 +65,7 @@
 
 ${PROG}: ${OBJS} ${DPADD}
        ${_MKMSG_LINK} ${PROG}
-       ${LD} ${LDFLAGS} -o ${PROG} ${OBJS} ${LDADD}
+       ${CC} ${CFLAGS} ${LDFLAGS:@F@-Wl,$F@} -o ${PROG} ${OBJS} ${LDADD}
 
 .if ${SHLINKINSTALLDIR} != "/usr/libexec"
 SYMLINKS+=     ${SHLINKINSTALLDIR}/${PROG} /usr/libexec/${PROG}



Home | Main Index | Thread Index | Old Index