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: Hans-Peter Nilsson <hp at bitrange dot com>
- To: binutils at sourceware dot org
- Cc: vidyapraveen at arm dot com, Nick Clifton <nickc at redhat dot com>
- Date: Wed, 8 Jan 2014 16:53:39 -0500 (EST)
- 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>
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>.
> * lib/ld-lib.exp (default_ld_link): Use ldflags from board description
> (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