automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

32-bit/64-bit builds on Solaris


From: Monty Taylor
Subject: 32-bit/64-bit builds on Solaris
Date: Sat, 18 Apr 2009 10:21:26 -0700
User-agent: Thunderbird 2.0.0.21 (X11/20090409)

Hey all,

I'm wondering if there is either an autotools feature I don't know about
or a best practice, because what I'm doing right now feels dirty.

Solaris on Sparc supports both 32 and 64 bit binaries, with builds
defaulting to 32-bit. (Thanks backwards compatibility for proprietary
software!) By convention, packages that are going to install libs
install 32-bit libs into ${libdir}/32 and 64-bit libs into ${libdir}/64.
(Actually, 64 is a link to sparcv9... so there is even some confusion on
this point)

In a wonderful fit of horribleness, neither GCC nor Sun Studio know
about this arrangement, so if you want to link against 64-bit libs, you
have to explicitly add a bunch of -L/usr/lib/64 to your flags.

For my project specifically, I know there is almost never a reason
someone would want 32-bit binaries, so I'm hardcoding some autoconf to
set -m64 and add a bunch of crap to the libpath if it detects sparc, but
this seems wrong.

Is there a "better" way to deal with this, so that a person running
configure could specify that they do, in fact, want to build 32-bit
stuff, but also that I can specify in configure that I want to default
to 64-bit? Is there a better way to get the suffixes on libpaths? Or am
I doing pretty much what needs to be done?

In case anyone wants to look at the carnage:

http://bazaar.launchpad.net/~drizzle-developers/drizzle/development/annotate/head%3A/configure.ac

Thanks guys!
Monty




reply via email to

[Prev in Thread] Current Thread [Next in Thread]