From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28764 invoked by alias); 29 Nov 2006 21:20:55 -0000 Received: (qmail 28755 invoked by uid 22791); 29 Nov 2006 21:20:54 -0000 X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 29 Nov 2006 21:20:45 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id kATLKhFQ000973; Wed, 29 Nov 2006 16:20:43 -0500 Received: from pobox.toronto.redhat.com (pobox.toronto.redhat.com [172.16.14.4]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id kATLKfhN021397; Wed, 29 Nov 2006 16:20:42 -0500 Received: from [172.16.14.227] (topaz.toronto.redhat.com [172.16.14.227]) by pobox.toronto.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id kATLKfJu003388; Wed, 29 Nov 2006 16:20:41 -0500 Message-ID: <456DF9A8.6070002@redhat.com> Date: Wed, 29 Nov 2006 21:20:00 -0000 From: Dave Brolley User-Agent: Thunderbird 1.5.0.5 (X11/20060719) MIME-Version: 1.0 To: Avinash Malik CC: sid@sources.redhat.com Subject: Re: Fwd: Regarding the sid simulator [patch][commit] References: <20061127130318.GA20323@redhat.com> <20061127235725.GC20323@redhat.com> In-Reply-To: Content-Type: multipart/mixed; boundary="------------030304040103010903050904" X-IsSubscribed: yes Mailing-List: contact sid-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: sid-owner@sourceware.org X-SW-Source: 2006-q4/txt/msg00021.txt.bz2 This is a multi-part message in MIME format. --------------030304040103010903050904 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 2357 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 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> std::char_traits, std::allocator > const&, >> std::basic_string, std::allocator >> > const&, SessionCfg*, std::basic_string> std::char_traits, std::allocator > const&)' >> shCfg.o:../../../../src/sid/main/dynamic/shCfg.cxx:13: first defined >> here >> shCfg.o: In function `mk_sh5_64media(std::basic_string> std::char_traits, std::allocator >, SessionCfg*)': >> ../../../../src/sid/main/dynamic/shCfg.cxx:219: multiple definition >> of `mk_sh5_64media(std::basic_string, >> std::allocator >, SessionCfg*)' >> shCfg.o:../../../../src/sid/main/dynamic/shCfg.cxx:219: first defined >> here >> shCfg.o: In function `mk_sh5_32media(std::basic_string> std::char_traits, std::allocator >, 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? > --------------030304040103010903050904 Content-Type: text/plain; name="sh-config.ChangeLog" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="sh-config.ChangeLog" Content-length: 380 2006-11-29 Dave Brolley * 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 * Makefile.am (TARGETCFGS): Set based on SIDTARGET_SH_OR_SH64. * Makefile.in: Regenerated. * aclocal.m4: Regenerated. * configure: Regenerated. --------------030304040103010903050904 Content-Type: text/plain; name="sh-config.patch.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="sh-config.patch.txt" Content-length: 2924 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 --------------030304040103010903050904--