This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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: Your sim configure commits broke mn10300-sim and m68hc11-sim


On Monday 17 October 2011 22:45:30 Hans-Peter Nilsson wrote:
> In my most recent sim autotester log, I see a bunch of
> sim/*/configure* commits, and breakage.  They somehow caused
> loss of -lm or something like that when linking mn10300-elf-sim
> and m68hc11-elf-sim.  Can you please fix?

i think it's a matter of these sims didn't build dv-cfi.c before.  the 
regeneration pulled them in (by design).  and now they fail ;).

the best fix is probably to not use log2() at all.  but i'm not sure there is 
an easy way to do that while maintaining the config format.  the idea was to 
have the device tree format be simple: user specifies the desired file size (in 
bytes) of the device.  the CFI spec requires the size to be available in power 
of two to the simulated software.  so the sim device init code reads the 
requested size from the device tree, calculates the power of two value, and 
then uses that when implementing the CFI spec.  i could have the user specify 
the power of two value instead, but it seemed less natural.  they'd have to 
enter like "20" if they wanted a 1MiB flash instead of "1048576" or 0x100000 
(which is what they enter now).

so that leaves anyone who wants to use dv-cfi with linking against libm.  i 
could update common/acinclude.m4 to do AC_CHECK_LIB(m, log2) when "cfi" is in 
the enabled hardware list.  that way -lm would get added to @LIBS@ which gets 
used in Make-common.in.

any preferences or other ideas ?
-mike


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