On Jan 19, 1:50 am, William Stein <wst...@gmail.com> wrote:
> On Mon, Jan 18, 2010 at 4:15 PM, Dr. David Kirkby

> > I should have made it clearer, that it will need to be:
>
> > CFLAGS=$SAGE_COMMON_CFLAGS
> > CXXFLAGS=$SAGE_COMMON_CXXFLAGS
> > FCFLAGS=$SAGE_COMMON_FCFLAGS
>
> > since the options may be different for different for the C/C++/Fortran
> > compilers. I know the Sun C++ compiler will need an option which the C or
> > Fortran compilers would not use.
>
> This should be a single function that is called by spkg-install and
> put in some script, e.g.,
> users put this in spkg-install:
>
>     sage_set_cflags()
>
> and the above gets set.
>
> Any time you ever consider putting more than one line of code in a
> bunch of spkg-install files, don't.
>
> William

OK, that make sence, IF its possible to do. I'm not exactly sure if it
will be though,, as that approach MAY end up setting the CFLAGS
globally again, which we know causes problems.  Have you any thoughts
on this? The best way is to try of course, but I'm not conffident this
will work.

Perhaps a better name will be sage_set_compiler_flags(), since it will
set CFLAGS, CXXFLAGS and FCFLAGS.

I'm never quite sure what to do about linker flags on 64-bit builds.
Many .spkg files set LDFLAGS=-m64 on 64-bit builds
e.g.

 * freetype-2.3.5.p2
 * ecl-9.10.2-20091105cvs.p1 (ECL fails to build properly if LDFLAGS
is not set to -m64)

 but many .spkg files do not set LDFLAGS on 64-bit builds

e.g.
 * sqlite-3.6.19.p0
 * libm4ri-20091120.p0

>From what I have read of the GNU linker documentation on the linker
'ld'

http://sourceware.org/binutils/docs-2.20/ld/Options.html#Options

there is no such flag as -m64. So I can't understand how it works.
(There is an opton -64 on the Sun linker, but it rarely needed).

Can you explain this?

Dave

-- 
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