This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Bad patch: "[Patch,ld] Support cflags, ldflags from board description file in ld tests"


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 
purpose.

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.

VP.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]