From defb1800ca7ed04d5d9571574e459526da1c1d9f Mon Sep 17 00:00:00 2001 From: giraffedata Date: Fri, 28 Mar 2008 18:53:15 +0000 Subject: Fix GCC 4.3 build failure git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@607 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- doc/HISTORY | 3 +++ lib/libpbm3.c | 18 +++++++++++++++--- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/doc/HISTORY b/doc/HISTORY index 5b420968..f0882363 100644 --- a/doc/HISTORY +++ b/doc/HISTORY @@ -8,6 +8,9 @@ not yet BJH Release 10.43.00 pnmnorm: fix -colorvalue, -saturation, -keephues options. + Build: make it work with Gcc 4.3 and -sse by omitting + MMX/SSE optimizations. + 08.03.26 BJH Release 10.42.00 anytopnm: Recognize xwd image by 'file' type. diff --git a/lib/libpbm3.c b/lib/libpbm3.c index 79ac1cd8..7debedb9 100644 --- a/lib/libpbm3.c +++ b/lib/libpbm3.c @@ -13,9 +13,21 @@ #include "pbm.h" #include "bitreverse.h" -#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 301) && defined (__SSE__) -/* intel MMX-SSE enhancement for pbm_writepbmowraw() */ -/* GCC only. Turn on with -msse */ +/* HAVE_MMX_SSE means we have the means to use MMX and SSE CPU facilities + to make PBM raster processing faster. + + The GNU Compiler -msse option makes SSE available. +*/ + +#if defined(__GNUC__) && \ + (__GNUC__ * 100 + __GNUC_MINOR__ >= 301) && \ + (__GNUC__ * 100 + __GNUC_MINOR__ < 403) && \ + defined (__SSE__) +/* GCC 4.3 does have the facility, but it is different from what this + code knows how to use. In particular, the calls to + __builtin_ia32_pcmpeqb() and __builtin_ia32_pmovmskb() fail to + compile, with complaints of improper argument types. +*/ #define HAVE_MMX_SSE 1 #else -- cgit 1.4.1