#6399: [with patch, needs review] Allow ATLAS to build on Solaris with Sun or
GNU
linker
----------------------+-----------------------------------------------------
Reporter: drkirkby | Owner: tbd
Type: defect | Status: new
Priority: major | Milestone: sage-4.1
Component: solaris | Keywords: solaris atlas GNUism
Reviewer: | Author:
Merged: |
----------------------+-----------------------------------------------------
ATLAS will currently not build on Solaris if the linker is the Sun linker
in /usr/ccs/bin, as the flags in the Makefile used for building shared
libraries are GNU-specific.
This patch uses 'sed' to change the flags in the Makefile. The flags
charged are:
{{{
-shared ==> -G
-soname ==> -h
--whole-archive ==> -z allextract
--no-whole-archive ==> -z defaultextract
}}}
Tests are performed on both the operating system and linker. The Makefile
is only changed if both the OS is Solaris and the linker is not the GNU
linker. (It's pretty safe to assume the Sun linker is used, if the linker
is not the GNU one). The changes are to the file are in the file 'spkg-
install-script' and essentially consist of:
{{{
if [ `uname` = "SunOS" ]; then
if [ "`ld --version 2>&1 | grep GNU`" = "" ]; then
echo "The Makefile generated in ATLAS for building shared
libraries"
echo "assumes the linker is the GNU linker, which it not true
in"
echo "your setup. (It is generally considered better to use
the"
echo "Sun linker in /usr/ccs/bin rather than the GNU linker
from binutils)"
echo "The linker flags in `pwd`/Makefile will be changed. "
echo "'-shared' will be changed to '-G'"
echo "'-soname' will be changed to '-h'"
echo "'--whole-archive' will be changed to '-zallextract'"
echo "'--no-whole-archive' will be changed to
'-zdefaultextract'"
echo "A copy of the original Makefile will be copied to
Makefile.orig"
cp Makefile Makefile.orig
sed 's/-shared/-G/g' Makefile > makefile
sed 's/-soname/-h/g' makefile > Makefile
sed 's/--whole-archive/-z allextract/g' Makefile > makefile
sed 's/--no-whole-archive/-z defaultextract/g' makefile >
Makefile
rm makefile
else
echo "WARNING You are using the GNU linker from 'binutils'"
echo "Generally it is considered better to use the Sun
linker"
echo "but Sage has been built on Solaris using the GNU
linker"
fi
fi
}}}
Patch is at.
http://sage.math.washington.edu/home/kirkby/Solaris-fixes/atlas/
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/6399>
Sage <http://sagemath.org/>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---