Summary: | =dev-libs/libatomic_ops-1.2-r1 calls AR directly | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Vicente Olivert Riera (RETIRED) <vincent> |
Component: | Current packages | Assignee: | Gentoo Sound Team <sound> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | c1pher |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: | https://bugs.gentoo.org/show_bug.cgi?id=440274 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 243502 | ||
Attachments: | Fix for AR |
Description
Vicente Olivert Riera (RETIRED)
2012-10-14 12:37:20 UTC
ar and ranlib are propably the only two ones not causing problems with cross-compiling despite not being linked with the chost can you provide an example where this is an actual problem, and not just cosmetics? (In reply to comment #1) > ar and ranlib are propably the only two ones not causing problems with > cross-compiling despite not being linked with the chost > > can you provide an example where this is an actual problem, and not just > cosmetics? Hello Samuli, yes, I can provide an example about why it's better to use the AR enviroment variable instead of calling ranlib directly. This is Gentoo, and it's known that Gentoo is one of the most flexible operative systems. So..., as a Gentoo user, I'd like to have the flexibility (or freedom) to use a different version of ar, or maybe a modified version of ar. So, I want to have the possiblity to keep the ar version installed by sys-devel/binutils, stored in /usr/bin/ar, and my custom version of ar, stored in /usr/local/bin/my_custom_ar. If you let the ebuilds to call ar directly, my custom version will be never used. But, if you use the AR environment variable, I can easily edit the file /etc/env.d/04gcc-x86_64-pc-linux-gnu and add a line like this: AR="/usr/local/bin/my_custom_ar" ...and my custom version of ar will be used. Same if I want to use a custom version of ranlib, or a different compiler... Created attachment 326800 [details, diff]
Fix for AR
Fix for 1.2-r1.
It doesn't appear to still be a problem in 7.2d. I don't know what the current status of libatomic_ops is, so I don't know if this is worth fixing now or if it would be easier to just wait for the next stable version. Any input?
and you are aware that autotools always hardcodes ar and ranlib, despite of setting AR or RANLIB? that's at least what used to happen, unless something have changed since. (In reply to comment #4) > and you are aware that autotools always hardcodes ar and ranlib, despite of > setting AR or RANLIB? I think that should not be allowed in Gentoo. What's your opinion? (In reply to comment #4) > and you are aware that autotools always hardcodes ar and ranlib, despite of > setting AR or RANLIB? > > that's at least what used to happen, unless something have changed since. As I said in 440274: If Autotools is a crap, we are not forced to follow it. The ebuild should respect the _SYSTEM_ AR, so the bug is valid. (In reply to comment #6) > (In reply to comment #4) > > and you are aware that autotools always hardcodes ar and ranlib, despite of > > setting AR or RANLIB? > > > > that's at least what used to happen, unless something have changed since. > > As I said in 440274: > > If Autotools is a crap, we are not forced to follow it. > > The ebuild should respect the _SYSTEM_ AR, so the bug is valid. why? I see no reason to do so. cross-compiling works fine with the `ar`. besides, half of the packages in tree use autotools, so that's a logical directive to follow. AR on Makefile only based build systems also includes the flags for it, there is no standard like 'ARFLAGS' actually, taking this back, later automake is actually respecting ARFLAGS unlike previous versions... /usr/bin/automake-1.12: &define_variable ('ARFLAGS', 'cru', INTERNAL); ar/ranlib are not portable formats, so yes, we need to execute the target variant. most people won't notice as they don't cross-compile between different operating systems. so this is actuallly an autotools bug? (In reply to comment #10) if you're creating libs, then you use libtool, and that handles ar/ranlib correctly. automake seems a little wonky, but i'd have to poke more to see what it's doing exactly. i think this is an uncommon case for projects to hit. this is fixed in libatomic-7.2d |