This is the mail archive of the gdb@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: [gdb-7.5.91] mips sim fails to build on mingw32


My recollection is that it did not link on CentOS 6 and was missing these symbols. Disabling it again should make it obvious.

But I didn't build in any particularly special way and it failed.

--joel

Ralf Corsepius <ralf.corsepius@rtems.org> wrote:


On 03/15/2013 07:16 PM, Mike Frysinger wrote:
> On Friday 15 March 2013 08:49:28 Ralf Corsepius wrote:
>> Hi,
>>
>> The mips sim fails to build on mingw:
>> ...
>> x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H     -DPROFILE=1 -DWITH_PROFILE=-1
>>     -DWITH_ALIGNMENT=NONSTRICT_ALIGNMENT -DWITH_TARGET_WORD_BITSIZE=32
>> -DWITH_TARGET_WORD_MSB=31 -DWITH_DEFAULT_TARGET_BYTE_ORDER=BIG_ENDIAN
>> -DWITH_FLOATING_POINT=HARD_FLOATING_POINT
>> -DWITH_TARGET_FLOATING_POINT_BITSIZE=32 -DWITH_HW=0
>> -DWITH_HOST_BYTE_ORDER=0 -DDEFAULT_INLINE=0   -DWITH_RESERVED_BITS=1
>> -DWITH_SMP=0  -Wall -Wdeclaration-after-statement -Wpointer-arith
>> -Wformat-nonliteral -Wno-pointer-sign -Wno-unused -Wunused-value
>> -Wunused-function -Wno-switch -Wno-char-subscripts -Wmissing-prototypes
>> -Wno-format    -DMIPS_MACH_DEFAULT=bfd_mach_mips8000   -I.
>> -I../../../gdb-7.5.91/sim/mips -I../common
>> -I../../../gdb-7.5.91/sim/mips/../common -I../../include
>> -I../../../gdb-7.5.91/sim/mips/../..//include -I../../bfd
>> -I../../../gdb-7.5.91/sim/mips/../..//bfd -I../../opcodes
>> -I../../../gdb-7.5.91/sim/mips/../..//opcodes  -O2 -g -pipe -Wall
>> -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4
>> -mms-bitfields -D__USE_MINGW_ACCESS -c -o interp.o -MT interp.o -MMD -MP
>> -MF .deps/interp.Tpo ../../../gdb-7.5.91/sim/mips/interp.c
>> ../../../gdb-7.5.91/sim/mips/../common/dv-sockser.c:44:24: fatal error:
>> netinet/in.h: No such file or directory
>>
>>
>> ATM, I assume this patch to be the cause (sim/mips):
>>
>> 2012-09-03 Joel Sherrill <joel.sherrill@oarcorp.com>
>>
>>           * configure.ac: Always link against dv-sockser.o.
>>           * configure: Regenerate.
>>
>>
>>   From what I can gather from comparing sim/mips/configure.ac to other
>> sim/*/configure.ac (e.g. bfin/configure.ac),
>> dv-sockser.o needs to be suppressed for mingw32-* targets?
>
> dv-sockser has always been a bit of an ad-hoc hack (at just about every
> layer).  adding a m4 macro to the common/ dir would probably be prudent.
> -mike

Hmm, Joel, which issue did your patch (snippet below) try to address?


diff --git a/sim/mips/configure.ac b/sim/mips/configure.ac
index 5f59637..862e2b5 100644
--- a/sim/mips/configure.ac
+++ b/sim/mips/configure.ac
@@ -409,14 +413,13 @@ case "${target}" in
    mips*tx39*)
         hw_enabled=yes
         hw_extra_devices="tx3904cpu tx3904irc tx3904tmr tx3904sio"
-       mips_extra_objs="dv-sockser.o"
         SIM_SUBTARGET="$SIM_SUBTARGET -DTARGET_TX3904=1"
         ;;
    *)
-       mips_extra_objs=""
         ;;
  esac
  SIM_AC_OPTION_HARDWARE($hw_enabled,$hw_devices,$hw_extra_devices)
+mips_extra_objs="dv-sockser.o"
  AC_SUBST(mips_extra_objs)


IIUC, this lets all mips-sim-variants link against dv-sockser.o, while
previously only the tx39*-variants did. I don't understand this step.

Ralf





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