diff options
author | David E. O'Brien <obrien@FreeBSD.org> | 1999-11-17 07:30:35 +0000 |
---|---|---|
committer | David E. O'Brien <obrien@FreeBSD.org> | 1999-11-17 07:30:35 +0000 |
commit | 54d477a4f1e7a4a2679e0715c478855f30b0a41a (patch) | |
tree | f3ebb34b1eae9ea29ec061ab6df5b9b858386289 /share/mk | |
parent | a8d46c3a9928f25bdcdc6c620315fc8a7d57a7ec (diff) | |
download | src-54d477a4f1e7a4a2679e0715c478855f30b0a41a.tar.gz src-54d477a4f1e7a4a2679e0715c478855f30b0a41a.zip |
Make "-mpreferred-stack-boundary=2" the default on the i386.
This reduces the size of the kernel and modules when compiled with GCC 2.95.
Notes
Notes:
svn path=/head/; revision=53265
Diffstat (limited to 'share/mk')
-rw-r--r-- | share/mk/bsd.kern.mk | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/share/mk/bsd.kern.mk b/share/mk/bsd.kern.mk index b4bd9deb6966..595bc2e202cb 100644 --- a/share/mk/bsd.kern.mk +++ b/share/mk/bsd.kern.mk @@ -19,6 +19,19 @@ CWARNFLAGS?= -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \ # # +# On the i386, do not align the stack to 16-byte boundaries. Otherwise GCC +# 2.95 adds code to the entry and exit point of every function to align the +# stack to 16-byte boundaries -- thus wasting approximately 12 bytes of stack +# per function call. While the 16-byte alignment may benefit micro benchmarks, +# it is probably an overall loose as it makes the code bigger (less efficient +# use of code cache tag lines) and uses more stack (less efficient use of data +# cache tag lines) +# +.if ${MACHINE_ARCH} == "i386" +CFLAGS+= -mpreferred-stack-boundary=2 +.endif + +# # On the alpha, make sure that we don't use floating-point registers and # allow the use of EV56 instructions (only needed for low-level i/o). # |