Browse Source

Make it again possible to have compact and small stack usage
on non-SSE capable processors. I'm doing it the second time.

text data bss dec hex filename
238539 1367 11280 251186 3d532 uClibc.z2/lib/libuClibc-0.9.30-svn.so
229457 1367 11280 242104 3b1b8 uClibc.z3/lib/libuClibc-0.9.30-svn.so

Denis Vlasenko 16 years ago
parent
commit
5196e42e69
1 changed files with 6 additions and 2 deletions
  1. 6 2
      Rules.mak

+ 6 - 2
Rules.mak

@@ -179,11 +179,15 @@ PIEFLAG_NAME:=-fPIE
 ifeq ($(TARGET_ARCH),i386)
 	OPTIMIZATION+=$(call check_gcc,-fomit-frame-pointer,)
 
+ifeq ($(CONFIG_386)$(CONFIG_486)$(CONFIG_586)$(CONFIG_586MMX),y)
+	# Non-SSE capable processor.
 	# NB: this may make SSE insns segfault!
 	# -O1 -march=pentium3, -Os -msse etc are known to be affected.
-	# TODO: conditionally bump to 4
-	# (see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13685)
+	# See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13685
+	OPTIMIZATION+=$(call check_gcc,-mpreferred-stack-boundary=2,)
+else
 	OPTIMIZATION+=$(call check_gcc,-mpreferred-stack-boundary=4,)
+endif
 
 	# Choice of alignment (please document why!)
 	#  -falign-labels: in-line labels