This is the mail archive of the binutils@sources.redhat.com 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]

Use of set_board_info ldscript


Since C++ test can get pretty big, I've added a line like

set board_info(sh-hms-sim/-m4-single-only/-ml,ldscript) "-Wl,--defsym,_stack=0x7f000"

to my sh-elf set.exp files.
This works nicely for the gcc tests, but the simulator testsuite passes
ldscript to the linker directly, and the latter doesn't like -Wl.
As a result, all the simulator tests fail.

I see that this has been worked around before for the -T option:

http://mail.gnu.org/archive/html/dejagnu/2003-06/msg00082.html

but AFAIK there is no option that has the meaning of --defsym that is
accepted both by the compiler and the linker.

I'm not sure what is the best way to solve this problem.

- should we have a separate board_info item that gets passed only to the
  compiler for linking, but not to the linker directly when that is what
  is used for linking?
- should dejagnu process -Wl, when it passes the ldscript options to the
  linker?
- should the linker process -Wl, so that its more interchangable with gcc
  for linking?
- should the simulator testsuite use gcc for linking if running from a
  unified with gcc present? (N.B. I use 'make check' in a unified build
  tree, which is why I have to use the same site.exp file for gcc and sim.
  when someone builds & tests components of the toolchain separately,
  they can use different site.exp files for that.)


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