Fixed the fix for not using -fomit-frame-pointer with -pg. The previous

fix stopped it being used in all cases, because substitution on unset
variables does not work.

When profiling, put -malign-functions=4 in CFLAGS instead of in PROF.
This fixes the histogram counts for profiling support functions.  It
gives bogus but harmless extra alignment for genassym etc.
This commit is contained in:
bde 1997-06-29 16:39:11 +00:00
parent 26268f9b90
commit 2d03283ebc
5 changed files with 13 additions and 10 deletions

View File

@ -1,7 +1,7 @@
# Makefile.i386 -- with config changes.
# Copyright 1990 W. Jolitz
# from: @(#)Makefile.i386 7.1 5/10/91
# $Id: Makefile.i386,v 1.98 1997/05/31 09:19:19 peter Exp $
# $Id: Makefile.i386,v 1.99 1997/05/31 17:59:56 peter Exp $
#
# Makefile for FreeBSD
#
@ -38,8 +38,9 @@ INCLUDES+= -I/usr/include
COPTS= ${INCLUDES} ${IDENT} -DKERNEL -include opt_global.h
CFLAGS= ${COPTFLAGS} ${CWARNFLAGS} ${DEBUG} ${COPTS}
LOAD_ADDRESS?= F0100000
DEFINED_PROF= ${PROF}
.if defined(PROF)
PROF+= -malign-functions=4
CFLAGS+= -malign-functions=4
.if ${PROFLEVEL} >= 2
IDENT+= -DGPROF4 -DGUPROF
PROF+= -mprofiler-epilogue

View File

@ -1,7 +1,7 @@
# Makefile.i386 -- with config changes.
# Copyright 1990 W. Jolitz
# from: @(#)Makefile.i386 7.1 5/10/91
# $Id: Makefile.i386,v 1.98 1997/05/31 09:19:19 peter Exp $
# $Id: Makefile.i386,v 1.99 1997/05/31 17:59:56 peter Exp $
#
# Makefile for FreeBSD
#
@ -38,8 +38,9 @@ INCLUDES+= -I/usr/include
COPTS= ${INCLUDES} ${IDENT} -DKERNEL -include opt_global.h
CFLAGS= ${COPTFLAGS} ${CWARNFLAGS} ${DEBUG} ${COPTS}
LOAD_ADDRESS?= F0100000
DEFINED_PROF= ${PROF}
.if defined(PROF)
PROF+= -malign-functions=4
CFLAGS+= -malign-functions=4
.if ${PROFLEVEL} >= 2
IDENT+= -DGPROF4 -DGUPROF
PROF+= -mprofiler-epilogue

View File

@ -1,7 +1,7 @@
# This file tells config what files go into building a kernel,
# files marked standard are always included.
#
# $Id: files.i386,v 1.164 1997/06/01 20:25:55 bde Exp $
# $Id: files.i386,v 1.165 1997/06/02 08:18:58 dfr Exp $
#
aic7xxx_asm optional ahc device-driver \
dependency "$S/dev/aic7xxx/*.[chyl]" \
@ -125,7 +125,7 @@ i386/isa/if_wl.c optional wl device-driver
i386/isa/if_ze.c optional ze device-driver
i386/isa/if_zp.c optional zp device-driver
i386/isa/ipl_funcs.c standard \
compile-with "${CC} -c ${CFLAGS} ${PROF:S/^$/-fomit-frame-pointer/} $<"
compile-with "${CC} -c ${CFLAGS} ${DEFINED_PROF:S/^$/-fomit-frame-pointer/} $<"
i386/isa/intr_machdep.c standard
i386/isa/isa.c optional isa device-driver
i386/isa/istallion.c optional stli device-driver

View File

@ -1,7 +1,7 @@
# Makefile.i386 -- with config changes.
# Copyright 1990 W. Jolitz
# from: @(#)Makefile.i386 7.1 5/10/91
# $Id: Makefile.i386,v 1.98 1997/05/31 09:19:19 peter Exp $
# $Id: Makefile.i386,v 1.99 1997/05/31 17:59:56 peter Exp $
#
# Makefile for FreeBSD
#
@ -38,8 +38,9 @@ INCLUDES+= -I/usr/include
COPTS= ${INCLUDES} ${IDENT} -DKERNEL -include opt_global.h
CFLAGS= ${COPTFLAGS} ${CWARNFLAGS} ${DEBUG} ${COPTS}
LOAD_ADDRESS?= F0100000
DEFINED_PROF= ${PROF}
.if defined(PROF)
PROF+= -malign-functions=4
CFLAGS+= -malign-functions=4
.if ${PROFLEVEL} >= 2
IDENT+= -DGPROF4 -DGUPROF
PROF+= -mprofiler-epilogue

View File

@ -1,7 +1,7 @@
# This file tells config what files go into building a kernel,
# files marked standard are always included.
#
# $Id: files.i386,v 1.164 1997/06/01 20:25:55 bde Exp $
# $Id: files.i386,v 1.165 1997/06/02 08:18:58 dfr Exp $
#
aic7xxx_asm optional ahc device-driver \
dependency "$S/dev/aic7xxx/*.[chyl]" \
@ -125,7 +125,7 @@ i386/isa/if_wl.c optional wl device-driver
i386/isa/if_ze.c optional ze device-driver
i386/isa/if_zp.c optional zp device-driver
i386/isa/ipl_funcs.c standard \
compile-with "${CC} -c ${CFLAGS} ${PROF:S/^$/-fomit-frame-pointer/} $<"
compile-with "${CC} -c ${CFLAGS} ${DEFINED_PROF:S/^$/-fomit-frame-pointer/} $<"
i386/isa/intr_machdep.c standard
i386/isa/isa.c optional isa device-driver
i386/isa/istallion.c optional stli device-driver