Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 360197 - set SYMLINK_LIB=yes in prefix/linux/profile.bashrc for sys-devel/binutils for target having /lib32
Summary: set SYMLINK_LIB=yes in prefix/linux/profile.bashrc for sys-devel/binutils for...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Prefix
URL: http://overlays.gentoo.org/proj/alt/c...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-23 21:44 UTC by Michael Haubenwallner (RETIRED)
Modified: 2011-03-29 20:31 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Haubenwallner (RETIRED) gentoo-dev 2011-03-23 21:44:44 UTC
While we do not /do/ multilib in Prefix at all, we still have to deal with various multilib layouts eventually found on the host OS.

For example, we do use plain 32bit x86-linux prefix-profiles on top of amd64-multilib (Gentoo) Linux, where even the pure 32bit linker has to search for a /lib32 host directory. This is done by an extra patch[1] in addition to "65_all_binutils-*-amd64-32bit-path.patch".

But recently, the latter isn't applied for prefix profiles any more[2], and the extra patch fails (bug#359887).

Please review this change for inclusion into gx86, and the extra patch[1] for inclusion into the binutils patchsets (merge with amd64-32bit-path.patch):

--- toolchain-binutils.eclass
+++ toolchain-binutils.eclass
@@ -118,6 +118,8 @@
 
     if ! use vanilla ; then
         EPATCH_EXCLUDE=
+        # prefix does not do SYMLINK_LIB, but may run on such host
+        ! use prefix &&
         [[ ${SYMLINK_LIB} != "yes" ]] && EPATCH_EXCLUDE+=" 65_all_binutils-*-amd64-32bit-path.patch"
         if [[ -n ${PATCHVER} ]] ; then
             EPATCH_SOURCE=${WORKDIR}/patch

[1] http://overlays.gentoo.org/proj/alt/browser/trunk/prefix-overlay/sys-devel/binutils/files/binutils-2.20.51.0.1-linux-x86-on-amd64.patch?rev=51324
[2] http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/eclass/toolchain-binutils.eclass?r1=1.97&r2=1.98

Thank you!
Comment 1 SpanKY gentoo-dev 2011-03-23 21:58:55 UTC
i dont think adding a USE=prefix hack is the way to go
Comment 2 SpanKY gentoo-dev 2011-03-24 08:25:18 UTC
you could make this work right now with per-package env ...

echo SYMLINK_LIB=yes > /etc/portage/env/sys-devel/binutils
Comment 3 Michael Haubenwallner (RETIRED) gentoo-dev 2011-03-24 15:09:28 UTC
(In reply to comment #2)
> you could make this work right now with per-package env ...
> 
> echo SYMLINK_LIB=yes > /etc/portage/env/sys-devel/binutils

This isn't a problem for /one/ particular prefix-installation, but for any installation using prefix/linux/{x86,amd64}/ profile. So I'm in need for a solution (at least within these profiles) within portage-tree.

These two come to my mind for where to set this env:
*) profile.bashrc
*) binutils.ebuild

But both look more hackish to me than within the eclass...
Comment 4 SpanKY gentoo-dev 2011-03-24 17:29:37 UTC
lib32 is a transitional name.  its usage is discouraged, so anything bypassing this discouragement is itself discouraged.

i would prefer a profile.bashrc solution as there you can dynamically detect if the host a legacy lib32 install and enable SYMLINK_LIB for binutils-only in that case.
Comment 5 Michael Haubenwallner (RETIRED) gentoo-dev 2011-03-28 14:25:38 UTC
sounds reasonable
Comment 6 Michael Haubenwallner (RETIRED) gentoo-dev 2011-03-29 20:31:06 UTC
Fixed:
 +gentoo-x86/profiles/prefix/linux/x86/profile.bashrc
 prefix-overlay/eclass/toolchain-binutils.eclass@59417
 prefix-overlay/sys-devel/binutils/binutils-2.21.51.0.6.ebuild@59418

The linux-x86-on-amd64 patches are applied in Prefix (linux/x86 profile) now only when /lib32 is (a symlink to) an existing directory (ROOT-based).