From owner-freebsd-toolchain@freebsd.org Mon Nov 28 03:01:41 2016 Return-Path: Delivered-To: freebsd-toolchain@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 6D1BEC586E8 for ; Mon, 28 Nov 2016 03:01:41 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: from asp.reflexion.net (outbound-mail-210-31.reflexion.net [208.70.210.31]) (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 326833F4 for ; Mon, 28 Nov 2016 03:01:40 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: (qmail 22375 invoked from network); 28 Nov 2016 03:02:14 -0000 Received: from unknown (HELO mail-cs-02.app.dca.reflexion.local) (10.81.19.2) by 0 (rfx-qmail) with SMTP; 28 Nov 2016 03:02:14 -0000 Received: by mail-cs-02.app.dca.reflexion.local (Reflexion email security v8.20.0) with SMTP; Sun, 27 Nov 2016 22:01:40 -0500 (EST) Received: (qmail 13450 invoked from network); 28 Nov 2016 03:01:40 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with (AES256-SHA encrypted) SMTP; 28 Nov 2016 03:01:40 -0000 Received: from [192.168.1.106] (c-76-115-7-162.hsd1.or.comcast.net [76.115.7.162]) by iron2.pdx.net (Postfix) with ESMTPSA id 09FBDEC9011; Sun, 27 Nov 2016 19:01:33 -0800 (PST) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 10.1 \(3251\)) Subject: head -r309179 clang 3.9.0 for TARGET_ARCH=powerpc64 with devel/powerpc64-binutils used: WITH_LIB32= related assembler source rejected. . . Message-Id: Date: Sun, 27 Nov 2016 19:01:32 -0800 Cc: Justin Hibbits , Nathan Whitehorn To: FreeBSD Toolchain , FreeBSD PowerPC ML X-Mailer: Apple Mail (2.3251) X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2016 03:01:41 -0000 [Note: ld from WITH_BINTOOLS_BOOTSTRAP=3D for buildworld fails and stops buildworld. This explains the use of devel/powerpc64-binutils below.] Using clang 3.9.0 for TARGET_ARCH=3Dpowerpc64 with devel/powerpc64-binutils (of an appropriate vintage) apparently requires r1 instead of 1 for a register name --and so on. It turns out that trying to use WITH_LIB32=3D for TARGET_ARCH=3Dpowerpc64 with devel/powerpc64-binutils runs into assembler source files that are rejected for this reason. There are also complaints about invalid mnemonics (mflr and mr). The error reports: (Other files may well have the same sorts of problems.) > --- lib/csu__L --- > Building = /usr/obj/powerpc64vtsc_clang_altbinutils_world/powerpc.powerpc64/usr/src/w= orld32/usr/src/lib/csu/powerpc/crti.o > . . . > --- crti.o --- > /usr/src/lib/csu/powerpc/crti.S:34:13: error: unexpected token in = memory operand > stwu 1,-16(1) > ^ > /usr/src/lib/csu/powerpc/crti.S:35:2: error: invalid instruction = mnemonic 'mflr' > mflr 0 > ^ > /usr/src/lib/csu/powerpc/crti.S:36:12: error: unexpected token in = memory operand > stw 31,12(1) > ^ > /usr/src/lib/csu/powerpc/crti.S:37:11: error: unexpected token in = memory operand > stw 0,20(1) > ^ > /usr/src/lib/csu/powerpc/crti.S:38:2: error: invalid instruction = mnemonic 'mr' > mr 31,1 > ^ > /usr/src/lib/csu/powerpc/crti.S:45:13: error: unexpected token in = memory operand > stwu 1,-16(1) > ^ > /usr/src/lib/csu/powerpc/crti.S:46:2: error: invalid instruction = mnemonic 'mflr' > mflr 0 > ^ > /usr/src/lib/csu/powerpc/crti.S:47:12: error: unexpected token in = memory operand > stw 31,12(1) > ^ > /usr/src/lib/csu/powerpc/crti.S:48:11: error: unexpected token in = memory operand > stw 0,20(1) > ^ > /usr/src/lib/csu/powerpc/crti.S:49:2: error: invalid instruction = mnemonic 'mr' > mr 31,1 > ^ > *** [crti.o] Error code 1 >=20 > make[5]: stopped in /usr/src/lib/csu/powerpc > .ERROR_TARGET=3D'crti.o' > = .ERROR_META_FILE=3D'/usr/obj/powerpc64vtsc_clang_altbinutils_world/powerpc= .powerpc64/usr/src/world32/usr/src/lib/csu/powerpc/crti.o.meta' > .MAKE.LEVEL=3D'5' > MAKEFILE=3D'' > .MAKE.MODE=3D'meta missing-filemon=3Dyes missing-meta=3Dyes silent=3Dyes= verbose' > .CURDIR=3D'/usr/src/lib/csu/powerpc' > .MAKE=3D'make' > = .OBJDIR=3D'/usr/obj/powerpc64vtsc_clang_altbinutils_world/powerpc.powerpc6= 4/usr/src/world32/usr/src/lib/csu/powerpc' > .TARGETS=3D'all' > = DESTDIR=3D'/usr/obj/powerpc64vtsc_clang_altbinutils_world/powerpc.powerpc6= 4/usr/src/lib32' > LD_LIBRARY_PATH=3D'' > MACHINE=3D'powerpc' > MACHINE_ARCH=3D'powerpc' > = MAKEOBJDIRPREFIX=3D'/usr/obj/powerpc64vtsc_clang_altbinutils_world/powerpc= .powerpc64/usr/src/world32' > MAKESYSPATH=3D'/usr/src/share/mk' > MAKE_VERSION=3D'20160818' > = PATH=3D'/usr/obj/powerpc64vtsc_clang_altbinutils_world/powerpc.powerpc64/u= sr/src/tmp/legacy/usr/sbin:/usr/obj/powerpc64vtsc_clang_altbinutils_world/= powerpc.powerpc64/usr/src/tmp/legacy/usr/bin:/usr/obj/powerpc64vtsc_clang_= altbinutils_world/powerpc.powerpc64/usr/src/tmp/legacy/bin:/usr/obj/powerp= c64vtsc_clang_altbinutils_world/powerpc.powerpc64/usr/src/tmp/usr/sbin:/us= r/obj/powerpc64vtsc_clang_altbinutils_world/powerpc.powerpc64/usr/src/tmp/= usr/bin:/sbin:/bin:/usr/sbin:/usr/bin' > SRCTOP=3D'/usr/src' > = OBJTOP=3D'/usr/obj/powerpc64vtsc_clang_altbinutils_world/powerpc.powerpc64= /usr/src/world32/usr/src' > .MAKE.MAKEFILES=3D'/usr/src/share/mk/sys.mk = /usr/src/share/mk/local.sys.env.mk /usr/src/share/mk/src.sys.env.mk = /root/src.configs/src.conf.powerpc64-clang_altbinutils-bootstrap.amd64-hos= t /usr/src/share/mk/bsd.mkopt.mk /usr/src/share/mk/bsd.suffixes.mk = /root/src.configs/make.conf /usr/src/share/mk/local.sys.mk = /usr/src/share/mk/src.sys.mk /dev/null /usr/src/lib/csu/powerpc/Makefile = /usr/src/share/mk/bsd.lib.mk /usr/src/share/mk/bsd.init.mk = /usr/src/share/mk/bsd.opts.mk /usr/src/share/mk/bsd.cpu.mk = /usr/src/share/mk/local.init.mk /usr/src/share/mk/src.init.mk = /usr/src/lib/csu/powerpc/../Makefile.inc = /usr/src/lib/csu/powerpc/../../Makefile.inc /usr/src/share/mk/bsd.own.mk = /usr/src/share/mk/bsd.compiler.mk /usr/src/share/mk/bsd.libnames.mk = /usr/src/share/mk/src.libnames.mk /usr/src/share/mk/src.opts.mk = /usr/src/share/mk/bsd.symver.mk /usr/src/share/mk/bsd.nls.mk = /usr/src/share/mk/bsd.files.mk /usr/src/share/mk/bsd.incs.mk = /usr/src/share/mk/bsd.confs.mk /usr/src/share/mk/bsd.links.mk = /usr/src/share/mk/bsd.dep.mk /usr/src/share/mk/bsd.clang-analyze.mk = /usr/src/share/mk/bsd.obj.mk /usr/src/share/mk/bsd.subdir.mk = /usr/src/share/mk/bsd.sys.mk' > .PATH=3D'. /usr/src/lib/csu/powerpc = /usr/src/lib/csu/powerpc/../common' > --- lib/libc_nonshared__L --- > Building = /usr/obj/powerpc64vtsc_clang_altbinutils_world/powerpc.powerpc64/usr/src/w= orld32/usr/src/lib/libc_nonshared/iconv.o > --- lib/csu__L --- > 1 error The .meta report: > # more = /usr/obj/powerpc64vtsc_clang_altbinutils_world/powerpc.powerpc64/usr/src/w= orld32/usr/src/lib/csu/powerpc/crti.o.meta > # Meta data file = /usr/obj/powerpc64vtsc_clang_altbinutils_world/powerpc.powerpc64/usr/src/w= orld32/usr/src/lib/csu/powerpc/crti.o.meta > CMD /usr/bin/clang -m32 -DCOMPAT_32BIT -mcpu=3Dpowerpc = -L/usr/obj/powerpc64vtsc_clang_altbinutils_world/powerpc.powerpc64/usr/src= /lib32/usr/lib32 = --sysroot=3D/usr/obj/powerpc64vtsc_clang_altbinutils_world/powerpc.powerpc= 64/usr/src/lib32 -B/usr/local/powerpc64-freebsd/bin/ = -B/usr/obj/powerpc64vtsc_clang_altbinutils_world/powerpc.powerpc64/usr/src= /lib32/usr/lib32 -O2 -pipe -I/usr/src/lib/csu/powerpc/../common = -I/usr/src/lib/csu/powerpc/../../libc/include -std=3Dgnu99 = -Wsystem-headers -Wall -Wno-format-y2k -W -Wno-unused-parameter = -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type = -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter = -Wcast-align -Wchar-subscripts -Winline -Wnested-externs = -Wredundant-decls -Wold-style-definition -Wno-pointer-sign = -Wthread-safety -Wno-empty-body -Wno-string-plus-int = -Wno-unused-const-variable -Qunused-arguments -c = /usr/src/lib/csu/powerpc/crti.S -o crti.o > CMD=20 > CWD = /usr/obj/powerpc64vtsc_clang_altbinutils_world/powerpc.powerpc64/usr/src/w= orld32/usr/src/lib/csu/powerpc > TARGET crti.o > -- command output -- > /usr/src/lib/csu/powerpc/crti.S:34:13: error: unexpected token in = memory operand > stwu 1,-16(1) > ^ > /usr/src/lib/csu/powerpc/crti.S:35:2: error: invalid instruction = mnemonic 'mflr' > mflr 0 > ^ > /usr/src/lib/csu/powerpc/crti.S:36:12: error: unexpected token in = memory operand > stw 31,12(1) > ^ > /usr/src/lib/csu/powerpc/crti.S:37:11: error: unexpected token in = memory operand > stw 0,20(1) > ^ > /usr/src/lib/csu/powerpc/crti.S:38:2: error: invalid instruction = mnemonic 'mr' > mr 31,1 > ^ > /usr/src/lib/csu/powerpc/crti.S:45:13: error: unexpected token in = memory operand > stwu 1,-16(1) > ^ > /usr/src/lib/csu/powerpc/crti.S:46:2: error: invalid instruction = mnemonic 'mflr' > mflr 0 > ^ > /usr/src/lib/csu/powerpc/crti.S:47:12: error: unexpected token in = memory operand > stw 31,12(1) > ^ > /usr/src/lib/csu/powerpc/crti.S:48:11: error: unexpected token in = memory operand > stw 0,20(1) > ^ > /usr/src/lib/csu/powerpc/crti.S:49:2: error: invalid instruction = mnemonic 'mr' > mr 31,1 > ^ > *** Error code 1 >=20 > -- filemon acquired metadata -- . . . Supporting details: > # more = ~/src.configs/src.conf.powerpc64-clang_altbinutils-bootstrap.amd64-host=20= > TO_TYPE=3Dpowerpc64 > TOOLS_TO_TYPE=3D${TO_TYPE} > VERSION_CONTEXT=3D12.0 > # > KERNCONF=3DGENERIC64vtsc-NODBG > TARGET=3Dpowerpc > .if ${.MAKE.LEVEL} =3D=3D 0 > TARGET_ARCH=3D${TO_TYPE} > .export TARGET_ARCH > .endif > # > WITH_CROSS_COMPILER=3D > WITHOUT_SYSTEM_COMPILER=3D > # > WITH_LIBCPLUSPLUS=3D > WITHOUT_BINUTILS_BOOTSTRAP=3D > WITH_CLANG_BOOTSTRAP=3D > WITH_CLANG=3D > WITH_CLANG_IS_CC=3D > WITH_CLANG_FULL=3D > WITH_CLANG_EXTRAS=3D > WITH_LLDB=3D > # > WITH_BOOT=3D > WITH_LIB32=3D > # > WITHOUT_ELFTOOLCHAIN_BOOTSTRAP=3D > WITHOUT_GCC_BOOTSTRAP=3D > WITHOUT_GCC=3D > WITHOUT_GCC_IS_CC=3D > WITHOUT_GNUCXX=3D > # > NO_WERROR=3D > #WERROR=3D > MALLOC_PRODUCTION=3D > # > WITH_DEBUG_FILES=3D > # > # > # For TO (so-called "cross") stages . . . > # So-called-cross via ${TO_TYPE}-xtoolchain-gcc/${TO_TYPE}-gcc. . . > # TOOLS_TO_TYPE based on ${TO_TYPE}-xtoolchain-gcc related binutils. . = . > # > CROSS_BINUTILS_PREFIX=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/ > .if ${.MAKE.LEVEL} =3D=3D 0 > XAS=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/as > XAR=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/ar > XLD=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/ld > XNM=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/nm > XOBJCOPY=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/objcopy > XOBJDUMP=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/objdump > XRANLIB=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/ranlib > XSIZE=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/size > #NO-SUCH: XSTRINGS=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/strings > XSTRINGS=3D/usr/local/bin/${TOOLS_TO_TYPE}-freebsd-strings > .export XAS > .export XAR > .export XLD > .export XNM > .export XOBJCOPY > .export XOBJDUMP > .export XRANLIB > .export XSIZE > .export XSTRINGS > .endif > # > # > # =46rom based on clang (via system). . . > # > .if ${.MAKE.LEVEL} =3D=3D 0 > CC=3D/usr/bin/clang > CXX=3D/usr/bin/clang++ > CPP=3D/usr/bin/clang-cpp > .export CC > .export CXX > .export CPP > .endif head -r309179 needed a workaround to build: > # svnlite diff /usr/src/sys/netipsec/keydb.h > Index: /usr/src/sys/netipsec/keydb.h > =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/sys/netipsec/keydb.h (revision 309179) > +++ /usr/src/sys/netipsec/keydb.h (working copy) > @@ -35,6 +35,7 @@ > =20 > #ifdef _KERNEL > =20 > +#include > #include > =20 > #include Such a change was later checked in as -r309201 . =3D=3D=3D Mark Millard markmi at dsl-only.net