Canadian Cross build for MinGW host

Chris Johns chrisj at rtems.org
Mon Feb 1 00:13:44 UTC 2016


On 1/02/2016 7:52 AM, mario.gruber at space.unibe.ch wrote:
> I'm trying to do a Cxc build of 4.11/rtems-sparc for MinGW under Ubuntu 15.10:
> 
> FROM ubuntu:15.10
> 
> RUN apt-get update \
>  && apt-get install   -y python python2.7 python2.7-dev \
>  && apt-get build-dep -y gcc g++ gdb \
>  && apt-get install   -y wget unzip git \
>  && apt-get install   -y mingw-w64
> 
> RUN cd /tmp \
>  && git clone git://git.rtems.org/rtems-source-builder.git \
>  && cd rtems-source-builder \
>  && git checkout -b 4.11 origin/4.11 \
>  && source-builder/sb-check \
>  && cd rtems \
>  && ../source-builder/sb-set-builder \
>  --log=rsb-sparc-rtems4.11-mingw.txt \
>  --prefix=/opt/sparc-rtems4.11-mingw \
>  --host=i686-w64-mingw32 \
>  --bset-tar-files \
>  4.11/rtems-sparc
> 

This looks fine.

> RTEMS Source Builder - Set Builder, 4.11 (aa3fdad01a0d modified)
>  Command Line: ../source-builder/sb-set-builder --log=rsb-sparc-rtems4.11-mingw.txt --prefix=/opt/sparc-rtems4.11-mingw --host=i686-w64-mingw32 --bset-tar-files 4.11/rtems-sparc
>  Python: 2.7.10 (default, Oct 14 2015, 16:09:02) [GCC 5.2.1 20151010]
> Build Set: 4.11/rtems-sparc
> 
> 
> It fails building the GDB simulators:
> 
> make[3]: Entering directory '/tmp/rtems-source-builder/rtems/build/sparc-rtems4.11-gdb-7.9-i686-w64-mingw32-1/build-cxc/sim/erc32'
> i686-w64-mingw32-gcc -DHAVE_CONFIG_H     -DPROFILE=1 -DWITH_PROFILE=-1         -DWITH_HOST_BYTE_ORDER=0 -DDEFAULT_INLINE=0           -DFAST_UART -I../../../gdb-7.9/sim/erc32/../.. -D__USE_MINGW_FSEEK  -I. -I../../../gdb-7.9/sim/erc32 -I../common -I../../../gdb-7.9/sim/erc32/../common -I../../include -I../../../gdb-7.9/sim/erc32/../../include -I../../bfd -I../../../gdb-7.9/sim/erc32/../../bfd -I../../opcodes -I../../../gdb-7.9/sim/erc32/../../opcodes  -O2 -pipe  -D__USE_MINGW_ACCESS -c -o sis.o -MT sis.o -MMD -MP -MF .deps/sis.Tpo ../../../gdb-7.9/sim/erc32/sis.c
> ../../../gdb-7.9/sim/erc32/sis.c: In function 'main':
> ../../../gdb-7.9/sim/erc32/sis.c:239:25: error: 'F_GETFL' undeclared (first use in this function)
>      termsave = fcntl(0, F_GETFL, 0);
>                          ^
> ../../../gdb-7.9/sim/erc32/sis.c:239:25: note: each undeclared identifier is reported only once for each function it appears in
> Makefile:538: recipe for target 'sis.o' failed
> make[3]: Leaving directory '/tmp/rtems-source-builder/rtems/build/sparc-rtems4.11-gdb-7.9-i686-w64-mingw32-1/build-cxc/sim/erc32'

This is POSIX code in the simulators not building on Windows.

> 
> 
> As far as I understand, fcntl() is not supported by MinGW.
> I guess that RSB should not build the simulators for this reason, as I discovered the following in /rtems/config/4.11/rtems-sparc.bset:
> 
> #
> # If Windows (MinGW) do not build the simulator.
> #
> %define win32-gdb-disable-sim
> 
> However, in the RSB logs I see that GDB configure gets invoked with '--enable-sim' instead of disabling it.
> 
> === configuring in testsuite (/tmp/rtems-source-builder/rtems/build/sparc-rtems4.11-gdb-7.9-i686-w64-mingw32-1/build-cxc/gdb/testsuite)
> configure: running /bin/bash ../../../gdb-7.9/gdb/testsuite/configure --disable-option-checking '--prefix=/opt/sparc-rtems4.11-mingw'  '--with-system-zlib' '--verbose' '--disable-nls' '--without-included-gettext' '--disable-win32-registry' '--disable-werror' '--enable-sim' '--without-zlib' '--with-expat' '--bindir=/opt/sparc-rtems4.11-mingw/bin' '--exec-prefix=/opt/sparc-rtems4.11-mingw' '--includedir=/opt/sparc-rtems4.11-mingw/include' '--libdir=/opt/sparc-rtems4.11-mingw/lib' '--mandir=/opt/sparc-rtems4.11-mingw/share/man' '--infodir=/opt/sparc-rtems4.11-mingw/share/info' '--program-transform-name=s&^&sparc-rtems4.11-&' '--build=x86_64-linux-gnu' '--host=i686-w64-mingw32' '--target=sparc-rtems4.11' 'build_alias=x86_64-linux-gnu' 'host_alias=i686-w64-mingw32' 'target_alias=sparc-rtems4.11' 'CC=i686-w64-mingw32-gcc' 'CFLAGS=-O2 -pipe  -D__USE_MINGW_ACCESS' 'LDFLAGS=-static-libstdc++ -static-libgcc -L/tmp/rtems-source-builder/rtems/build/tmp/sb-root/4.11/rtems-sparc/opt/spa!
 rc-rtems4.
1
>  1-mingw/lib -Wl,--stack,12582912' 'MAKEINFO=makeinfo --split-size=5000000' 'YACC=bison -y' --cache-file=.././config.cache --srcdir=../../../gdb-7.9/gdb/testsuite
> configure: loading cache .././config.cache
> 
> Any comments are appreciated.

It seems something has broken. The simulators use to be disabled on
Windows and have been enabled. I thought the simulators had been fixed
but I must have been wrong. I would like to fix the simulators and have
them work on Windows.

Chris


More information about the users mailing list