CC_FOR_TARGET in libctf Makefile
Nick Alcock
nick.alcock@oracle.com
Fri Feb 19 13:52:16 GMT 2021
On 19 Feb 2021, Alan Modra outgrape:
> Nick,
> What is CC_FOR_TARGET doing in the libctf Makefile? That seems wrong
> to me. You aren't building or testing libctf for the target. You are
> building it for the host!
Ugh yes that's completely true. I mixed up host and target when figuring
out what I needed to build and run the lookup tests. The lookup tests
rely on compiling (and linking) test "input" programs for the target and
running the lookup program on them, but the lookup program is still a
host program and run on the host.
> I see this in my build dir libctf Makefile
> on x86_64:
>
> CC_FOR_TARGET = ` \
> ...
> if [ "x86_64-pc-linux-gnu" = "@target@" ] ; then \
Well, we do need potentially two C compilers -- the build compiler (to
compile the actual things we're testing for the host) and the host
compiler (in non-ctf-writable/ tests, to compile programs containing CTF
for the target, though we only peek inside them with the lookup
programs, we don't run them.)
I thought CC_FOR_TARGET was the way to get the latter of these. Was I
wrong?
> So no substitution of @target@ due to lack of AC_CANONICAL_TARGET in
> the libctf configure.ac. That's not to say I think you should add
> AC_CANONICAL_TARGET, I think CC_FOR_TARGET should disappear.
Not so sure about that, though you're right I need to do *something*.
--
NULL && (void)
More information about the Binutils
mailing list