EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: EPICS Build without '-ansi'
From: Andrew Johnson <[email protected]>
To: [email protected]
Cc: Michael Abbott <[email protected]>
Date: Thu, 5 Feb 2009 10:55:31 -0600
On Wed, 4 Feb 2009, Rod Nussbaumer wrote:
> I have some C code written elsewhere that I want to compile with the
> EPICS build system. The code has quite a bit of C++-style commenting in
> it, and gcc bails with complaints about such commnts, as the standard gcc
> commandline in EPICS includes the '-ansi' option. Is there any way to
> remove the -ansi option for this project only?

We normally override the compiler language setting using the CMPLR variable in 
a Makefile, so this switches to using the -traditional flag to gcc (which 
actually generated an error for me just now, showing that we don't use it any 
more):

	CMPLR = TRAD

You can define your own settings as well, like this:

	CMPLR = GNU99
	CONFORM_CFLAGS_GNU99 = -std=gnu99

Note that the CMPLR setting applies to all files built from this Makefile, but 
you can use a target-specific variable to change it when compiling a 
particular specific file <name>.c, like this (tested):

	<name>.o : CMPLR = GNU99

This will apply that flag for all architecture builds, which is fine if you 
only build using gcc architectures, but not much use if you have to support 
other compilers as well (but then they have to support that particular 
dialect of C anyhow, so maybe this isn't really an issue).

- Andrew
-- 
The best FOSS code is written to be read by other humans -- Harold Welte

References:
EPICS Build without '-ansi' Rod Nussbaumer
Re: EPICS Build without '-ansi' Michael Abbott

Navigate by Date:
Prev: Python Channel Access bindings Michael Abbott
Next: Re: Diamond Libera EPICS Driver Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: EPICS Build without '-ansi' Michael Abbott
Next: Diamond Libera EPICS Driver Michael Abbott
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 31 Jan 2014 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·