Skip site navigation (1) Skip section navigation (2)

Re: patch to have configure check if CC is intel C compiler

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Jeremy Drake <pgsql-patches(at)jdrake(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-patches(at)postgresql(dot)org
Subject: Re: patch to have configure check if CC is intel C compiler
Date: 2006-04-29 00:51:31
Message-ID: 200604290051.k3T0pVV15266@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-patches
Patch applied.  Thanks.

---------------------------------------------------------------------------


Jeremy Drake wrote:
> On Sat, 22 Apr 2006, Tom Lane wrote:
> 
> > Given that we've already got a test for ICC in there as of today, I'd
> > vote for adding -mp1 to CFLAGS if we see it's ICC.
> 
> This patch seems to do the trick...
> 
> Index: configure.in
> ===================================================================
> RCS file: /home/jeremyd/local/postgres/cvsuproot/pgsql/configure.in,v
> retrieving revision 1.460
> diff -c -r1.460 configure.in
> *** configure.in        22 Apr 2006 00:29:41 -0000      1.460
> --- configure.in        25 Apr 2006 06:03:12 -0000
> ***************
> *** 263,268 ****
> --- 263,273 ----
>       # Check whether they are supported, and add them to CFLAGS if so.
>       PGAC_PROG_CC_CFLAGS_OPT([-Wdeclaration-after-statement])
>       PGAC_PROG_CC_CFLAGS_OPT([-Wendif-labels])
> +   else
> +     # Intel compiler has a bug/misoptimization in checking for
> +     # division by NAN (NaN == 0), -mp1 fixes it, so add it to the
> +     # CFLAGS.
> +     PGAC_PROG_CC_CFLAGS_OPT([-mp1])
>     fi
> 
>     # Disable strict-aliasing rules; needed for gcc 3.3+
> 
> 
> 
> 
> -- 
> A quarrel is quickly settled when deserted by one party; there is no battle
> unless there be two.  -- Seneca
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
>        choose an index scan if your joining column's datatypes do not
>        match
> 

-- 
  Bruce Momjian   http://candle.pha.pa.us
  EnterpriseDB    http://www.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

In response to

pgsql-patches by date

Next:From: Martijn van OosterhoutDate: 2006-04-29 10:59:15
Subject: Re: Cleaning up multiply-defined-symbol warnings on OS X
Previous:From: Bruce MomjianDate: 2006-04-28 22:54:59
Subject: Re: Solaris ASM problem

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group