failed check: gmp 32 bit build under solaris 10
jay.krell at cornell.edu
Tue Nov 23 12:10:47 CET 2010
> (Does Sun's cc actually admit the -m32 flag? They used to ask for some
> very different flags, something zany like "-xarch=v8plus" for v9
> processors using the 32-bit ABI.)
Here's our autoconf-like code to pick flags for Sun cc.
It's in a language you've never seen and will never use but you can still figure it out.
This is meant to handle all of sparc32/sparc64/x86/amd64.
% newer compiler says:
% cc: Warning: -xarch=v8plus is deprecated, use -m32 -xarch=sparc instead
% cc: Warning: -xarch=v9 is deprecated, use -m64 to create 64-bit programs
% cc: Warning: -xarch=amd64 is deprecated, use -m64 to create 64-bit programs
% cc: Warning: -xarch=generic64 is deprecated, use -m64 to create 64-bit programs
% Probe for this and if found, use what it recommends.
% We presumably can't just always use the new syntax, in case
% we are using older tools that don't understand it.
local cc = "/usr/bin/cc -g -mt -xldscope=symbolic "
local old = "-xarch=" & SunXArch
local new = "-m" & WordSize
if equal(WORD_SIZE, "32BITS") and not equal(TARGET, "I386_SOLARIS")
new = new & " -xarch=sparc"
if equal(try_exec("@" & cc & old & " 2>&1 | fgrep \" " & new & " \" > /dev/null"), 0)
cc = cc & new
cc = cc & old
if equal(TARGET, "I386_SOLARIS") or equal(TARGET, "AMD64_SOLARIS")
SYSTEM_CC = cc & " -xF -Kpic"
SYSTEM_CC = cc & " -xF -xcode=pic32" % pic13 if not many external references
SunXArch is set before it runs, as follows:
jbook2:src jay$ grep SunXArch /dev2/cm3/m3-sys/cminstall/src/config-no-install/*
/dev2/cm3/m3-sys/cminstall/src/config-no-install/AMD64_SOLARIS:SunXArch = "generic64" % or amd64, equivalent?
/dev2/cm3/m3-sys/cminstall/src/config-no-install/I386_SOLARIS:SunXArch = "pentium_pro"
/dev2/cm3/m3-sys/cminstall/src/config-no-install/SPARC32_SOLARIS.common:SunXArch = "v8plus"
/dev2/cm3/m3-sys/cminstall/src/config-no-install/SPARC64_SOLARIS:SunXArch = "generic64" % or v9, equivalent?
/dev2/cm3/m3-sys/cminstall/src/config-no-install/Solaris.common: local old = "-xarch=" & SunXArch
This sort of deprecation bugs me.
Our command lines worked fine, and continue to do, with old and new compilers.
But now we get a warning.
I understand -m32/-m64 might be more readable.
But I also think they are too vague.
If I'm going to get specific like that, I should say -mx86 or -msparc32 or -mamd64 or -msparc64 or -mi686-linux or -target=amd64-solaris etc.
v8plus I think we needed to enable the various atomic instructions.
"32bit but with fairly new instructions, such as perhaps are available to 32bit code on 64bit processors??"
More information about the gmp-bugs