diff options
author | Pascal Stumpf <pascal@cvs.openbsd.org> | 2012-08-22 17:19:36 +0000 |
---|---|---|
committer | Pascal Stumpf <pascal@cvs.openbsd.org> | 2012-08-22 17:19:36 +0000 |
commit | 0b17a3ce8acce6123900b78334061ec5da7fff13 (patch) | |
tree | 899daa1fa911a22452f013b57bb5873909dd7ed4 /share | |
parent | 9e13e109aa5166fac25ad417e38996ce27251c67 (diff) |
Convert cpp | as rules in bsd.lib.mk and lib/libc/sys/Makefile.inc to pure cc
invocations. This allows us to use the compiler builtin define __PIC__ to check
for PIC/PIEness rather than passing -DPIC. Simplifies PIE work a lot.
ok matthew@, conceptually ok kurt@
Diffstat (limited to 'share')
-rw-r--r-- | share/mk/bsd.lib.mk | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk index d05539b6001..3bfb1ac75cb 100644 --- a/share/mk/bsd.lib.mk +++ b/share/mk/bsd.lib.mk @@ -1,4 +1,4 @@ -# $OpenBSD: bsd.lib.mk,v 1.64 2012/07/08 08:44:55 espie Exp $ +# $OpenBSD: bsd.lib.mk,v 1.65 2012/08/22 17:19:34 pascal Exp $ # $NetBSD: bsd.lib.mk,v 1.67 1996/01/17 20:39:26 mycroft Exp $ # @(#)bsd.lib.mk 5.26 (Berkeley) 5/2/91 @@ -101,34 +101,30 @@ SHLIB_MINOR=${minor} @rm -f ${.TARGET}.o .S.o .s.o: - @echo "${CPP} ${CPPFLAGS} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} | \ - ${AS} -o ${.TARGET}" - @${CPP} ${CPPFLAGS} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} | \ - ${AS} -o ${.TARGET}.o + @echo "${COMPILE.S} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}" + @${COMPILE.S} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}.o @${LD} -X -r ${.TARGET}.o -o ${.TARGET} @rm -f ${.TARGET}.o .S.go .s.go: - @echo "${CPP} ${CPPFLAGS} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} |\ - ${AS} -o ${.TARGET}" - @${CPP} ${CPPFLAGS} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} | \ - ${AS} -o ${.TARGET}.o + @echo "${COMPILE.S} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}" + @${COMPILE.S} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}.o @${LD} -X -r ${.TARGET}.o -o ${.TARGET} @rm -f ${.TARGET}.o .S.po .s.po: - @echo "${CPP} -DPROF ${CPPFLAGS} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} |\ - ${AS} -o ${.TARGET}" - @${CPP} -DPROF ${CPPFLAGS} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} | \ - ${AS} -o ${.TARGET}.o + @echo "${COMPILE.S} -DPROF ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} \ + -o ${.TARGET}" + @${COMPILE.S} -DPROF ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} \ + -o ${.TARGET}.o @${LD} -X -r ${.TARGET}.o -o ${.TARGET} @rm -f ${.TARGET}.o .S.so .s.so: - @echo "${CPP} -DPIC ${CPPFLAGS} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} | \ - ${AS} ${ASPICFLAG} -o ${.TARGET}" - @${CPP} -DPIC ${CPPFLAGS} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} | \ - ${AS} ${ASPICFLAG} -o ${.TARGET}.o + @echo "${COMPILE.S} ${PICFLAG} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} \ + -o ${.TARGET}" + @${COMPILE.S} ${PICFLAG} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} \ + -o ${.TARGET}.o @${LD} -X -r ${.TARGET}.o -o ${.TARGET} @rm -f ${.TARGET}.o |