Date: Sat, 21 Mar 2015 23:50:49 -0700 From: Mark Millard <markmi@dsl-only.net> To: freebsd-toolchain@freebsd.org Cc: FreeBSD PowerPC ML <freebsd-ppc@freebsd.org> Subject: 11.0-CURRENT -r276514's ncurses .vs gcc5-based buildworld: the generated lib_gen.c has problems Message-ID: <65C07062-4CB6-4AAD-B5EC-63A9952CA496@dsl-only.net>
next in thread | raw e-mail | index | archive | help
Basic context (more details later): I ran into the below while exploring FreeBSD via a powerpc64 context. = But unlike most things I've run into this is probably not powerpc64 (or = powerpc) context specific. Nor does it appear to be as simple as the = out-of-order and/or incomplete includes issue that I ran into. gcc5 use is not likely where anyone is focused either. Still I figured I'd send out this note about the oddity as a FYI. > # dmesg | head > ... > FreeBSD 11.0-CURRENT #1 r279514M: Sat Mar 21 05:15:23 PDT 2015 > root@FBSDG5C0:/usr/obj/usr/srcC/sys/GENERIC64vtsc-NODEBUG powerpc > gcc version 4.9.1 (FreeBSD Ports Collection for powerpc64)=20 > ... (I used powerpc64-xtoolchain-gcc in a powerpc64 context to self-host, = WITHOUT_CLANG=3D WITHOUT_LLDB=3D WITHOUT_GCC=3D WITHOUT_GNUCXX=3D = WITHOUT_BOOT=3D WITHOUT_LIB32=3D .) > # freebsd-version -ku; uname -apKU = = 11.0-CURRENT > 11.0-CURRENT > FreeBSD FBSDG5C0 11.0-CURRENT FreeBSD 11.0-CURRENT #1 r279514M: Sat = Mar 21 05:15:23 PDT 2015 = root@FBSDG5C0:/usr/obj/usr/srcC/sys/GENERIC64vtsc-NODEBUG powerpc = powerpc64 1100062 1100062 > make -j 8 \ > WITHOUT_CLANG_BOOTSTRAP=3D WITHOUT_CLANG=3D WITHOUT_CLANG_IS_CC=3D \ > WITHOUT_LLDB=3D \ > WITH_GCC_BOOTSTRAP=3D WITH_GCC=3D WITHOUT_GNUCXX=3D \ > WITH_BOOT=3D WITH_LIB32=3D \ > buildworld buildkernel \ > KERNCONF=3DGENERIC64vtsc-NODEBUG > TARGET=3Dpowerpc TARGET_ARCH=3Dpowerpc64 For the context set by the following in order to use gcc5/g++5/... : > # more /etc/src.conf=20 > NO_WERROR=3D > WITH_LIBCPLUSPLUS=3D > # > # > # For trying gcc5... > # > CC=3D/usr/local/bin/gcc5 > CXX=3D/usr/local/bin/g++5 > CPP=3D/usr/local/bin/cpp5 > AS=3D/usr/local/powerpc64-portbld-freebsd11.0/bin/as > R=3D/usr/local/powerpc64-portbld-freebsd11.0/bin/ar > LD=3D/usr/local/powerpc64-portbld-freebsd11.0/bin/ld > NM=3D/usr/local/powerpc64-portbld-freebsd11.0/bin/nm > OBJCOPY=3D/usr/local/powerpc64-portbld-freebsd11.0/bin/objcopy > OBJDUMP=3D/usr/local/powerpc64-portbld-freebsd11.0/bin/objdump > RANLIB=3D/usr/local/powerpc64-portbld-freebsd11.0/bin/ranlib > SIZE=3D/usr/local/powerpc64-portbld-freebsd11.0/bin/size > STRINGS=3D/usr/local/powerpc64-portbld-freebsd11.0/bin/strings The problem when gcc5 was used: > /usr/local/bin/gcc5 -O2 -pipe -I. = -I/usr/obj/usr/srcC/lib/ncurses/ncurses/../ncurses = -I/usr/srcC/lib/ncurses/ncurses/../ncurses = -I/usr/srcC/lib/ncurses/ncurses/../ncurses = -I/usr/srcC/lib/ncurses/ncurses/../../../contrib/ncurses/include = -I/usr/srcC/lib/ncurses/ncurses/../../../contrib/ncurses/ncurses -Wall = -DNDEBUG -DHAVE_CONFIG_H -DFREEBSD_NATIVE -DTERMIOS -std=3Dgnu99 = -fstack-protector -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 > _2624.c:754:3: error: "_Bool" after # is not a positive integer > In file included from = /usr/srcC/lib/ncurses/ncurses/../../../contrib/ncurses/ncurses/curses.priv= .h:313:0, > from lib_gen.c:19: > _2624.c:755:2: error: expected ')' before 'int' > *** Error code 1 >=20 > Stop. > make[4]: stopped in /usr/srcC/lib/ncurses/ncurses > *** Error code 1 Comparing the tail of the generated lib_gen.c from another 11.0-CURRENT = (non-gcc5) tree that I have around... First the tail from that other tree (the normal one): > # tail -20 lib_gen.c | more > T((T_CALLED("getmaxy(%p)"), (const void *)z)); returnCode(((z) = ? ((z)->_maxy + 1) : (-1))); > } >=20 >=20 > NCURSES_EXPORT(int) (getparx) (const WINDOW * z) > { > T((T_CALLED("getparx(%p)"), (const void *)z)); returnCode(((z) = ? (z)->_parx : (-1))); > } >=20 >=20 > NCURSES_EXPORT(int) (getpary) (const WINDOW * z) > { > T((T_CALLED("getpary(%p)"), (const void *)z)); returnCode(((z) = ? (z)->_pary : (-1))); > } >=20 >=20 > NCURSES_EXPORT(NCURSES_BOOL) (mouse_trafo) (int * a1, int * a2, = NCURSES_BOOL z) > { > T((T_CALLED("mouse_trafo(%p,%p,%#lx)"), (const void *)a1, = (const void *)a2, (long)z)); returnBool(wmouse_trafo(stdscr,a1,a2,z)); > } Then the tail for the generated file from the gcc5 based tree (the odd = one): > # tail -20 lib_gen.c >=20 >=20 > NCURSES_EXPORT(int) (getpary) (const WINDOW * z) > { > T((T_CALLED("getpary(%p)"), (const void *)z)); returnCode(((z) ? = (z)->_pary : (-1))); > } >=20 >=20 >=20 > # 753 "_2624.c" 3 4 > NCURSES_BOOL=20 > # 753 "_2624.c" > mouse_trafo (int * a1, int * a2,=20 > # 753 "_2624.c" 3 4 > NCURSES_BOOL=20 > # 753 "_2624.c" > z) > { > T((T_CALLED("mouse_trafo(%p,%p,%#lx)"), (const void *)a1, (const = void *)a2, (long)z)); returnBool(wmouse_trafo(stdscr,a1,a2,z)); > } Context details: # more /etc/make.conf WRKDIRPREFIX=3D/usr/obj/portswork #WITH_DEBUG=3D MALLOC_PRODUCTION=3D # svnlite info /usr/srcC/ Path: /usr/srcC Working Copy Root Path: /usr/srcC URL: https://svn0.us-west.freebsd.org/base/head Relative URL: ^/head Repository Root: https://svn0.us-west.freebsd.org/base Repository UUID: ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f Revision: 279514 Node Kind: directory Schedule: normal Last Changed Author: adrian Last Changed Rev: 279514 Last Changed Date: 2015-03-01 18:27:25 -0800 (Sun, 01 Mar 2015) # svnlite info /usr/ports/lang/gcc5 Path: /usr/ports/lang/gcc5 Working Copy Root Path: /usr/ports URL: https://svn0.us-west.freebsd.org/ports/head/lang/gcc5 Relative URL: ^/head/lang/gcc5 Repository Root: https://svn0.us-west.freebsd.org/ports Repository UUID: 35697150-7ecd-e111-bb59-0022644237b5 Revision: 381120 Node Kind: directory Schedule: normal Last Changed Author: gerald Last Changed Rev: 380943 Last Changed Date: 2015-03-10 10:00:25 -0700 (Tue, 10 Mar 2015) =3D=3D=3D Mark Millard markmi at dsl-only.net
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?65C07062-4CB6-4AAD-B5EC-63A9952CA496>