* [gentoo-user] Is ABI a portage variable?
@ 2018-02-15 0:10 Ian Zimmerman
2018-02-16 16:14 ` Mike Gilbert
0 siblings, 1 reply; 3+ messages in thread
From: Ian Zimmerman @ 2018-02-15 0:10 UTC (permalink / raw
To: gentoo-user
I am trying to package software whose build process (autotools based)
depends on a variable "ABI" to determine (on x86 and amd64 arch at least)
whether to build as 64 bit or 32 bit. If it is not set externally, the
configure script sets it by inspecting the native pointer size of the C
compiler, to either "64" or "32".
Naturally, I thought the cleanest way for a package was to leave it
unset and let configure choose the native value. But somehow it ends up
with a setting "amd64" and then complains that it is not one of the
expected values. I am stuck determining where that value comes from.
Is it portage? If so, how to change or disable it? Is it safe to just
do the following?
ABI='' ./configure
--
Please don't Cc: me privately on mailing lists and Usenet,
if you also post the followup to the list or newsgroup.
To reply privately _only_ on Usenet and on broken lists
which rewrite From, fetch the TXT record for no-use.mooo.com.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [gentoo-user] Is ABI a portage variable?
2018-02-15 0:10 [gentoo-user] Is ABI a portage variable? Ian Zimmerman
@ 2018-02-16 16:14 ` Mike Gilbert
2018-02-16 19:57 ` [gentoo-user] " Ian Zimmerman
0 siblings, 1 reply; 3+ messages in thread
From: Mike Gilbert @ 2018-02-16 16:14 UTC (permalink / raw
To: gentoo-user
On Wed, Feb 14, 2018 at 7:10 PM, Ian Zimmerman <itz@very.loosely.org> wrote:
> I am trying to package software whose build process (autotools based)
> depends on a variable "ABI" to determine (on x86 and amd64 arch at least)
> whether to build as 64 bit or 32 bit. If it is not set externally, the
> configure script sets it by inspecting the native pointer size of the C
> compiler, to either "64" or "32".
>
> Naturally, I thought the cleanest way for a package was to leave it
> unset and let configure choose the native value. But somehow it ends up
> with a setting "amd64" and then complains that it is not one of the
> expected values. I am stuck determining where that value comes from.
> Is it portage? If so, how to change or disable it? Is it safe to just
> do the following?
>
> ABI='' ./configure
ABI is a profile variable. On an amd64 system it is defined in
profiles/arch/amd64/make.defaults.
The ABI variable is used by functions in multilib.eclass,
toolchain-funcs.eclass, and the econf function to determine the
correct libdir (lib, lib32, lib64, etc).
For an autotools build, you will probably want to call the econf
function, so unsetting ABI is a bad idea. Instead, you probably want
to "unexport" it (export -n). This will allow econf to see it, but the
value will not be inherited by configure.
src_configure() {
export -n ABI
econf
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* [gentoo-user] Re: Is ABI a portage variable?
2018-02-16 16:14 ` Mike Gilbert
@ 2018-02-16 19:57 ` Ian Zimmerman
0 siblings, 0 replies; 3+ messages in thread
From: Ian Zimmerman @ 2018-02-16 19:57 UTC (permalink / raw
To: gentoo-user
On 2018-02-16 11:14, Mike Gilbert wrote:
> ABI is a profile variable. On an amd64 system it is defined in
> profiles/arch/amd64/make.defaults.
>
> The ABI variable is used by functions in multilib.eclass,
> toolchain-funcs.eclass, and the econf function to determine the
> correct libdir (lib, lib32, lib64, etc).
>
> For an autotools build, you will probably want to call the econf
> function, so unsetting ABI is a bad idea. Instead, you probably want
> to "unexport" it (export -n). This will allow econf to see it, but the
> value will not be inherited by configure.
>
> src_configure() {
> export -n ABI
> econf
> }
Thanks for this thorough and relevant answer.
--
Please don't Cc: me privately on mailing lists and Usenet,
if you also post the followup to the list or newsgroup.
To reply privately _only_ on Usenet and on broken lists
which rewrite From, fetch the TXT record for no-use.mooo.com.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-02-16 19:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-15 0:10 [gentoo-user] Is ABI a portage variable? Ian Zimmerman
2018-02-16 16:14 ` Mike Gilbert
2018-02-16 19:57 ` [gentoo-user] " Ian Zimmerman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox