Gentoo Archives: gentoo-user

From: Mike Gilbert <floppym@g.o>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Is ABI a portage variable?
Date: Fri, 16 Feb 2018 16:15:21
Message-Id: CAJ0EP43eR2f=ECBrf568NTcDs3X_P6_U688uDBAYRx-XBg-tRw@mail.gmail.com
In Reply to: [gentoo-user] Is ABI a portage variable? by Ian Zimmerman
1 On Wed, Feb 14, 2018 at 7:10 PM, Ian Zimmerman <itz@××××××××××××.org> wrote:
2 > I am trying to package software whose build process (autotools based)
3 > depends on a variable "ABI" to determine (on x86 and amd64 arch at least)
4 > whether to build as 64 bit or 32 bit. If it is not set externally, the
5 > configure script sets it by inspecting the native pointer size of the C
6 > compiler, to either "64" or "32".
7 >
8 > Naturally, I thought the cleanest way for a package was to leave it
9 > unset and let configure choose the native value. But somehow it ends up
10 > with a setting "amd64" and then complains that it is not one of the
11 > expected values. I am stuck determining where that value comes from.
12 > Is it portage? If so, how to change or disable it? Is it safe to just
13 > do the following?
14 >
15 > ABI='' ./configure
16
17 ABI is a profile variable. On an amd64 system it is defined in
18 profiles/arch/amd64/make.defaults.
19
20 The ABI variable is used by functions in multilib.eclass,
21 toolchain-funcs.eclass, and the econf function to determine the
22 correct libdir (lib, lib32, lib64, etc).
23
24 For an autotools build, you will probably want to call the econf
25 function, so unsetting ABI is a bad idea. Instead, you probably want
26 to "unexport" it (export -n). This will allow econf to see it, but the
27 value will not be inherited by configure.
28
29 src_configure() {
30 export -n ABI
31 econf
32 }

Replies

Subject Author
[gentoo-user] Re: Is ABI a portage variable? Ian Zimmerman <itz@××××××××××××.org>