Date: Sun, 08 Jan 2012 21:11:08 +0100 From: Andreas Tobler <andreast-list@fgznet.ch> To: Current <freebsd-current@FreeBSD.org> Subject: disable GUPROF for archs other than i386 and amd64 Message-ID: <4F09F85C.2060303@fgznet.ch>
next in thread | raw e-mail | index | archive | help
Hi, I'm working on profiling support for powerpc64 and I struggled over the mprofiler-epilogue option not being known on the ppc gcc. Disabling this option for ppc uncovered the next thing, MCOUNT_OVERHEAD, MEXITCOUNT_OVERHEAD and MEXITCOUNT_OVERHEAD_GETLABEL are also not defined. Not only on ppc but everywhere except on i386 and amd64. So for the time being, would it be ok if I disable GUPROF on archs other than i386 and amd64? The patch below would be a candidate. Thoughts? TIA, Andreas Index: conf/kern.pre.mk =================================================================== --- conf/kern.pre.mk (revision 229741) +++ conf/kern.pre.mk (working copy) @@ -103,13 +103,16 @@ .if defined(PROFLEVEL) && ${PROFLEVEL} >= 1 CFLAGS+= -DGPROF -falign-functions=16 +PROF= -pg .if ${PROFLEVEL} >= 2 CFLAGS+= -DGPROF4 -DGUPROF -PROF= -pg -mprofiler-epilogue +.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" +PROF+= -mprofiler-epilogue .else -PROF= -pg +.error "GUPROF not supported on ${MACHINE_CPUARCH}." .endif .endif +.endif DEFINED_PROF= ${PROF} # Put configuration-specific C flags last (except for ${PROF}) so that they
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4F09F85C.2060303>