EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  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  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Port of EPICS 3.14.9 to ETRAX CRIS architecture - Strange Data - Optimization issues
From: Peter Zumbruch <[email protected]>
To: EPICS tech-talk <[email protected]>
Date: Thu, 23 Aug 2007 14:23:37 +0200
Hello Jeff,
concerning the optimization level:
The optimization -O3 had to be replaced by -Os or the default -O0 to be able to compile.
Typically changing the optimization level has an impact only on the object
code and therefore on what is executed at runtime (we hope that -O3 will run
correctly and hopefully also more efficiently compared -O0), but does not
have an impact on whether the source code will successfully compile or not.
I am interpreting the above statement to imply that the source code wouldnât
compile successfully into object code under -O3, but given my expectations
of compilers I suspect that maybe I am suffering from a misunderstanding. So
I am curious, which was the result with -O3?
A) failure to produce object code, or
B) production of object code with runtime behavior even worse than what is
described in your mail message, or
C) You set the optimization to -O0 based on recent discussions about EPICS
R3.14.9 being incompatible with gcc 3.2.3 -O3
The cross-compiler used is a gnu-compiler provided by axis:
cris-gcc --version: cris-axis-elf-gcc (GCC) 3.2.1 Axis release R64/1.64
It is case (A):
Here the outcome of a complete make distclean && make rebuild for all levels
(I replaced the paths by <path> symbols)

Summary:
cases 1-3 fail, at the same place (not knowing the templates??)
cases 4-5 compile

1) optimization -O3:

<CROSS_COMPILER>/bin/cris-axis-linux-gnu-g++ -c
-D_POSIX_C_SOURCE=199506L -D_POSIX_THREADS -D_XOPEN_SOURCE=500 -D_cris_
-mlinux -DUNIX -D_BSD_SOURCE -Dlinux-D_REENTRANT -ansi -O3 -Wall
-mno-mul-bug-workaround -march=v10 -g -mlinux -I. -I..
-I../../../include/os/Linux -I../../../include -isystem
<CROSS_COMPILER_INCLUDE>/cris-axis-linux-gnu/include -isystem
<CROSS_COMPILER_INCLUDE>/cris-axis-linux-gnu/usr/include ../casw.cpp
In file included from ../../../include/osiWireFormat.h:265,
from ../casw.cpp:28:
../../../include/os/Linux/osdWireFormat.h:67:5: warning: #warning little
endian defined
In file included from ../udpiiu.h:49,
from ../casw.cpp:31:
../repeaterSubscribeTimer.h:41: parse error before `&' token
In file included from ../casw.cpp:31:
../udpiiu.h:260: parse error before `&' token
make[3]: *** [casw.o] Error 1
make[3]: Leaving directory
`<EPICS_HOME>/base-3.14.9/src/ca/O.linux-cris_v10'
make[2]: *** [install.linux-cris_v10] Error 2
make[2]: Leaving directory `<EPICS_HOME>/base-3.14.9/src/ca'
make[1]: *** [ca.install] Error 2
make[1]: Leaving directory `<EPICS_HOME>/base-3.14.9/src'
make: *** [src.install] Error 2

2) optimization -O2:

<CROSS_COMPILER>/bin/cris-axis-linux-gnu-g++ -c
-D_POSIX_C_SOURCE=199506L -D_POSIX_THREADS -D_XOPEN_SOURCE=500 -D_cris_
-mlinux -DUNIX -D_BSD_SOURCE -Dlinux-D_REENTRANT -ansi -O2 -Wall
-mno-mul-bug-workaround -march=v10 -g -mlinux -I. -I..
-I../../../include/os/Linux -I../../../include -isystem
<CROSS_COMPILER_INCLUDE>/cris-axis-linux-gnu/include -isystem
<CROSS_COMPILER_INCLUDE>/cris-axis-linux-gnu/usr/include ../casw.cpp
In file included from ../../../include/osiWireFormat.h:265,
from ../casw.cpp:28:
../../../include/os/Linux/osdWireFormat.h:67:5: warning: #warning little
endian defined
In file included from ../udpiiu.h:49,
from ../casw.cpp:31:
../repeaterSubscribeTimer.h:41: parse error before `&' token
In file included from ../casw.cpp:31:
../udpiiu.h:260: parse error before `&' token
make[3]: *** [casw.o] Error 1
make[3]: Leaving directory
`<EPICS_HOME>/base-3.14.9/src/ca/O.linux-cris_v10'
make[2]: *** [install.linux-cris_v10] Error 2
make[2]: Leaving directory `<EPICS_HOME>/base-3.14.9/src/ca'
make[1]: *** [ca.install] Error 2
make[1]: Leaving directory `<EPICS_HOME>/base-3.14.9/src'
make: *** [src.install] Error 2

3) optimization -O1:

<CROSS_COMPILER>/bin/cris-axis-linux-gnu-g++ -c
-D_POSIX_C_SOURCE=199506L -D_POSIX_THREADS -D_XOPEN_SOURCE=500 -D_cris_
-mlinux -DUNIX -D_BSD_SOURCE -Dlinux-D_REENTRANT -ansi -O1 -Wall
-mno-mul-bug-workaround -march=v10 -g -mlinux -I. -I..
-I../../../include/os/Linux -I../../../include -isystem
<CROSS_COMPILER_INCLUDE>/cris-axis-linux-gnu/include -isystem
<CROSS_COMPILER_INCLUDE>/cris-axis-linux-gnu/usr/include ../casw.cpp
In file included from ../../../include/osiWireFormat.h:265,
from ../casw.cpp:28:
../../../include/os/Linux/osdWireFormat.h:67:5: warning: #warning little
endian defined
In file included from ../udpiiu.h:49,
from ../casw.cpp:31:
../repeaterSubscribeTimer.h:41: parse error before `&' token
In file included from ../casw.cpp:31:
../udpiiu.h:260: parse error before `&' token
make[3]: *** [casw.o] Error 1
make[3]: Leaving directory
`<EPICS_HOME>/base-3.14.9/src/ca/O.linux-cris_v10'
make[2]: *** [install.linux-cris_v10] Error 2
make[2]: Leaving directory `<EPICS_HOME>/base-3.14.9/src/ca'
make[1]: *** [ca.install] Error 2
make[1]: Leaving directory `<EPICS_HOME>/base-3.14.9/src'
make: *** [src.install] Error 2

4) optimization -00 (no problem)
<CROSS_COMPILER>/bin/cris-axis-linux-gnu-g++ -c
-D_POSIX_C_SOURCE=199506L -D_POSIX_THREADS -D_XOPEN_SOURCE=500 -D_cris_
-mlinux -DUNIX -D_BSD_SOURCE -Dlinux-D_REENTRANT -ansi -O0 -Wall
-mno-mul-bug-workaround -march=v10 -g -mlinux -I. -I..
-I../../../include/os/Linux -I../../../include -isystem
<CROSS_COMPILER_INCLUDE>/cris-axis-linux-gnu/include -isystem
<CROSS_COMPILER_INCLUDE>/cris-axis-linux-gnu/usr/include ../casw.cpp
In file included from ../../../include/osiWireFormat.h:265,
from ../casw.cpp:28:
../../../include/os/Linux/osdWireFormat.h:67:5: warning: #warning little
endian defined

5) optimization -0s (no problem)

<CROSS_COMPILER>/bin/crisv32-axis-linux-gnu-g++ -c
-D_POSIX_C_SOURCE=199506L -D_POSIX_THREADS -D_XOPEN_SOURCE=500 -D_cris_
-mlinux -DUNIX -D_BSD_SOURCE -Dlinux -D_REENTRANT -ansi -Os -Wall
-mno-mul-bug-workaround -march=v32 -g -mlinux -I. -I..
-I../../../include/os/Linux -I../../../include -isystem
<CROSS_COMPILER_INCLUDE>/crisv32-axis-linux-gnu/include -isystem
<CROSS_COMPILER_INCLUDE>/crisv32-axis-linux-gnu/usr/include ../casw.cpp
In file included from ../../../include/osiWireFormat.h:265,
from ../casw.cpp:28:
../../../include/os/Linux/osdWireFormat.h:67:5: warning: #warning little
endian defined

A colleague stated in an earlier test:
" you cannot overload system function(fprintf) as the class method, if
you turn on -03". I haven't checked this statement yet, but take it as a
possible hint.

Best regards,
Peter

--
Dr. Peter W. Zumbruch
EE - department / Controls group / GSI
E-Mail: [email protected]
Tel: +49-(6159)-71-1435 / Fax: +49-(6159)-71-2986

Gesellschaft fÃr Schwerionenforschung mbH
PlanckstraÃe 1 / D-64291 Darmstadt / www.gsi.de

Gesellschaft mit beschrÃnkter Haftung
Sitz der Gesellschaft: Darmstadt
Handelsregister: Amtsgericht Darmstadt, HRB 1528

GeschÃftsfÃhrer: Professor Dr. Horst StÃcker, Dr. Alexander Kurz
Vorsitzende des Aufsichtsrates: Dr. Beatrix Vierkorn-Rudolph,
Stellvertreter: Ministerialdirigent Dr. Rolf Bernhardt





References:
Port of EPICS 3.14.9 to ETRAX CRIS architecture - Strange Data Peter Zumbruch
RE: Port of EPICS 3.14.9 to ETRAX CRIS architecture - Strange Data Jeff Hill

Navigate by Date:
Prev: RE: asyn - interrupts Heinrich du Toit
Next: RE: asyn - interrupts Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: Port of EPICS 3.14.9 to ETRAX CRIS architecture - Strange Data Jeff Hill
Next: Re: Port of EPICS 3.14.9 to ETRAX CRIS architecture - Strange Data Peter Zumbruch
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 10 Nov 2011 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·