ultrasparc3 builds, solaris 10

Bill Clarke llib at computer.org
Thu Jun 9 06:47:14 CEST 2005


[resending to gmp-bugs at swox.org; does bug-gmp at gnu.org work?
as referred to at http://swox.com/gmp/manual/Reporting-Bugs.html]

this is with gmp 4.1.4, built with gcc 3.4.4, on an ultrasparc3cu
solaris 10 system.

building for a host of ultrasparc3-*-* should provide more opportunities
for optimisation to the compiler, if given the right flags (particularly
instruction grouping).
gcc 3.4.4 and gcc 4.0.0 now recognise -mcpu=ultrasparc3 (as opposed to
-mcpu-ultrasparc) and optimise accordingly.
however, i do not know if this will give better performance.
i'd be happy to check, given a suitable benchmark.

also, you could use -xarch=v8plusa [ultrasparc and above] or v8plusb
[ultrasparc3 and above only] as well, although this is unlikely to
generate better code unless you write assembler that uses the
ultrasparc-specific instructions (mostly VIS instruction set).

(sun cc is okay since configure sets -xarch=native)

-

ABI=64 on solaris 10 doesn't configure, since the case statement checks
only up to solaris9.  this means it defaults to 32-bit ABI build (i.e.,
without ABI=blah).
to fix, change:
          *-*-solaris2.[7-9])
to:
          *-*-solaris2.[7-9] | *-*-solaris2.10)
(line 892 of configure.in)

-

another thing to possibly add to the documentation is how to install
multiple architecture builds easily, although i note the (all too brief)
mention of this in the ABI and ISA section.
in sparc-solaris, 64-bit libraries often go in a lib/64 or lib/sparcv9
directory.
so i did this:
$ ../gmp-4.1.4/configure ABI=64 --prefix=$HOME/gmp-4.1.4
--libdir=$HOME/gmp-4.1.4/lib/sparcv9
--includedir=$HOME/gmp-4.1.4/include/sparcv9

unfortunately the includedir did not have the desired effect: the gmp.h
was placed in ${prefix}/include, and _then_ the include/sparcv9
directory was created!

this is a problem, since gmp.h is different for different ABIs.  this is
rather annoying.

in fact, i think it is a bug to have different include files for
different ABIs.  the include file should be able to tell which ABI it is
and set values accordingly.  however, doing this portably on different
platforms is non-trivial.  i could easily set one up for sparc32/sparc64.

-

(with the above configure patch) i have built and tested both 32-bit and
64-bit builds.  all okay.

cheers,
/lib
-- 
/lib BillClarke PostdoctoralFellow CompSci ANU cs.anu.edu.au/CC-NUMA
http://llib.cjb.net llib at computer.org  tel:+61-2-6125x5687 fax:x0010
PGPid:B381EE7DB7D3E58F17248C672E2DA124ADADF444 GNU unix LaTeX XPilot
Buffy DrWho Goodies StarTrek XFiles Origami SML SMP MPI mozilla tcsh
Asimov Bear Clarke Donaldson Volleyball Ultimate Cricket emacs C++ X
Jordan Kay Lackey Martin Stasheff DeepPurple H&C KLF Queen PinkFloyd



More information about the gmp-bugs mailing list