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"


No feedback from the ARM people?  Presumably I should just cook
up a patch to remove the ldflags use.

On Sat, 28 Dec 2013, Hans-Peter Nilsson wrote:

> On Sat, 28 Dec 2013, Hans-Peter Nilsson wrote:
> > This should bring binutils autotester results back to zero failures
> > for mmix-knuth-mmixware.
> >
> > (There are FAILs common with other targets on one host; I
> > suspect local changes or too-old expect.
>
> No, it was due to linking with the *correct* dejagnu board file
> thus getting "-Wl,--defsym,__Stack_start=0x1680a00000000000" in
> board_info ldflags.
>
> The failures look like this:
> Running /home/hp/binutils/src/ld/testsuite/ld-checks/checks.exp ...
> FAIL: check sections 1
> (...)
> Running /home/hp/binutils/src/ld/testsuite/ld-libs/libs.exp ...
> FAIL: -l: test (preparation)
> FAIL: -l: test
> (...)
> Running /home/hp/binutils/src/ld/testsuite/ld-scripts/align.exp ...
> FAIL: align1
> (...)
> Running /home/hp/binutils/src/ld/testsuite/ld-scripts/assert.exp ...
> FAIL: ASSERT
> (...)
> Running /home/hp/binutils/src/ld/testsuite/ld-scripts/defined.exp ...
> FAIL: DEFINED (PRMS 5699)
> (...)
> Running /home/hp/binutils/src/ld/testsuite/ld-scripts/extern.exp ...
> FAIL: EXTERN
> ERROR: tmpdir/extern: nm failed
> (...)
> Running /home/hp/binutils/src/ld/testsuite/ld-scripts/log2.exp ...
> FAIL: binary logarithm
> Running /home/hp/binutils/src/ld/testsuite/ld-scripts/map-address.exp ...
> FAIL: map addresses
> (...)
> Running /home/hp/binutils/src/ld/testsuite/ld-scripts/script.exp ...
> FAIL: script
> FAIL: MRI script
> FAIL: MEMORY
> (...)
> 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.
>
> brgds, H-P
>


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