pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: GCC and as
On 06/01/18 03:24, maya%netbsd.org@localhost wrote:
Explanations are good, so here is one:
configure/make etc are called with a PATH including cwrappers.
so "gcc" is cc-wrapper.
GCC (via cc-wrapper) gets called with a PATH that does not
include wrappers, and then it chooses to execute 'ld', which
is /usr/bin/ld for this reduced PATH case.
ld-wrapper is never called.
if I make it not modify PATH, then it executes ld-wrapper, which
executes "ld", which is the ld wrapper (infinite loop).
so I configure the ld-wrapper to invoke the full path of ld to overcome
this.
Thanks for your work on this!
I'm not 100% clear how it fits into the solution, though. It appears
that your aim is to make gcc use as and ld from pkgsrc binutils if they
are present, correct?
That by itself doesn't fully address the problem, though.
What we're looking into now is how a gcc package should decide when it's
necessary to install binutils as a dependency. It is certainly
necessary now for RHEL/CentOS 6 and likely will be in the future for
RHEL/CentOS 7, whose binutils will never be upgraded to a newer version
(although it will get bug fixes and security patches).
OS_VARIANT-specific patches have some drawbacks, though. The other
option is checking the version of the "base" binutils, which is a bit
complicated to support across many platforms, as they may install it in
different locations. I'm hoping to finish exploring this shortly.
FYI, the gcc packages already contain logic to use pkgsrc binutils when
necessary.
This is the gcc5 patch I've tested successfully:
.if ${OS_VARIANT} == "redhat"
CONFIGURE_ARGS+= --with-gnu-as --with-as=${PREFIX}/bin/gas
CONFIGURE_ARGS+= --with-gnu-ld --with-ld=${PREFIX}/bin/gld
. include "../../devel/binutils/buildlink3.mk"
BUILDLINK_DEPMETHOD.binutils= full
.endif
If I'm interpreting your patch correctly, it would be an alternative to
the CONFIGURE_ARGS portion of this. Is that correct?
Home |
Main Index |
Thread Index |
Old Index