Re: svn commit: r228124 - in head: share/mk sys/conf
Hi, did you verify that this works with settings in src.conf for buildworld and for corresponding makeoptions in the kernel config for buildkernel and for the old way of building kernels? The reason we had the shell conditionals was because we didn't manage to get all cases working with make conditionals due to the evaluation order of the various files. Bye, Alexander. -- Send via an Android device, please forgive brevity and typographic and spelling errors. Max Khon hat geschrieben:Author: fjoe Date: Tue Nov 29 08:38:47 2011 New Revision: 228124 URL: http://svn.freebsd.org/changeset/base/228124 Log: Conditionalize ctfconvert/ctfmerge runs on make level (.if/.endif) instead of executing a shell on every object or executable/library file. This shaves off more than 30,000 shell invocations during buildworld. Modified: head/share/mk/bsd.lib.mk head/share/mk/bsd.prog.mk head/share/mk/sys.mk head/sys/conf/kern.post.mk head/sys/conf/kern.pre.mk head/sys/conf/kmod.mk Modified: head/share/mk/bsd.lib.mk == --- head/share/mk/bsd.lib.mkTue Nov 29 08:33:40 2011(r228123) +++ head/share/mk/bsd.lib.mkTue Nov 29 08:38:47 2011(r228124) @@ -75,15 +75,15 @@ PO_FLAG=-pg .c.po: ${CC} ${PO_FLAG} ${STATIC_CFLAGS} ${PO_CFLAGS} -c ${.IMPSRC} -o ${.TARGET} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ -(${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ -${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) +.if !defined(NO_CTF) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif .c.So: ${CC} ${PICFLAG} -DPIC ${SHARED_CFLAGS} ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ -(${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ -${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) +.if !defined(NO_CTF) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif .cc.o: ${CXX} ${STATIC_CXXFLAGS} ${CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET} @@ -96,47 +96,47 @@ PO_FLAG=-pg .f.po: ${FC} -pg ${FFLAGS} -o ${.TARGET} -c ${.IMPSRC} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ -(${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ -${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) +.if !defined(NO_CTF) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif .f.So: ${FC} ${PICFLAG} -DPIC ${FFLAGS} -o ${.TARGET} -c ${.IMPSRC} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ -(${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ -${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) +.if !defined(NO_CTF) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif .s.po .s.So: ${AS} ${AFLAGS} -o ${.TARGET} ${.IMPSRC} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ -(${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ -${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) +.if !defined(NO_CTF) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif .asm.po: ${CC} -x assembler-with-cpp -DPROF ${PO_CFLAGS} ${ACFLAGS} \ -c ${.IMPSRC} -o ${.TARGET} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ -(${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ -${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) +.if !defined(NO_CTF) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif .asm.So: ${CC} -x assembler-with-cpp ${PICFLAG} -DPIC ${CFLAGS} ${ACFLAGS} \ -c ${.IMPSRC} -o ${.TARGET} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ -(${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ -${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) +.if !defined(NO_CTF) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif .S.po: ${CC} -DPROF ${PO_CFLAGS} ${ACFLAGS} -c ${.IMPSRC} -o ${.TARGET} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ -(${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ -${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) +.if !defined(NO_CTF) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif .S.So: ${CC} ${PICFLAG} -DPIC ${CFLAGS} ${ACFLAGS} -c ${.IMPSRC} -o ${.TARGET} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ -(${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ -${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) +.if !defined(NO_CTF) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif all: objwarn @@ -211,9 +211,9 @@ ${SHLIB_NAME}: ${SOBJS} -o ${.TARGET} -Wl,-soname,${SONAME} \ `NM='${NM}' lorder ${SOBJS} | tsort -q` ${LDADD} .endif - @[ -z "${CTFMERGE}" -o -n "${NO_CTF}" ] || \ -(${ECHO} ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${SOBJS} && \ -${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${SOBJS}) +.if !defined(NO_CTF) + ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${SOBJS} +.endif .endif .if defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) && ${MK_TOOLCHAIN} != "no" Modified: head/share/mk/bsd.prog.mk == --- head/share/mk/bsd.prog.mk Tue Nov 29 08:33:40 2011(r228123) +++ head/share/mk/bsd.prog.mk
Re: svn commit: r228124 - in head: share/mk sys/conf
Alexander, On Tue, Nov 29, 2011 at 9:00 PM, Alexander Kabaev wrote: > Author: fjoe > > Date: Tue Nov 29 08:38:47 2011 > > New Revision: 228124 > > URL: http://svn.freebsd.org/changeset/base/228124 > > > > Log: > > Conditionalize ctfconvert/ctfmerge runs on make level (.if/.endif) > > instead of executing a shell on every object or executable/library > > file. > > This shaves off more than 30,000 shell invocations during > > buildworld. > > Have you looked as to _why_ it was done through shell invocation in the > first place before removing it? You now have broken CTF support in > cases where WITH_CTF is set not on make command line or in environment, > but say in each individual Makefile. I tested all the use-cases mentioned in the original commit but it looks like I specified the location of modified share/mk incorrectly when I did WITH_CTF userland tests. Should be fixed now. Sorry for the breakage. Max ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r228124 - in head: share/mk sys/conf
On Tue, 29 Nov 2011 08:38:47 + (UTC) Max Khon wrote: > Author: fjoe > Date: Tue Nov 29 08:38:47 2011 > New Revision: 228124 > URL: http://svn.freebsd.org/changeset/base/228124 > > Log: > Conditionalize ctfconvert/ctfmerge runs on make level (.if/.endif) > instead of executing a shell on every object or executable/library > file. > This shaves off more than 30,000 shell invocations during > buildworld. Have you looked as to _why_ it was done through shell invocation in the first place before removing it? You now have broken CTF support in cases where WITH_CTF is set not on make command line or in environment, but say in each individual Makefile. -- Alexander Kabaev signature.asc Description: PGP signature
Re: svn commit: r228124 - in head: share/mk sys/conf
On Tue, Nov 29, 2011 at 12:38 AM, Max Khon wrote: > Author: fjoe > Date: Tue Nov 29 08:38:47 2011 > New Revision: 228124 > URL: http://svn.freebsd.org/changeset/base/228124 > > Log: > Conditionalize ctfconvert/ctfmerge runs on make level (.if/.endif) instead > of executing a shell on every object or executable/library file. > > This shaves off more than 30,000 shell invocations during buildworld. Thank you Great minds truly do think alike. -Garrett ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r228124 - in head: share/mk sys/conf
Author: fjoe Date: Tue Nov 29 08:38:47 2011 New Revision: 228124 URL: http://svn.freebsd.org/changeset/base/228124 Log: Conditionalize ctfconvert/ctfmerge runs on make level (.if/.endif) instead of executing a shell on every object or executable/library file. This shaves off more than 30,000 shell invocations during buildworld. Modified: head/share/mk/bsd.lib.mk head/share/mk/bsd.prog.mk head/share/mk/sys.mk head/sys/conf/kern.post.mk head/sys/conf/kern.pre.mk head/sys/conf/kmod.mk Modified: head/share/mk/bsd.lib.mk == --- head/share/mk/bsd.lib.mkTue Nov 29 08:33:40 2011(r228123) +++ head/share/mk/bsd.lib.mkTue Nov 29 08:38:47 2011(r228124) @@ -75,15 +75,15 @@ PO_FLAG=-pg .c.po: ${CC} ${PO_FLAG} ${STATIC_CFLAGS} ${PO_CFLAGS} -c ${.IMPSRC} -o ${.TARGET} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) +.if !defined(NO_CTF) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif .c.So: ${CC} ${PICFLAG} -DPIC ${SHARED_CFLAGS} ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) +.if !defined(NO_CTF) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif .cc.o: ${CXX} ${STATIC_CXXFLAGS} ${CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET} @@ -96,47 +96,47 @@ PO_FLAG=-pg .f.po: ${FC} -pg ${FFLAGS} -o ${.TARGET} -c ${.IMPSRC} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) +.if !defined(NO_CTF) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif .f.So: ${FC} ${PICFLAG} -DPIC ${FFLAGS} -o ${.TARGET} -c ${.IMPSRC} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) +.if !defined(NO_CTF) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif .s.po .s.So: ${AS} ${AFLAGS} -o ${.TARGET} ${.IMPSRC} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) +.if !defined(NO_CTF) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif .asm.po: ${CC} -x assembler-with-cpp -DPROF ${PO_CFLAGS} ${ACFLAGS} \ -c ${.IMPSRC} -o ${.TARGET} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) +.if !defined(NO_CTF) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif .asm.So: ${CC} -x assembler-with-cpp ${PICFLAG} -DPIC ${CFLAGS} ${ACFLAGS} \ -c ${.IMPSRC} -o ${.TARGET} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) +.if !defined(NO_CTF) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif .S.po: ${CC} -DPROF ${PO_CFLAGS} ${ACFLAGS} -c ${.IMPSRC} -o ${.TARGET} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) +.if !defined(NO_CTF) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif .S.So: ${CC} ${PICFLAG} -DPIC ${CFLAGS} ${ACFLAGS} -c ${.IMPSRC} -o ${.TARGET} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) +.if !defined(NO_CTF) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif all: objwarn @@ -211,9 +211,9 @@ ${SHLIB_NAME}: ${SOBJS} -o ${.TARGET} -Wl,-soname,${SONAME} \ `NM='${NM}' lorder ${SOBJS} | tsort -q` ${LDADD} .endif - @[ -z "${CTFMERGE}" -o -n "${NO_CTF}" ] || \ - (${ECHO} ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${SOBJS} && \ - ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${SOBJS}) +.if !defined(NO_CTF) + ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${SOBJS} +.endif .endif .if defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) && ${MK_TOOLCHAIN} != "no" Modified: head/share/mk/bsd.prog.mk == --- head/share/mk/bsd.prog.mk Tue Nov 29 08:33:40 2011(r228123) +++ head/share/mk/bsd.prog.mk Tue Nov 29 08:38:47 2011(r228124) @@ -60,9 +60,9 @@ ${PROG}: ${OBJS} .else ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LDADD} .endif - @[ -z "${CTFMERGE}" -o -n "${NO_CTF}" ] |