Subject: bug#42675: Solaris 11.3 x86_64 support

From: Jeffrey Walton <[email-masked]>
Date: Sun, 2 Aug 2020 11:12:02 -0400

On Sun, Aug 2, 2020 at 10:18 AM Andreas Schwab <[email-masked]> wrote:
>
> On Aug 02 2020, Jeffrey Walton wrote:
>
> > I'm building on Solaris 11.3 using x86_64 per [1]. I use
> > '--build=x86_64-sun-solaris'
>
> You need to specify the exact solaris version you are building for.

Thanks Andreas.

I don't think that's the case. The Autotools docs say the triplet is
cpu-vendor-os. They don't say anything about a version number.[1]
There is no "solaris2" os. It is called 'Solaris'. Because of
Autotools name mangling a configure typically matches it to
'solaris*'.

[1] https://www.gnu.org/software/autoconf/manual/autoconf-2.65/html_node/Specifying-Target-Triplets.html

> > because Autoguess chooses 32-bit instead
> > of 64-bit (even with CFLAGS and CXXFLAGS including -m64).
>
> If you add -m64 to CC, not CFLAGS, then config.guess should do the right
> thing.

If I add -m64 to the compiler, then it breaks other packages. I don't
think that is fair to other packages that do things as expected.

But stepping back, there is no need to guess. I told the system what
to use in the --build.

Of the 100+ packages I build regularly, only Emacs has this problem.
I'm pretty sure the Emacs configure script is the problem in this
case.

The user's job is to set the environment. If I don't set the
environment properly then that's my fault and the configure script
should die. The flip side of that is, stop being clever in the script.
Just do what you are told and things will work well.

Jeff