gcc-5 doesn't compile a freebsd-head mips32 tree

Alexander Kabaev kabaev at gmail.com
Mon Aug 24 04:39:04 UTC 2015


On Sun, 23 Aug 2015 17:16:36 -0700
Adrian Chadd <adrian at freebsd.org> wrote:

> Hi,
> 
> Here's what happens when I try compiling with:
> 
> mips-gcc-5.2.0                 Cross GNU Compiler Collection for mips
> mips-xtoolchain-gcc-0.1        Pre seeded toolchain to cross build
> FreeBSD base mips64-gcc-5.2.0               Cross GNU Compiler
> Collection for mips64 mips64-xtoolchain-gcc-0.1      Pre seeded
> toolchain to cross build FreeBSD base
> 
> adrian at hulk:~/work/freebsd/head-embedded/src % env
> MAKEOBJDIRPREFIX=/home/adrian/work/freebsd/head-embedded/obj-test make
> DB_FROM_SRC=1 TARGET=mips TARGET_ARCH=mips NO_WERROR=1
> CROSS_TOOLCHAIN=mips-gcc TARGET_CPUTYPE=mips32 CPUTYPE=mips32
> buildworld
> 
> ...
> 
> /usr/local/bin/mips-portbld-freebsd11.0-gcc -isystem
> /home/adrian/work/freebsd/head-embedded/obj-test/mips.mips/usr/home/adrian/work/freebsd/head-embedded/src/tmp/usr/include
> -L/home/adrian/work/freebsd/head-embedded/obj-test/mips.mips/usr/home/adrian/work/freebsd/head-embedded/src/tmp/usr/lib
> --sysroot=/home/adrian/work/freebsd/head-embedded/obj-test/mips.mips/usr/home/adrian/work/freebsd/head-embedded/src/tmp
> -B/usr/local/mips-freebsd/bin/  -O -pipe -G0 -march=mips32
> -msoft-float  -I.
> -I/home/adrian/work/freebsd/head-embedded/obj-test/mips.mips/usr/home/adrian/work/freebsd/head-embedded/src/lib/ncurses/ncurses/../ncurses
> -I/usr/home/adrian/work/freebsd/head-embedded/src/lib/ncurses/ncurses/../ncurses
> -I/usr/home/adrian/work/freebsd/head-embedded/src/lib/ncurses/ncurses/../ncurses
> -I/usr/home/adrian/work/freebsd/head-embedded/src/lib/ncurses/ncurses/../../../contrib/ncurses/include
> -I/usr/home/adrian/work/freebsd/head-embedded/src/lib/ncurses/ncurses/../../../contrib/ncurses/ncurses
> -Wall -DNDEBUG -DHAVE_CONFIG_H -DFREEBSD_NATIVE -DTERMIOS -std=gnu99
> -Wsystem-headers -Wall -Wno-format-y2k -W -Wno-unused-parameter
> -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith
> -Wno-uninitialized -Wno-pointer-sign   -c codes.c -o codes.o
> /usr/local/bin/mips-portbld-freebsd11.0-gcc -isystem
> /home/adrian/work/freebsd/head-embedded/obj-test/mips.mips/usr/home/adrian/work/freebsd/head-embedded/src/tmp/usr/include
> -L/home/adrian/work/freebsd/head-embedded/obj-test/mips.mips/usr/home/adrian/work/freebsd/head-embedded/src/tmp/usr/lib
> --sysroot=/home/adrian/work/freebsd/head-embedded/obj-test/mips.mips/usr/home/adrian/work/freebsd/head-embedded/src/tmp
> -B/usr/local/mips-freebsd/bin/  -O -pipe -G0 -march=mips32
> -msoft-float  -I.
> -I/home/adrian/work/freebsd/head-embedded/obj-test/mips.mips/usr/home/adrian/work/freebsd/head-embedded/src/lib/ncurses/ncurses/../ncurses
> -I/usr/home/adrian/work/freebsd/head-embedded/src/lib/ncurses/ncurses/../ncurses
> -I/usr/home/adrian/work/freebsd/head-embedded/src/lib/ncurses/ncurses/../ncurses
> -I/usr/home/adrian/work/freebsd/head-embedded/src/lib/ncurses/ncurses/../../../contrib/ncurses/include
> -I/usr/home/adrian/work/freebsd/head-embedded/src/lib/ncurses/ncurses/../../../contrib/ncurses/ncurses
> -Wall -DNDEBUG -DHAVE_CONFIG_H -DFREEBSD_NATIVE -DTERMIOS -std=gnu99
> -Wsystem-headers -Wall -Wno-format-y2k -W -Wno-unused-parameter
> -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith
> -Wno-uninitialized -Wno-pointer-sign   -c expanded.c -o expanded.o
> /usr/local/bin/mips-portbld-freebsd11.0-gcc -isystem
> /home/adrian/work/freebsd/head-embedded/obj-test/mips.mips/usr/home/adrian/work/freebsd/head-embedded/src/tmp/usr/include
> -L/home/adrian/work/freebsd/head-embedded/obj-test/mips.mips/usr/home/adrian/work/freebsd/head-embedded/src/tmp/usr/lib
> --sysroot=/home/adrian/work/freebsd/head-embedded/obj-test/mips.mips/usr/home/adrian/work/freebsd/head-embedded/src/tmp
> -B/usr/local/mips-freebsd/bin/  -O -pipe -G0 -march=mips32
> -msoft-float  -I.
> -I/home/adrian/work/freebsd/head-embedded/obj-test/mips.mips/usr/home/adrian/work/freebsd/head-embedded/src/lib/ncurses/ncurses/../ncurses
> -I/usr/home/adrian/work/freebsd/head-embedded/src/lib/ncurses/ncurses/../ncurses
> -I/usr/home/adrian/work/freebsd/head-embedded/src/lib/ncurses/ncurses/../ncurses
> -I/usr/home/adrian/work/freebsd/head-embedded/src/lib/ncurses/ncurses/../../../contrib/ncurses/include
> -I/usr/home/adrian/work/freebsd/head-embedded/src/lib/ncurses/ncurses/../../../contrib/ncurses/ncurses
> -Wall -DNDEBUG -DHAVE_CONFIG_H -DFREEBSD_NATIVE -DTERMIOS -std=gnu99
> -Wsystem-headers -Wall -Wno-format-y2k -W -Wno-unused-parameter
> -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith
> -Wno-uninitialized -Wno-pointer-sign   -c fallback.c -o fallback.o
> /usr/local/bin/mips-portbld-freebsd11.0-gcc -isystem
> /home/adrian/work/freebsd/head-embedded/obj-test/mips.mips/usr/home/adrian/work/freebsd/head-embedded/src/tmp/usr/include
> -L/home/adrian/work/freebsd/head-embedded/obj-test/mips.mips/usr/home/adrian/work/freebsd/head-embedded/src/tmp/usr/lib
> --sysroot=/home/adrian/work/freebsd/head-embedded/obj-test/mips.mips/usr/home/adrian/work/freebsd/head-embedded/src/tmp
> -B/usr/local/mips-freebsd/bin/  -O -pipe -G0 -march=mips32
> -msoft-float  -I.
> -I/home/adrian/work/freebsd/head-embedded/obj-test/mips.mips/usr/home/adrian/work/freebsd/head-embedded/src/lib/ncurses/ncurses/../ncurses
> -I/usr/home/adrian/work/freebsd/head-embedded/src/lib/ncurses/ncurses/../ncurses
> -I/usr/home/adrian/work/freebsd/head-embedded/src/lib/ncurses/ncurses/../ncurses
> -I/usr/home/adrian/work/freebsd/head-embedded/src/lib/ncurses/ncurses/../../../contrib/ncurses/include
> -I/usr/home/adrian/work/freebsd/head-embedded/src/lib/ncurses/ncurses/../../../contrib/ncurses/ncurses
> -Wall -DNDEBUG -DHAVE_CONFIG_H -DFREEBSD_NATIVE -DTERMIOS -std=gnu99
> -Wsystem-headers -Wall -Wno-format-y2k -W -Wno-unused-parameter
> -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith
> -Wno-uninitialized -Wno-pointer-sign   -c lib_gen.c -o lib_gen.o
> In file included from
> /usr/home/adrian/work/freebsd/head-embedded/src/lib/ncurses/ncurses/../../../contrib/ncurses/ncurses/curses.priv.h:313:0,
>                  from lib_gen.c:19:
> _35425.c:753:15: error: expected ')' before 'int'
> ./curses.h:1631:56: note: in definition of macro 'mouse_trafo'
>  #define mouse_trafo(y,x,to_screen) wmouse_trafo(stdscr,y,x,to_screen)
>                                                         ^
> *** Error code 1
> 
> .. I'd really appreciate some help on chasing down what's going on.
> I'm guessing it's some kind of odd macro expansion hilarity with
> something that is now defined when we use gcc-5. :(
> 
> Thanks,
> 
> 
> 
> -a
> _______________________________________________
> freebsd-mips at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-mips
> To unsubscribe, send any mail to
> "freebsd-mips-unsubscribe at freebsd.org"

It looks like GCC 5 made some preprocessor changes that make ncurses
build system cry. I extracted the attached change from ncurses
upstream that sees to be working. Not tested with clang and universe
yet.

-- 
Alexander Kabaev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: a
Type: application/octet-stream
Size: 1734 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-mips/attachments/20150824/124bc0fc/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 949 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-mips/attachments/20150824/124bc0fc/attachment.bin>


More information about the freebsd-mips mailing list