From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4051 invoked by alias); 17 Mar 2013 16:05:20 -0000 Received: (qmail 4034 invoked by uid 22791); 17 Mar 2013 16:05:15 -0000 X-SWARE-Spam-Status: No, hits=-4.9 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from oarmail.oarcorp.com (HELO OARmail.OARCORP.com) (67.63.146.244) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 17 Mar 2013 16:05:07 +0000 Received: from [192.168.0.14] (24.96.88.41) by OARmail.OARCORP.com (192.168.2.2) with Microsoft SMTP Server (TLS) id 8.2.255.0; Sun, 17 Mar 2013 11:05:05 -0500 Message-ID: <5145E9AF.9080401@oarcorp.com> Date: Sun, 17 Mar 2013 16:05:00 -0000 From: Joel Sherrill User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130307 Thunderbird/17.0.4 MIME-Version: 1.0 To: Ralf Corsepius CC: Mike Frysinger , "gdb@sourceware.org" Subject: Re: [gdb-7.5.91] mips sim fails to build on mingw32 References: <5evvfpyhuvbs9ftm3edxb7na.1363372668425@email.android.com> <5143F627.3030905@rtems.org> <5144169C.6060902@rtems.org> <51448AD1.70201@oarcorp.com> <51454320.1090000@rtems.org> In-Reply-To: <51454320.1090000@rtems.org> Content-Type: multipart/mixed; boundary="------------010408040001050100050906" X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2013-03/txt/msg00042.txt.bz2 --------------010408040001050100050906 Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit Content-length: 5057 Comments interspersed but the bottom line is that this is an ugly issue where I believe a number of the simulators have hard-coded dependencies on dv-sockser.o and do not link without it even on CentOS. These sims are: frv/Makefile.in:CONFIG_DEVICES = dv-sockser.o iq2000/Makefile.in:CONFIG_DEVICES = dv-sockser.o m32r/Makefile.in:CONFIG_DEVICES = dv-sockser.o mn10300/Makefile.in: dv-sockser.o sh64/Makefile.in:CONFIG_DEVICES = dv-sockser.o Plus m68hc11 which does not honor --enable-sim-hardware in its configure.ac. Based on the target name, it just enables hardware. It appears to be broken in another way. I have attached a patch which addresses common, mips, bfin and makes m68hc11 use the conditional for dv-sockser.o. It doesn't make m68hc11 honor --enable-sim-hardware. mips and bfin build fine with this patch with or without --enable-sim-hardware. I don't know what to do about the other targets. My recommendation would be: + m68hc11 -minimum honor --enable-sim-hardware + others - if dependency on dv-sockser.o is hard-coded and unavoidable, the entire simulator is unsupported on mingw32. I am certainly open for suggestions. On 3/16/2013 11:14 PM, Ralf Corsepius wrote: > On 03/16/2013 04:08 PM, Joel Sherrill wrote: >> On 3/16/2013 1:52 AM, Ralf Corsepius wrote: >>> On 03/16/2013 05:33 AM, Ralf Corsepius wrote: >>>> On 03/15/2013 07:37 PM, Joel Sherrill wrote: >>>>> My recollection is that it did not link on CentOS 6 and was missing >>>>> these symbols. Disabling it again should make it obvious. >>>> Reverting your patch lets build mips-rtems*gdb-7.5.91 build >>>> successfully on all hosts I am build gdb on [1] >>>> >>>> This is not surprising to me, as reverting the patch pushes >>>> mips*gdb-7.5.91's configuration into a similar state as gdb-7.5.1 was, >>>> which built for all of my build hosts. >>>> >>>>> But I didn't build in any particularly special way and it failed. >>>> I am suspecting you were building mipstx39-rtems-gdb. >>> OK, I found the original thread: >>> http://www.sourceware.org/ml/gdb-patches/2012-09/msg00030.html >>> >>> All I can say, I can not reproduce the issue you were reporting with >>> gdb-7.5.1 and gdb-7.5.91. Reverting this change brings back >>> mingw32-w64/gdb-7.5.91. >> It is still there if you configure correctly. > "Correctly" is a bold term! > >> On a completely up to date >> CentOS 6.x install. I reversed the patch locally and configured like this: >> >> ../gdb-7.5.91/configure --target=mips-rtems4.11 \ >> --prefix=/home/joel/test-gdb/install/ --enable-sim \ >> --enable-sim-hardware --enable-timebase --enable-sim-trace && >> make >> >> And the build failed like this: >> >> -o run \ >> nrun.o libsim.a ../../bfd/libbfd.a ../../opcodes/libopcodes.a >> ../../libiberty/libiberty.a -lm -lm -lz -lnsl >> libsim.a(interp.o): In function `sim_open': >> /home/joel/test-gdb/b-gdb/sim/mips/../../../gdb-7.5.91/sim/mips/interp.c:552: >> undefined reference to `sockser_addr' > This fails on all hosts for me. FWIW the host pattern is mingw32 for the work around and mingw64 may have this as well. I have no way to test this. > But ... this provides further insights: > > I configure using "default" simulator flags: > --enable-sim > > You configure using "exotic" simulator flags: > --enable-sim --enable-sim-hardware --enable-timebase --enable-sim-trace > > Why you're using them, I don't know. Very simple. configure options are supposed to be used or ignored by each component. That is by definition. --enable-sim-hardware ==================== It is a generic option to indicate that if the simulator has optional devices, enable them all. Simulators that don't have anything to enable should just work or ignore the flag. The PowerPC simulator does something meaningful with this. All simulators using common/acinclude.m4 are apparently broken when this is enabled. --enable-sim-timease ================== sim/ppc specific. Correctly ignored everywhere else. No issue. --enable-sim-trace ================ This enables execution trace capabilities which are useful in debug. This option is present in 26 subdirectories in sim so appears to be universal or close. > > Further trial and error with your patch reversed shows: > --enable-sim-hardware triggers the link-error your reported on all hosts. > All other permutations of --enable-sim --enable-sim-{timebase,sim-trace} > build. > > I conclude from this: > sim/mips only needs dv-sockser.o for tx39* targets or when > --enable-sim-hardware is used. > > => The patch is wrong and should be reverted. The configuration magic to > pull in dv-socksers.o should be reworked and likely needs to be keyed to > -enable-sim-hardware. Agreed. This is a bug in common/acinclude.m4 and (possibly) the Makefile.in for the actual simulators. > > > Ralf > -- Joel Sherrill, Ph.D. Director of Research & Development joel.sherrill@OARcorp.com On-Line Applications Research Ask me about RTEMS: a free RTOS Huntsville AL 35805 Support Available (256) 722-9985 --------------010408040001050100050906 Content-Type: text/plain; charset="windows-1252"; name="sockser_diff_v1.txt" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="sockser_diff_v1.txt" Content-length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