[Lunar-commits] r25168 - moonbase/trunk/graphics/libpng
Zbigniew Luszpinski
zbiggy at lunar-linux.org
Wed Jul 18 03:32:46 CEST 2007
Author: zbiggy
Date: 2007-07-18 03:32:46 +0200 (Wed, 18 Jul 2007)
New Revision: 25168
Added:
moonbase/trunk/graphics/libpng/BUILD
Log:
Bugfix: now libpng is compiled with low level MMX assembly optimization when
MMX ready CPU is detected during compilation.
This built-in asm optimization is faster than general CFLAGS.
libpng MMX check is a little bit crazy and _turns off_ building MMX code when:
- march is higher than i686 (because it autoenables supported by CPU simd optimizations)
- mmx,sse,3dnow are enabled manually using -m parameter or -mfpmath=
If MMX optimization is turned off you'll see PNG_NO_MMX_CODE flag in compilation log several times.
This bugfix fixes this problem by temporary turning off bad flags and by providing alternative optimization.
libpng built with this bugfix returns:
checking if assembler code in pnggccrd.c can be compiled without PNG_NO_MMX_CODE... yes
in configure stage.
In compilation log you will not see PNG_NO_MMX_CODE anymore.
Added: moonbase/trunk/graphics/libpng/BUILD
===================================================================
--- moonbase/trunk/graphics/libpng/BUILD (rev 0)
+++ moonbase/trunk/graphics/libpng/BUILD 2007-07-18 01:32:46 UTC (rev 25168)
@@ -0,0 +1,12 @@
+(
+
+CFLAGS="${CFLAGS//march/mtune}"
+CFLAGS="${CFLAGS//=sse/=387}"
+CFLAGS="${CFLAGS//=387,387/=387}"
+CFLAGS="${CFLAGS//-mmmx/-mno-mmx}"
+CFLAGS="${CFLAGS//-m3dnow/-mno-3dnow}"
+CFLAGS="${CFLAGS//-msse/-mno-sse}"
+CFLAGS="-march=`uname -m` $CFLAGS"
+default_build
+
+) > $C_FIFO 2>&1
More information about the Lunar-commits
mailing list