Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Your sim configure commits broke mn10300-sim and m68hc11-sim
@ 2011-10-18  3:51 Hans-Peter Nilsson
  2011-10-18  4:11 ` Mike Frysinger
  2011-10-20  1:04 ` Mike Frysinger
  0 siblings, 2 replies; 7+ messages in thread
From: Hans-Peter Nilsson @ 2011-10-18  3:51 UTC (permalink / raw)
  To: vapier; +Cc: gdb-patches

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?  Thanks.

m68hc11-elf:
...
gcc -DHAVE_CONFIG_H     -DPROFILE=1 -DWITH_PROFILE=-1   -DWITH_ALIGNMENT=NONSTRICT_ALIGNMENT     -DWITH_HW=1 -DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN        -Wimplicit -Wreturn-type -Wcomment -Wtrigraphs -Wformat -Wparentheses -Wpointer-arith -Wuninitialized    -DWITH_TARGET_WORD_BITSIZE=32 -DWITH_TARGET_CELL_BITSIZE=32 -DWITH_TARGET_ADDRESS_BITSIZE=32 -DWITH_TARGET_WORD_MSB=31   -I. -I/tmp/hpautotest-sim/src/sim/m68hc11 -I../common -I/tmp/hpautotest-sim/src/sim/m68hc11/../common -I../../include -I/tmp/hpautotest-sim/src/sim/m68hc11/../../include -I../../bfd -I/tmp/hpautotest-sim/src/sim/m68hc11/../../bfd -I../../opcodes -I/tmp/hpautotest-sim/src/sim/m68hc11/../../opcodes  -g -O2  -o run \
	  nrun.o libsim.a ../../bfd/libbfd.a ../../opcodes/libopcodes.a  ../../libiberty/libiberty.a -lz -lnsl  
make[3]: Leaving directory `/tmp/hpautotest-sim/m68hc11-elf/sim/m68hc11'
make[2]: Leaving directory `/tmp/hpautotest-sim/m68hc11-elf/sim'
make[1]: Leaving directory `/tmp/hpautotest-sim/m68hc11-elf'
libsim.a(dv-cfi.o): In function `attach_cfi_regs':
/tmp/hpautotest-sim/src/sim/m68hc11/../common/dv-cfi.c:626: undefined reference to `log2'
/tmp/hpautotest-sim/src/sim/m68hc11/../common/dv-cfi.c:645: undefined reference to `log2'
collect2: ld returned 1 exit status

mn10300-elf:
gcc -c /tmp/hpautotest-sim/src/sim/mn10300/../common/nrun.c -DHAVE_CONFIG_H     -DPROFILE=1 -DWITH_PROFILE=-1   -DWITH_ALIGNMENT=NONSTRICT_ALIGNMENT -DWITH_TARGET_WORD_BITSIZE=32 -DWITH_TARGET_WORD_MSB=31 -DWITH_TARGET_BYTE_ORDER=LITTLE_ENDIAN   -DWITH_HW=1 -DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN    -DWITH_RESERVED_BITS=1    -Wimplicit -Wreturn-type -Wcomment -Wtrigraphs -Wformat -Wparentheses -Wpointer-arith -Wuninitialized    -DPOLL_QUIT_INTERVAL=0x20   -I. -I/tmp/hpautotest-sim/src/sim/mn10300 -I../common -I/tmp/hpautotest-sim/src/sim/mn10300/../common -I../../include -I/tmp/hpautotest-sim/src/sim/mn10300/../../include -I../../bfd -I/tmp/hpautotest-sim/src/sim/mn10300/../../bfd -I../../opcodes -I/tmp/hpautotest-sim/src/sim/mn10300/../../opcodes  -g -O2
gcc -DHAVE_CONFIG_H     -DPROFILE=1 -DWITH_PROFILE=-1   -DWITH_ALIGNMENT=NONSTRICT_ALIGNMENT -DWITH_TARGET_WORD_BITSIZE=32 -DWITH_TARGET_WORD_MSB=31 -DWITH_TARGET_BYTE_ORDER=LITTLE_ENDIAN   -DWITH_HW=1 -DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN    -DWITH_RESERVED_BITS=1    -Wimplicit -Wreturn-type -Wcomment -Wtrigraphs -Wformat -Wparentheses -Wpointer-arith -Wuninitialized    -DPOLL_QUIT_INTERVAL=0x20   -I. -I/tmp/hpautotest-sim/src/sim/mn10300 -I../common -I/tmp/hpautotest-sim/src/sim/mn10300/../common -I../../include -I/tmp/hpautotest-sim/src/sim/mn10300/../../include -I../../bfd -I/tmp/hpautotest-sim/src/sim/mn10300/../../bfd -I../../opcodes -I/tmp/hpautotest-sim/src/sim/mn10300/../../opcodes  -g -O2  -o run \
	  nrun.o libsim.a ../../bfd/libbfd.a ../../opcodes/libopcodes.a  ../../libiberty/libiberty.a -lz -lnsl  
make[3]: Leaving directory `/tmp/hpautotest-sim/mn10300-elf/sim/mn10300'
make[2]: Leaving directory `/tmp/hpautotest-sim/mn10300-elf/sim'
make[1]: Leaving directory `/tmp/hpautotest-sim/mn10300-elf'
libsim.a(dv-cfi.o): In function `attach_cfi_regs':
/tmp/hpautotest-sim/src/sim/mn10300/../common/dv-cfi.c:626: undefined reference to `log2'
/tmp/hpautotest-sim/src/sim/mn10300/../common/dv-cfi.c:645: undefined reference to `log2'
collect2: ld returned 1 exit status

brgds, H-P


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Your sim configure commits broke mn10300-sim and m68hc11-sim
  2011-10-18  3:51 Your sim configure commits broke mn10300-sim and m68hc11-sim Hans-Peter Nilsson
@ 2011-10-18  4:11 ` Mike Frysinger
  2011-10-18 16:55   ` Hans-Peter Nilsson
  2011-10-20  1:04 ` Mike Frysinger
  1 sibling, 1 reply; 7+ messages in thread
From: Mike Frysinger @ 2011-10-18  4:11 UTC (permalink / raw)
  To: Hans-Peter Nilsson; +Cc: gdb-patches

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Your sim configure commits broke mn10300-sim and m68hc11-sim
  2011-10-18  4:11 ` Mike Frysinger
@ 2011-10-18 16:55   ` Hans-Peter Nilsson
  2011-10-19 16:33     ` Mike Frysinger
  0 siblings, 1 reply; 7+ messages in thread
From: Hans-Peter Nilsson @ 2011-10-18 16:55 UTC (permalink / raw)
  To: vapier; +Cc: hp, gdb-patches

> From: Mike Frysinger <vapier@gentoo.org>
> Date: Mon, 17 Oct 2011 23:51:25 -0400

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

Sounds like the obvious option, thanks.

brgds, H-P


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Your sim configure commits broke mn10300-sim and m68hc11-sim
  2011-10-18 16:55   ` Hans-Peter Nilsson
@ 2011-10-19 16:33     ` Mike Frysinger
  2011-10-19 20:46       ` Hans-Peter Nilsson
  0 siblings, 1 reply; 7+ messages in thread
From: Mike Frysinger @ 2011-10-19 16:33 UTC (permalink / raw)
  To: Hans-Peter Nilsson; +Cc: hp, gdb-patches

[-- Attachment #1: Type: Text/Plain, Size: 641 bytes --]

please try this.  it works for me.
-mike

2011-10-19  Mike Frysinger  <vapier@gentoo.org>

	* acinclude.m4 (SIM_AC_OPTION_HARDWARE): Check libm for log2 when
	cfi is in the hardware list.

diff --git a/sim/common/acinclude.m4 b/sim/common/acinclude.m4
index 70feca4..35ad690 100644
--- a/sim/common/acinclude.m4
+++ b/sim/common/acinclude.m4
@@ -639,6 +639,10 @@ fi
 if test x"$silent" != x"yes"; then
   echo "Setting hardware to $sim_hw_cflags, $sim_hw, $sim_hw_objs"
 fi])dnl
+dnl Some devices require extra libraries.
+case " $hardware " in
+  *" cfi "*) AC_CHECK_LIB(m, log2);;
+esac
 ])
 AC_SUBST(sim_hw_cflags)
 AC_SUBST(sim_hw_objs)

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Your sim configure commits broke mn10300-sim and m68hc11-sim
  2011-10-19 16:33     ` Mike Frysinger
@ 2011-10-19 20:46       ` Hans-Peter Nilsson
  2011-10-19 21:29         ` Mike Frysinger
  0 siblings, 1 reply; 7+ messages in thread
From: Hans-Peter Nilsson @ 2011-10-19 20:46 UTC (permalink / raw)
  To: vapier; +Cc: gdb-patches

> Date: Wed, 19 Oct 2011 12:05:01 -0400
> User-Agent: KMail/1.13.7 (Linux/3.1.0-rc4; KDE/4.6.5; x86_64; ; )

> please try this.  it works for me.

If you also repeated the problem then that's good enough,
thanks; looks good, ok.

> 2011-10-19  Mike Frysinger  <vapier@gentoo.org>
> 
> 	* acinclude.m4 (SIM_AC_OPTION_HARDWARE): Check libm for log2 when
> 	cfi is in the hardware list.

brgds, H-P


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Your sim configure commits broke mn10300-sim and m68hc11-sim
  2011-10-19 20:46       ` Hans-Peter Nilsson
@ 2011-10-19 21:29         ` Mike Frysinger
  0 siblings, 0 replies; 7+ messages in thread
From: Mike Frysinger @ 2011-10-19 21:29 UTC (permalink / raw)
  To: Hans-Peter Nilsson; +Cc: gdb-patches

[-- Attachment #1: Type: Text/Plain, Size: 382 bytes --]

On Wednesday 19 October 2011 16:45:17 Hans-Peter Nilsson wrote:
> > Date: Wed, 19 Oct 2011 12:05:01 -0400
> > User-Agent: KMail/1.13.7 (Linux/3.1.0-rc4; KDE/4.6.5; x86_64; ; )
> > 
> > please try this.  it works for me.
> 
> If you also repeated the problem then that's good enough,
> thanks; looks good, ok.

it did manifest itself on my side after all the regens
-mike

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Your sim configure commits broke mn10300-sim and m68hc11-sim
  2011-10-18  3:51 Your sim configure commits broke mn10300-sim and m68hc11-sim Hans-Peter Nilsson
  2011-10-18  4:11 ` Mike Frysinger
@ 2011-10-20  1:04 ` Mike Frysinger
  1 sibling, 0 replies; 7+ messages in thread
From: Mike Frysinger @ 2011-10-20  1:04 UTC (permalink / raw)
  To: Hans-Peter Nilsson; +Cc: gdb-patches

[-- Attachment #1: Type: Text/Plain, Size: 741 bytes --]

this is what i committed to fix things:
sim/bfin/:
sim/cris/:
sim/lm32/:
sim/m68hc11/:
sim/mips/:
sim/mn10300/:
2011-10-19  Mike Frysinger  <vapier@gentoo.org>

	* configure: Regenerate after common/acinclude.m4 update.

sim/common/:
2011-10-19  Mike Frysinger  <vapier@gentoo.org>

	* acinclude.m4: Call AC_CHECK_LIB when $hardware contains cfi.
-mike

--- common/acinclude.m4
+++ common/acinclude.m4
@@ -623,7 +623,11 @@ if test "$sim_hw_p" != yes; then
 fi
 if test x"$silent" != x"yes"; then
   echo "Setting hardware to $sim_hw_cflags, $sim_hw, $sim_hw_objs"
-fi])dnl
+fi])
+dnl Some devices require extra libraries.
+case " $hardware " in
+  *" cfi "*) AC_CHECK_LIB(m, log2);;
+esac
 ])
 AC_SUBST(sim_hw_cflags)
 AC_SUBST(sim_hw_objs)

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-10-19 21:29 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-18  3:51 Your sim configure commits broke mn10300-sim and m68hc11-sim Hans-Peter Nilsson
2011-10-18  4:11 ` Mike Frysinger
2011-10-18 16:55   ` Hans-Peter Nilsson
2011-10-19 16:33     ` Mike Frysinger
2011-10-19 20:46       ` Hans-Peter Nilsson
2011-10-19 21:29         ` Mike Frysinger
2011-10-20  1:04 ` Mike Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox