On Dec 1, 2:10 pm, François Bissey <f.r.bis...@massey.ac.nz> wrote:
> On Wed, 02 Dec 2009 04:17:50 strogdon wrote:
>
> > Hey Francois. I too thought that perhaps the spkg supplied flags would
> > override any changes with custom flags. However the custom flags seem
> > to be appended to the spkg provided ones. For example
>
> > with custom CFLAGS
> > building 'sage.algebras.quatalg.quaternion_algebra_element' extension
> > gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -march=opteron -
> > O2 -pipe -fPIC
>
> > with CFLAGS unset
> > building 'sage.algebras.quatalg.quaternion_algebra_element' extension
> > gcc -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-
> > prototypes -fPIC
>
> > The no-strict-aliasing get's lost! I'll give your suggestion a whirl,
> > but it will take some time to rebuild things.
>
> I think that may be a scons behaviour. Yes I think I have seen some
> stuff they do in polybori. That may explain the duplication of a number
> of flags there.
> -fno-strict-aliasing disappearance and appearance are strange.
> I am not a scons specialist but I am guessing it is not set as intended.
>
> Please keep us up to date with the results.
> Francois

Here are the results of the tests. When CFLAGS were passed to the
build of sage they were passed as

  CFLAGS="..." CXXFLAGS="..." make

ALL tests failed to build sage correctly except in the situations I
listed previously when the CFLAGS were unset in spkg-install and when
no CFLAGS were passed. In this latter case a simple 'make' was issued.
All failures were identical to the failure listed previously. Below I
list the flags that are passed to gcc in a typical build of  the sage
spkg components for each test.

no CFLAGS a simple 'make' issued
building 'sage.algebras.quatalg.quaternion_algebra_element' extension
gcc -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-
prototypes -fPIC

CFLAGS="-O2 -pipe"
building 'sage.algebras.quatalg.quaternion_algebra_element' extension
gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -O2 -pipe -fPIC

CFLAGS="-pipe"
building 'sage.algebras.quatalg.quaternion_algebra_element' extension
gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -pipe -fPIC

CFLAGS="" and CFLAGS=  (I find this one curious!)
building 'sage.algebras.quatalg.quaternion_algebra_element' extension
gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC

CFLAGS="-march=native"
building 'sage.algebras.quatalg.quaternion_algebra_element' extension
gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -march=native -
fPIC

So, it would appear that it is not the CFLAGS but whether CFLAGS has
been set to something. The no-strict-aliasing is suspiciously missing.
The documentation I have on gcc 4.3.4 indicates that optimization
levels O2 and O3 turn on strict-aliasing. Therefore if no-strict-
aliasing is needed to built sage spkg then this may be the problem.
But why for amd64 only?

Steve

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to