From owner-freebsd-ppc@freebsd.org Sun Oct 4 11:14:13 2015 Return-Path: Delivered-To: freebsd-ppc@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CE5109D0011 for ; Sun, 4 Oct 2015 11:14:13 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: from asp.reflexion.net (outbound-mail-210-1.reflexion.net [208.70.210.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8FCDA18AF for ; Sun, 4 Oct 2015 11:14:13 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: (qmail 9078 invoked from network); 4 Oct 2015 11:14:12 -0000 Received: from unknown (HELO rtc-sm-01.app.dca.reflexion.local) (10.81.150.1) by 0 (rfx-qmail) with SMTP; 4 Oct 2015 11:14:12 -0000 Received: by rtc-sm-01.app.dca.reflexion.local (Reflexion email security v7.70.2) with SMTP; Sun, 04 Oct 2015 07:14:11 -0400 (EDT) Received: (qmail 28085 invoked from network); 4 Oct 2015 11:14:11 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with (AES256-SHA encrypted) SMTP; 4 Oct 2015 11:14:11 -0000 X-No-Relay: not in my network X-No-Relay: not in my network Received: from [192.168.1.109] (c-67-170-167-181.hsd1.or.comcast.net [67.170.167.181]) by iron2.pdx.net (Postfix) with ESMTPSA id 92B871C43C3; Sun, 4 Oct 2015 04:14:09 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Subject: Re: bt_split.c error: dereferencing type-punned pointer will break strict-aliasing rules (powerpc64-xtoolchain use) From: Mark Millard In-Reply-To: <191CDC2D-7A74-41D2-B433-B6D9F6D87D32@dsl-only.net> Date: Sun, 4 Oct 2015 04:14:10 -0700 Cc: freebsd-toolchain@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <191CDC2D-7A74-41D2-B433-B6D9F6D87D32@dsl-only.net> To: FreeBSD PowerPC ML X-Mailer: Apple Mail (2.2104) X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Oct 2015 11:14:14 -0000 I should have also reported as context details what does not exist: /etc/make.conf and /etc/src.conf do not even exist and so do not contribute anything. The original message follows. =3D=3D=3D Mark Millard markmi at dsl-only.net On 2015-Oct-4, at 04:06 AM, Mark Millard wrote: The Problem: root@FreeBSDx64:/usr/src # make -j 7 CROSS_TOOLCHAIN=3Dpowerpc64-gcc = buildworld buildkernel KERNCONF=3DGENERIC64-NODBG TARGET=3Dpowerpc = TARGET_ARCH=3Dpowerpc64 . . . --- bt_split.So --- /usr/local/bin/powerpc64-portbld-freebsd11.0-gcc -isystem = /usr/obj/powerpc.powerpc64/usr/src/tmp/usr/include = -L/usr/obj/powerpc.powerpc64/usr/src/tmp/usr/lib = --sysroot=3D/usr/obj/powerpc.powerpc64/usr/src/tmp = -B/usr/local/powerpc64-freebsd/bin/ -fpic -DPIC -O2 -pipe = -I/usr/src/lib/libc/include -I/usr/src/lib/libc/../../include = -I/usr/src/lib/libc/powerpc64 -DNLS -D__DBINTERFACE_PRIVATE = -I/usr/src/lib/libc/../../contrib/gdtoa = -I/usr/src/lib/libc/../../contrib/libc-vis -DINET6 = -I/usr/obj/powerpc.powerpc64/usr/src/lib/libc -I/usr/src/lib/libc/resolv = -D_ACL_PRIVATE -DPOSIX_MISTAKE -I/usr/src/lib/libc/../libmd = -I/usr/src/lib/libc/../../contrib/jemalloc/include = -I/usr/src/lib/libc/../../contrib/tzcode/stdtime = -I/usr/src/lib/libc/stdtime -I/usr/src/lib/libc/locale -DBROKEN_DES = -DPORTMAP -DDES_BUILTIN -I/usr/src/lib/libc/rpc -DYP -DNS_CACHING = -DSYMBOL_VERSIONING -std=3Dgnu99 -fstack-protector -Wsystem-headers = -Werror -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign = -I/usr/src/lib/libutil -I/usr/src/lib/msun/powerpc = -I/usr/src/lib/msun/src -c /usr/src/lib/libc/db/btree/bt_split.c -o = bt_split.So . . . --- bt_split.So --- /usr/src/lib/libc/db/btree/bt_split.c: In function '__bt_split': /usr/src/lib/libc/db/btree/bt_split.c:240:8: error: dereferencing = type-punned pointer will break strict-aliasing rules = [-Werror=3Dstrict-aliasing] bt_preserve(t, *(pgno_t *)bl->bytes) =3D=3D RET_ERROR) ^ /usr/src/lib/libc/db/btree/bt_split.c: In function 'bt_broot': /usr/src/lib/libc/db/btree/bt_split.c:548:7: error: dereferencing = type-punned pointer will break strict-aliasing rules = [-Werror=3Dstrict-aliasing] bt_preserve(t, *(pgno_t *)bl->bytes) =3D=3D RET_ERROR) ^ . . . --- bt_split.So --- cc1: all warnings being treated as errors *** [bt_split.So] Error code 1 make[4]: stopped in /usr/src/lib/libc 1 error . . . The context details follow. Mac OS X 10.10.5 using a VirtualBox V5.0.4 VM with. . . root@FreeBSDx64:/usr/src # freebsd-version -ku; uname -aKU 11.0-CURRENT 11.0-CURRENT FreeBSD FreeBSDx64 11.0-CURRENT FreeBSD 11.0-CURRENT #0 r288459: Sat Oct = 3 03:42:08 PDT 2015 = root@FreeBSDx64:/usr/obj/usr/src/sys/GENERIC-NODEBUG amd64 1100079 = 1100079 root@FreeBSDx64:/usr/src # svnlite info /usr/src Path: . Working Copy Root Path: /usr/src URL: https://svn.freebsd.org/base/head Relative URL: ^/head Repository Root: https://svn.freebsd.org/base Repository UUID: ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f Revision: 288459 Node Kind: directory Schedule: normal Last Changed Author: gjb Last Changed Rev: 288459 Last Changed Date: 2015-10-01 12:48:10 -0700 (Thu, 01 Oct 2015) root@FreeBSDx64:/usr/src # svnlite info /usr/ports Path: /usr/ports Working Copy Root Path: /usr/ports URL: https://svn.freebsd.org/ports/head Relative URL: ^/head Repository Root: https://svn.freebsd.org/ports Repository UUID: 35697150-7ecd-e111-bb59-0022644237b5 Revision: 398559 Node Kind: directory Schedule: normal Last Changed Author: jbeich Last Changed Rev: 398559 Last Changed Date: 2015-10-03 17:42:55 -0700 (Sat, 03 Oct 2015) root@FreeBSDx64:/usr/src # portmaster --list-origins net/avahi devel/boost-all lang/clang37 ports-mgmt/dialog4ports lang/gcc5 devel/git-lite x11/lumina www/midori net/netatalk3 ports-mgmt/pkg ports-mgmt/portmaster devel/powerpc64-xtoolchain-gcc devel/qtcreator security/sudo mail/thunderbird emulators/virtualbox-ose-additions Very little is non-default source code. . . root@FreeBSDx64:/usr/src # svnlite status /usr/src M /usr/src/lib/csu/powerpc64/Makefile ? /usr/src/sys/arm/conf/RPI2-NODBG ? /usr/src/sys/powerpc/conf/GENERIC64-NODBG root@FreeBSDx64:/usr/src # svnlite status /usr/ports ? /usr/ports/ion root@FreeBSDx64:/usr/src # more = /usr/src/sys/powerpc/conf/GENERIC64-NODBG=20 . . . (comments omitted) . . . include GENERIC64 ident GENERIC-NODBG nooptions INVARIANTS nooptions INVARIANT_SUPPORT nooptions WITNESS nooptions WITNESS_SKIPSPIN nooptions DEADLKRES The following is my personal, local workaround for = /usr/src/lib/csu/powerpc64/Makefile forcing use of the gcc command even = when the context does not have one. root@FreeBSDx64:/usr/src # svnlite diff /usr/src Index: /usr/src/lib/csu/powerpc64/Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- /usr/src/lib/csu/powerpc64/Makefile (revision 288459) +++ /usr/src/lib/csu/powerpc64/Makefile (working copy) @@ -13,8 +13,8 @@ # clang doesn't support -mlongcall, and testing shows a clang linked = with a # clang-built csu segfaults, this must currently be compiled with gcc. = Once # clang supports -mlongcall, or we get a fixed ld, this can be = revisited. -CC:=3D gcc -COMPILER_TYPE:=3D gcc +CC?=3D $(XCC) +#COMPILER_TYPE:=3D gcc FILES=3D ${OBJS} FILESMODE=3D ${LIBMODE} =3D=3D=3D Mark Millard markmi at dsl-only.net