Re: Regarding the sid simulator

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Regarding the sid simulator

Frank Ch. Eigler
Hi -

On Mon, Nov 27, 2006 at 08:54:02PM +1300, Avinash Malik wrote:
> Hello,
>        I have the snapshot from the cvs-version I tried to compile it but
> seems to fail. This is the error:
>
> shCfg.o:/home/downloads/src/sid/main/dynamic/shCfg.cxx:221: first defined
> here

The few lines before this error message would help.

In general, sid is known to compile with a variety of gcc versions,
new and old.  If you have problems with 4.0, try something older or
newer.

- FChE
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: Regarding the sid simulator

Frank Ch. Eigler
Hi -

On Tue, Nov 28, 2006 at 12:31:01PM +1300, Avinash Malik wrote:
> [...]
>        After a lot of work arounds I could get sid compiled and installed.
> But I still cannot target the SHboard since that gives me a internal
> compiler error: segmentation fault.

These are the errors I'm seeing building today's cvs sid with FC5's
gcc-4.1.1:

make[1]: Entering directory `..../sid/main/dynamic'
/bin/sh ./libtool --tag=CXX --mode=link c++ -DSIDTARGET_SH -DSIDTARGET_SH64 -g -O2   -o sid -export-dynamic -static -export-symbols-regex '[a-zA-Z0-9]*_library$' ../../component/cfgroot/libconfig.la mainDynamic.o baseCfg.o commonCfg.o shCfg.o shCfg.o -L../../../libiberty/pic -L../../../libiberty -liberty
c++ -DSIDTARGET_SH -DSIDTARGET_SH64 -g -O2 -o sid mainDynamic.o baseCfg.o commonCfg.o shCfg.o shCfg.o -Wl,--export-dynamic  ../../component/cfgroot/.libs/libconfig.a -ldl -L....libiberty/pic -L....libiberty -liberty
shCfg.o: In function `~ShBoardCfg':
../../../../src/sid/main/dynamic/shCfg.cxx:13: multiple definition of `ShBoardCfg::ShBoardCfg(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, SessionCfg*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
shCfg.o:../../../../src/sid/main/dynamic/shCfg.cxx:13: first defined here
shCfg.o: In function `mk_sh5_64media(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, SessionCfg*)':
../../../../src/sid/main/dynamic/shCfg.cxx:219: multiple definition of `mk_sh5_64media(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, SessionCfg*)'
shCfg.o:../../../../src/sid/main/dynamic/shCfg.cxx:219: first defined here
shCfg.o: In function `mk_sh5_32media(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, SessionCfg*)':

So there is definitely a problem.  And from the compiler command line,
it's easy to see: shCfg.o is being listed and linked twice.  Dave?


> I thought this would mean an error with my memory. I carried out a
> memtest, my memory seems to be fine. [...]

Yes, that was a long shot.

> The Shboard error is here: Sh.h:314.

I see no file named "Sh.h".  There is a .../cgen-cpu/sh/sh.h.

> I cannot post anything to the mailing-list dont know why although I
> am subscribed.

Perhaps you are sending HTML mail.  sourceware does not accept those.

> Also I dont get any mails from the mailing-list. [...]

That is very odd, since the logs don't show anything strange about
your subscription.  Maybe google is spam-filtering too eagerly?


- FChE
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: Regarding the sid simulator

Avinash Malik
Hello,
        I was just wondering if you guys had any support for
architectures described in SystemC. Also since SystemC is a C++
library, how hard it would be to integrate that into the current
source. Just a heads up before I endeavour onto integrating my RTOS
(systemc-description) into sid.


regards,

On 11/28/06, Frank Ch. Eigler <[hidden email]> wrote:

> Hi -
>
> On Tue, Nov 28, 2006 at 12:31:01PM +1300, Avinash Malik wrote:
> > [...]
> >        After a lot of work arounds I could get sid compiled and installed.
> > But I still cannot target the SHboard since that gives me a internal
> > compiler error: segmentation fault.
>
> These are the errors I'm seeing building today's cvs sid with FC5's
> gcc-4.1.1:
>
> make[1]: Entering directory `..../sid/main/dynamic'
> /bin/sh ./libtool --tag=CXX --mode=link c++ -DSIDTARGET_SH -DSIDTARGET_SH64 -g -O2   -o sid -export-dynamic -static -export-symbols-regex '[a-zA-Z0-9]*_library$' ../../component/cfgroot/libconfig.la mainDynamic.o baseCfg.o commonCfg.o shCfg.o shCfg.o -L../../../libiberty/pic -L../../../libiberty -liberty
> c++ -DSIDTARGET_SH -DSIDTARGET_SH64 -g -O2 -o sid mainDynamic.o baseCfg.o commonCfg.o shCfg.o shCfg.o -Wl,--export-dynamic  ../../component/cfgroot/.libs/libconfig.a -ldl -L....libiberty/pic -L....libiberty -liberty
> shCfg.o: In function `~ShBoardCfg':
> ../../../../src/sid/main/dynamic/shCfg.cxx:13: multiple definition of `ShBoardCfg::ShBoardCfg(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, SessionCfg*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
> shCfg.o:../../../../src/sid/main/dynamic/shCfg.cxx:13: first defined here
> shCfg.o: In function `mk_sh5_64media(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, SessionCfg*)':
> ../../../../src/sid/main/dynamic/shCfg.cxx:219: multiple definition of `mk_sh5_64media(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, SessionCfg*)'
> shCfg.o:../../../../src/sid/main/dynamic/shCfg.cxx:219: first defined here
> shCfg.o: In function `mk_sh5_32media(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, SessionCfg*)':
>
> So there is definitely a problem.  And from the compiler command line,
> it's easy to see: shCfg.o is being listed and linked twice.  Dave?
>
>
> > I thought this would mean an error with my memory. I carried out a
> > memtest, my memory seems to be fine. [...]
>
> Yes, that was a long shot.
>
> > The Shboard error is here: Sh.h:314.
>
> I see no file named "Sh.h".  There is a .../cgen-cpu/sh/sh.h.
>
> > I cannot post anything to the mailing-list dont know why although I
> > am subscribed.
>
> Perhaps you are sending HTML mail.  sourceware does not accept those.
>
> > Also I dont get any mails from the mailing-list. [...]
>
> That is very odd, since the logs don't show anything strange about
> your subscription.  Maybe google is spam-filtering too eagerly?
>
>
> - FChE
>



--
Avinash Malik
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: Regarding the sid simulator

Frank Ch. Eigler
Hi -

On Tue, Nov 28, 2006 at 08:48:32PM +1300, Avinash Malik wrote:
> Hello,
>        I was just wondering if you guys had any support for
> architectures described in SystemC. Also since SystemC is a C++
> library, how hard it would be to integrate that into the current
> source. [...]

I have only a small acquaintance with SystemC.  From that, it appears
that there are pure C++ class library implementations available, now
with a friendly license.  All that could allow seamless merging of
systemc models into sid simulations.  It's just a SMOP. :-)

- FChE
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: Regarding the sid simulator [patch][commit]

Dave Brolley-2
In reply to this post by Avinash Malik
I've committed the attached patch which should correct the problem of
shCfg.cxx being compiled and linked twice.

Dave

Avinash Malik wrote:

> On 11/28/06, Frank Ch. Eigler <[hidden email]> wrote:
>> Hi -
>>
>> On Tue, Nov 28, 2006 at 12:31:01PM +1300, Avinash Malik wrote:
>> > [...]
>> >        After a lot of work arounds I could get sid compiled and
>> installed.
>> > But I still cannot target the SHboard since that gives me a internal
>> > compiler error: segmentation fault.
>>
>> These are the errors I'm seeing building today's cvs sid with FC5's
>> gcc-4.1.1:
>>
>> make[1]: Entering directory `..../sid/main/dynamic'
>> /bin/sh ./libtool --tag=CXX --mode=link c++ -DSIDTARGET_SH
>> -DSIDTARGET_SH64 -g -O2   -o sid -export-dynamic -static
>> -export-symbols-regex '[a-zA-Z0-9]*_library$'
>> ../../component/cfgroot/libconfig.la mainDynamic.o baseCfg.o
>> commonCfg.o shCfg.o shCfg.o -L../../../libiberty/pic
>> -L../../../libiberty -liberty
>> c++ -DSIDTARGET_SH -DSIDTARGET_SH64 -g -O2 -o sid mainDynamic.o
>> baseCfg.o commonCfg.o shCfg.o shCfg.o -Wl,--export-dynamic  
>> ../../component/cfgroot/.libs/libconfig.a -ldl -L....libiberty/pic
>> -L....libiberty -liberty
>> shCfg.o: In function `~ShBoardCfg':
>> ../../../../src/sid/main/dynamic/shCfg.cxx:13: multiple definition of
>> `ShBoardCfg::ShBoardCfg(std::basic_string<char,
>> std::char_traits<char>, std::allocator<char> > const&,
>> std::basic_string<char, std::char_traits<char>, std::allocator<char>
>> > const&, SessionCfg*, std::basic_string<char,
>> std::char_traits<char>, std::allocator<char> > const&)'
>> shCfg.o:../../../../src/sid/main/dynamic/shCfg.cxx:13: first defined
>> here
>> shCfg.o: In function `mk_sh5_64media(std::basic_string<char,
>> std::char_traits<char>, std::allocator<char> >, SessionCfg*)':
>> ../../../../src/sid/main/dynamic/shCfg.cxx:219: multiple definition
>> of `mk_sh5_64media(std::basic_string<char, std::char_traits<char>,
>> std::allocator<char> >, SessionCfg*)'
>> shCfg.o:../../../../src/sid/main/dynamic/shCfg.cxx:219: first defined
>> here
>> shCfg.o: In function `mk_sh5_32media(std::basic_string<char,
>> std::char_traits<char>, std::allocator<char> >, SessionCfg*)':
>>
>> So there is definitely a problem.  And from the compiler command line,
>> it's easy to see: shCfg.o is being listed and linked twice.  Dave?
>

2006-11-29  Dave Brolley  <[hidden email]>

        * sidtargets.m4 (sidtarget_sh_or_sh64): New variable.
        (SIDTARGET_SH_OR_SH64): New automake conditional using
        sidtarget_sh_or_sh64.

2006-11-29  Dave Brolley  <[hidden email]>

        * Makefile.am (TARGETCFGS): Set based on SIDTARGET_SH_OR_SH64.
        * Makefile.in: Regenerated.
        * aclocal.m4: Regenerated.
        * configure: Regenerated.


Index: sid/config/sidtargets.m4
===================================================================
RCS file: /cvs/src/src/sid/config/sidtargets.m4,v
retrieving revision 1.8
diff -c -p -r1.8 sidtargets.m4
*** sid/config/sidtargets.m4 18 Oct 2006 18:42:36 -0000 1.8
--- sid/config/sidtargets.m4 29 Nov 2006 21:07:56 -0000
*************** sidtarget_mt=$sidtarget_default
*** 45,50 ****
--- 45,51 ----
  sidtarget_ppc=$sidtarget_default
  sidtarget_sh=$sidtarget_default
  sidtarget_sh64=$sidtarget_default
+ sidtarget_sh_or_sh64=$sidtarget_default
  sidtarget_xstormy16=$sidtarget_default
 
  dnl Iterate over all listed targets
*************** do
*** 60,67 ****
        mt*)    sidtarget_mt=1 ;;
        powerpc*) sidtarget_ppc=1 ;;
        ppc*)   sidtarget_ppc=1 ;;
!       sh64*) sidtarget_sh64=1 ;;
!       sh*) sidtarget_sh=1 ;;
        xstormy16*) sidtarget_xstormy16=1 ;;
        *)      AC_MSG_WARN("Unknown target $targ") ;;
     esac
--- 61,70 ----
        mt*)    sidtarget_mt=1 ;;
        powerpc*) sidtarget_ppc=1 ;;
        ppc*)   sidtarget_ppc=1 ;;
!       sh64*) sidtarget_sh64=1
!     sidtarget_sh_or_sh64=1 ;;
!       sh*)   sidtarget_sh=1
!     sidtarget_sh_or_sh64=1 ;;
        xstormy16*) sidtarget_xstormy16=1 ;;
        *)      AC_MSG_WARN("Unknown target $targ") ;;
     esac
*************** AC_SUBST(sidtarget_sh64)
*** 132,137 ****
--- 135,145 ----
  AM_CONDITIONAL(SIDTARGET_SH64,[test "x$sidtarget_sh64" = x1])
  AC_MSG_RESULT($sidtarget_sh64)
 
+ AC_MSG_CHECKING(SH or SH64 family support)
+ AC_SUBST(sidtarget_sh_or_sh64)
+ AM_CONDITIONAL(SIDTARGET_SH_OR_SH64,[test "x$sidtarget_sh_or_sh64" = x1])
+ AC_MSG_RESULT($sidtarget_sh_or_sh64)
+
  AC_MSG_CHECKING(Sanyo Xstormy16 family support)
  AC_SUBST(sidtarget_xstormy16)
  AM_CONDITIONAL(SIDTARGET_XSTORMY16,[test "x$sidtarget_xstormy16" = x1])
Index: sid/main/dynamic/Makefile.am
===================================================================
RCS file: /cvs/src/src/sid/main/dynamic/Makefile.am,v
retrieving revision 1.13
diff -c -p -r1.13 Makefile.am
*** sid/main/dynamic/Makefile.am 18 Oct 2006 18:46:17 -0000 1.13
--- sid/main/dynamic/Makefile.am 29 Nov 2006 21:07:56 -0000
*************** TARGETCFGS = ""
*** 11,23 ****
  TARGETDEFINES =
 
  if SIDTARGET_SH
- TARGETCFGS += shCfg.cxx
  TARGETDEFINES += -DSIDTARGET_SH
  endif
  if SIDTARGET_SH64
- TARGETCFGS += shCfg.cxx
  TARGETDEFINES += -DSIDTARGET_SH64
  endif
 
  # If sid is being compiled without shared library support, arrange to
  # statically link in a bunch of component libraries using libtool's
--- 11,24 ----
  TARGETDEFINES =
 
  if SIDTARGET_SH
  TARGETDEFINES += -DSIDTARGET_SH
  endif
  if SIDTARGET_SH64
  TARGETDEFINES += -DSIDTARGET_SH64
  endif
+ if SIDTARGET_SH_OR_SH64
+ TARGETCFGS += shCfg.cxx
+ endif
 
  # If sid is being compiled without shared library support, arrange to
  # statically link in a bunch of component libraries using libtool's
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: Regarding the sid simulator [patch][commit]

Frank Ch. Eigler
Hi -

> I've committed the attached patch which should correct the problem of
> shCfg.cxx being compiled and linked twice.
> [...]
> 2006-11-29  Dave Brolley  <[hidden email]>
>
> * sidtargets.m4 (sidtarget_sh_or_sh64): New variable.
> (SIDTARGET_SH_OR_SH64): New automake conditional using
> sidtarget_sh_or_sh64.
> [...]

Would it be possible to simply always compile in the shCfg.cxx file?
Protect it with an embedded #if SIDTARGET_SH | SIDTARGET_SH64
if you really must.

- FChE

attachment0 (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: Regarding the sid simulator [patch][commit]

Dave Brolley-2
Frank Ch. Eigler wrote:
> Would it be possible to simply always compile in the shCfg.cxx file?
> Protect it with an embedded #if SIDTARGET_SH | SIDTARGET_SH64
> if you really must.
>
>  
Well yes, of course it would. It just seemed wasteful. Similar to how we
don't compile/link in the bits which support unspecified targets in
sid/component/cgen-cpu.

Dave

Reply | Threaded
Open this post in threaded view
|

Re: Fwd: Regarding the sid simulator [patch][commit]

Frank Ch. Eigler
Hi -

> >Would it be possible to simply always compile in the shCfg.cxx file?
> >Protect it with an embedded #if SIDTARGET_SH | SIDTARGET_SH64
> >if you really must.
>
> Well yes, of course it would. It just seemed wasteful. Similar to how we
> don't compile/link in the bits which support unspecified targets in
> sid/component/cgen-cpu.

The costs (compile time / object size) are of a different magnitude.
We don't rip out unconfigured platforms out of configrun-sid.pl either
- they just won't work.  Plus, if you add the #if/#endif thing I
mentioned, the costs of including a dummy shCfg.cxx are approximately
zero.

- FChE
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: Regarding the sid simulator [patch][commit]

Dave Brolley-2
Frank Ch. Eigler wrote:
> The costs (compile time / object size) are of a different magnitude.
> We don't rip out unconfigured platforms out of configrun-sid.pl either
> - they just won't work.  Plus, if you add the #if/#endif thing I
> mentioned, the costs of including a dummy shCfg.cxx are approximately
> zero.
>
>  
As requested, I've removed the previous patch and committed this one
instead.

Dave


2006-11-30  Dave Brolley  <[hidden email]>

        * Makefile.am (TARGETCFGS): Revert previous changes. Add shCfg.cxx
        unconditionally.
        * Makefile.in: Regenerated.
        * aclocal.m4: Regenerated.
        * configure: Regenerated.
        * shCfg.cxx: Protect the entire file with preprocessor conditional
        compilation for sh or sh64.

2006-11-30  Dave Brolley  <[hidden email]>

        * sidtargets.m4: Revert previous change.


Index: sid/main/dynamic/Makefile.am
===================================================================
RCS file: /cvs/src/src/sid/main/dynamic/Makefile.am,v
retrieving revision 1.14
diff -c -p -r1.14 Makefile.am
*** sid/main/dynamic/Makefile.am 29 Nov 2006 21:18:30 -0000 1.14
--- sid/main/dynamic/Makefile.am 30 Nov 2006 18:36:14 -0000
*************** INCLUDES = -I. -I../../include -I$(srcdi
*** 7,13 ****
  LIBIBERTY = -L../../../libiberty/pic -L../../../libiberty -liberty
 
  bin_PROGRAMS = sid
! TARGETCFGS = ""
  TARGETDEFINES =
 
  if SIDTARGET_SH
--- 7,13 ----
  LIBIBERTY = -L../../../libiberty/pic -L../../../libiberty -liberty
 
  bin_PROGRAMS = sid
! TARGETCFGS = shCfg.cxx
  TARGETDEFINES =
 
  if SIDTARGET_SH
*************** endif
*** 16,24 ****
  if SIDTARGET_SH64
  TARGETDEFINES += -DSIDTARGET_SH64
  endif
- if SIDTARGET_SH_OR_SH64
- TARGETCFGS += shCfg.cxx
- endif
 
  # If sid is being compiled without shared library support, arrange to
  # statically link in a bunch of component libraries using libtool's
--- 16,21 ----
Index: sid/main/dynamic/shCfg.cxx
===================================================================
RCS file: /cvs/src/src/sid/main/dynamic/shCfg.cxx,v
retrieving revision 1.1
diff -c -p -r1.1 shCfg.cxx
*** sid/main/dynamic/shCfg.cxx 18 Oct 2006 18:46:17 -0000 1.1
--- sid/main/dynamic/shCfg.cxx 30 Nov 2006 18:36:16 -0000
***************
*** 4,9 ****
--- 4,10 ----
  // This file is part of SID and is licensed under the GPL.
  // See the file COPYING.SID for conditions for redistribution.
 
+ #if defined (SIDTARGET_SH) || defined (SIDTARGET_SH64)
 
  #include "shCfg.h"
 
*************** mk_sh5_64media (const string name, Sessi
*** 222,224 ****
--- 223,227 ----
    return board;
  }
  #endif // defined (SIDTARGET_SH64)
+
+ #endif // defined (SIDTARGET_SH) || defined (SIDTARGET_SH64)