libc: link with -nodefaultlibs -lgcc instead of -nolibc
authorSimon Schubert <corecode@dragonflybsd.org>
Thu, 30 Jul 2009 08:58:55 +0000 (10:58 +0200)
committerSimon Schubert <corecode@dragonflybsd.org>
Sun, 2 Aug 2009 17:13:47 +0000 (19:13 +0200)
The -nolibc flag is a proprietary DragonFly construct, which is only
used by libc.  It is unnecessary, because the same behavior can be
achieved by specifying -nodefaultslibs -lgcc for linking.

lib/libc/Makefile

index ac3cb2a..e172195 100644 (file)
@@ -13,7 +13,10 @@ CFLAGS+=-DLIBC_RCS -DSYSLIBC_RCS -I${.CURDIR}/include ${AINC}
 AINC=  -I${.OBJDIR} -I${.CURDIR}/${MACHINE_ARCH}
 CLEANFILES+=tags
 PRECIOUSLIB=   yes
-LDADD= -nolibc
+
+DPADD+=        ${LIBGCC}
+LDFLAGS+= -nodefaultlibs
+LDADD+=        -lgcc
 
 #
 # Include make rules that are shared with libc_r.