This is the mail archive of the
mailing list for the binutils project.
Re: Bad patch: "[Patch,ld] Support cflags, ldflags from board description file in ld tests"
- From: Vidya Praveen <vidyapraveen at arm dot com>
- To: Hans-Peter Nilsson <hp at bitrange dot com>
- Cc: "binutils at sourceware dot org" <binutils at sourceware dot org>, "nickc at redhat dot com" <nickc at redhat dot com>
- Date: Thu, 9 Jan 2014 11:03:43 +0000
- Subject: Re: Bad patch: "[Patch,ld] Support cflags, ldflags from board description file in ld tests"
- Authentication-results: sourceware.org; auth=none
- References: <alpine dot BSF dot 2 dot 02 dot 1312281101190 dot 66226 at arjuna dot pair dot com> <alpine dot BSF dot 2 dot 02 dot 1312281116130 dot 66226 at arjuna dot pair dot com> <alpine dot BSF dot 2 dot 02 dot 1401081652140 dot 4039 at arjuna dot pair dot com>
On Wed, Jan 08, 2014 at 09:53:39PM +0000, Hans-Peter Nilsson wrote:
> > Running /home/hp/binutils/src/ld/testsuite/ld-scripts/sizeof.exp ...
> > FAIL: SIZEOF
> > The cause is this change (3046b3d35684f30a0a0dfe88766b38b3fc578c6c);
> > see <http://sourceware.org/ml/binutils/2013-12/msg00131.html>.
> > ld/testsuite:
> > * lib/ld-lib.exp (default_ld_link): Use ldflags from board description
> > file.
> > (default_ld_simple_link): Likewise.
> > (default_ld_compile): Use cflags from board description
> > The ldflags part is wrong. The options in board_info ldflags
> > are *compiler* options to be used at link time, and the linker
> > correctly balked at a "-Wl," prefix. See the documentation in
> > the dejagnu info files (6.5 Board Config File Values: "ldflags"
> > ... "Linking flags for the compiler"). This meaning has not
> > changed in some ten years; verified with a fresh pull of the
> > dejagnu git.
> > I think the parts of the patch that use ldflags should be
> > reverted. (I hope nobody thinks we should scrub the "-Wl," as
> > that'd be a gross hack failing for all other compiler link-time
> > flags which don't happen to be also be bare linker flags.)
> > If your setup depends on board_info ldflags being interpreted as
> > actual bare linker flags (admittedly an intuitive interpretation
> > which I guess fooled Nick), you need to change something else.
> > Perhaps your local board files needs those changes. I didn't
> > see anything in the dejagnu arm-related board files on its
> > master branch; quite the contrary, as ARM PE targets would fail
> > similar to the above.
Sorry, I missed the previous email.
Yes, I went by treating ldflags as bare linker flags which apparently is wrong.
We should probably have a different variable for holding the flags for this
I'll start a separate thread to discuss this. Meanwhile, I can send a patch to
remove the ldflags support, if you haven't done it already.