This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] PR gold/20310: Pass down LDFLAGS from top level for "make check"
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Cary Coutant <ccoutant at gmail dot com>
- Cc: Binutils <binutils at sourceware dot org>
- Date: Wed, 29 Jun 2016 19:22:58 -0700
- Subject: Re: [PATCH] PR gold/20310: Pass down LDFLAGS from top level for "make check"
- Authentication-results: sourceware.org; auth=none
- References: <20160629161314 dot GA25082 at intel dot com> <CAJimCsHGiRhadOsDdBvU=YnrW-QJXHCg81UQZq71gh3GZYm92w at mail dot gmail dot com>
On Wed, Jun 29, 2016 at 5:30 PM, Cary Coutant <ccoutant@gmail.com> wrote:
>> Pass down "-static-libstdc++ -static-libgcc" in LDFLAGS from the top
>> level Makefile. Otherwise, LDFLAGS will be empty for "make check",
>> which may lead to
>>
>> FAIL: dynamic_list.sh
>> FAIL: plugin_layout_with_alignment.sh
>>
>> on Fedora 24. OK for trunk?
>>
>>
>> H.J.
>> ---
>> PR gold/20310
>> * Makefile.am (AM_MAKEFLAGS): New.
>> * Makefile.in: Regenerated.
>
> More info needed.
>
> (a) Please don't make the comments more specific than what you're
> actually doing -- the change is much broader than just passing
> "--static-libstdc++ --static-libgcc" in LDFLAGS, and much broader than
> just fixing two random failures. Just say "Pass LDFLAGS through to
> nested makes." (If you must, the comment can refer to the PR for more
> info.)
>
> (b) Why is this needed anyway? Where does the LDFLAGS setting come
> from in Fedora? That's supposed to be a user variable, not something
> that the system uses for essential options. Are you claiming that
> Fedora 24 can't build anything without these options in LDFLAGS? If
> so, that's insane. At the very least, they should be passing the
> options by default through gcc (which started happening with Ubuntu
> quite a while ago, I think -- we even have a kludge in
> testsuite/Makefile.am to remove those options for the tests that are
> known not to work with them).
>
> (c) Generally, if an individual test requires a certain option on or
> off, we make sure it's set or cleared when building/running the test.
> Why do these two tests require these options? And what is different
> about Fedora 24 to make this so?
>
> (d) The testsuite should be testing combinations of options other than
> those used to build gold, so I'm not sure passing LDFLAGS on down to
> the testsuite is the right thing to do. I think we're actually already
> inheriting too many options from the configure settings.
>
These 2 tests are sensitive to compiler version. They pass with GCC
prior to GCC 6 with and without -static-libstdc++ -static-libgcc. With
GCC 6, which is in Fedora 24, they fail on i686 (2 failures) and x86-64
(1 failure).
BTW, if you run "make check" under gold, you always get LDLFAGS
with -static-libstdc++ -static-libgcc. LDFLAGS is empty only when
you run "make check" at top level. It took me a while to figure it out.
--
H.J.