diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2019-11-07 20:42:29 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2019-11-07 20:42:29 +0000 |
commit | 3ff3f71ff3208de3d266d976d32d4db90d6b3fb6 (patch) | |
tree | 5694dc5f52e037594888fb3764e15a85ddbf0feb /sys/arch/amd64 | |
parent | 2301c8319f5a1f935328e8b774b0118665a026b7 (diff) |
The compiler -pg option implies -fno-ret-protector, as we want to disable
retguard and similar when profiling. However, that missed all the .S files,
as ${PROF} wasn't added when ${NORMAL_S} was converted from direct invocation
of ${AS} to instead use ${CC}. Similarly, mcount.o still had retguards
as it cannot be built with -pg. So: pass ${PROF} when compiling .S files,
and compile "no profiling" files with -fno-ret-protector on archs with
retguard.
feedback and ok mpi@ mortimer@
Diffstat (limited to 'sys/arch/amd64')
-rw-r--r-- | sys/arch/amd64/conf/Makefile.amd64 | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/arch/amd64/conf/Makefile.amd64 b/sys/arch/amd64/conf/Makefile.amd64 index 23c29bd7685..449f82d639b 100644 --- a/sys/arch/amd64/conf/Makefile.amd64 +++ b/sys/arch/amd64/conf/Makefile.amd64 @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.amd64,v 1.116 2019/06/21 15:34:06 deraadt Exp $ +# $OpenBSD: Makefile.amd64,v 1.117 2019/11/07 20:42:28 guenther Exp $ # For instructions on building kernels consult the config(8) and options(4) # manual pages. @@ -75,9 +75,9 @@ HOSTED_CPPFLAGS=${CPPFLAGS:S/^-nostdinc$//} HOSTED_CFLAGS= ${CFLAGS} HOSTED_C= ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $< -NORMAL_C_NOP= ${CC} ${CFLAGS} ${CPPFLAGS} -c $< +NORMAL_C_NOP= ${CC} ${CFLAGS} ${CPPFLAGS} -fno-ret-protector -c $< NORMAL_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $< -NORMAL_S= ${CC} ${AFLAGS} ${CPPFLAGS} -c $< +NORMAL_S= ${CC} ${AFLAGS} ${CPPFLAGS} ${PROF} -c $< %OBJS |