From owner-freebsd-ppc@freebsd.org Sun Dec 4 02:54:11 2016 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 3247FC66267 for ; Sun, 4 Dec 2016 02:54:11 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: from asp.reflexion.net (outbound-mail-210-4.reflexion.net [208.70.210.4]) (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 DA60C1C8F for ; Sun, 4 Dec 2016 02:54:10 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: (qmail 16975 invoked from network); 4 Dec 2016 02:54:03 -0000 Received: from unknown (HELO mail-cs-01.app.dca.reflexion.local) (10.81.19.1) by 0 (rfx-qmail) with SMTP; 4 Dec 2016 02:54:03 -0000 Received: by mail-cs-01.app.dca.reflexion.local (Reflexion email security v8.20.0) with SMTP; Sat, 03 Dec 2016 21:54:14 -0500 (EST) Received: (qmail 14088 invoked from network); 4 Dec 2016 02:54:14 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with (AES256-SHA encrypted) SMTP; 4 Dec 2016 02:54:14 -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 DD783EC8AF4; Sat, 3 Dec 2016 18:54:02 -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 powerpc64 WITH_LIB32= buildworld only works on powerpc64, not on cross build from amd64 Message-Id: Date: Sat, 3 Dec 2016 18:54:02 -0800 Cc: Justin Hibbits , Kevin Bowling , Roman Divacky To: Dimitry Andric , FreeBSD Toolchain , FreeBSD PowerPC ML X-Mailer: Apple Mail (2.3251) X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.23 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 Dec 2016 02:54:11 -0000 I just discovered that, even though I could not build WITH_LIB32=3D for TARGET_ARCH=3Dpowerpc64 from amd64, after booting the cross built system I was able to buildworld using WITH_LIB32=3D based on the SRC_ENV_CONF that I list later. Installing, booting, and testing it works: # ldd32 /usr/lib32/libgcc_s.so.1=20 /usr/lib32/libgcc_s.so.1: libc.so.7 =3D> /usr/lib32/libc.so.7 (0x41841000) # file `which ldd32` /usr/bin/ldd32: ELF 32-bit MSB executable, PowerPC or cisco 4500, = version 1 (FreeBSD), dynamically linked, interpreter = /libexec/ld-elf.so.1, for FreeBSD 12.0 (1200017), FreeBSD-style, = stripped The blocking issue on amd64's cross build was rejection of assembler notation used in lib32's build. Turns out from the message text details that the compiler was in either the ATT or the Intel instruction set parsing code when it rejected the notation. I have submitted a bugzilla report for this: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D215037 Supporting details for the on powerpc64 build: -r416639 devel/binutils -r407342 devel/powerpc-binutils (slave port so tracks devel/binutils in various ways) (The above avoids 2.47 vintages.) # head = ~/sys_typescripts/typescript_make_powerpc64vtsc_nodebug_clang_altbinutils_= world-powerpc64-host-2016-12-03:17:42:59=20 Script started on Sat Dec 3 17:42:59 2016 Command: env __MAKE_CONF=3D/root/src.configs/make.conf SRCCONF=3D/dev/null= = SRC_ENV_CONF=3D/root/src.configs/src.conf.powerpc64-clang_altbinutils.powe= rpc64-host WITH_META_MODE=3Dyes = MAKEOBJDIRPREFIX=3D/usr/obj/powerpc64vtsc_clang_altbinutils_world/powerpc.= powerpc64 make -j 5 buildworld . . . # more = /root/src.configs/src.conf.powerpc64-clang_altbinutils.powerpc64-host 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 # WITHOUT_CROSS_COMPILER=3D WITH_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 # CROSS_BINUTILS_PREFIX=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/ .if ${.MAKE.LEVEL} =3D=3D 0 CC=3D/usr/bin/clang -B ${CROSS_BINUTILS_PREFIX} CXX=3D/usr/bin/clang++ -B ${CROSS_BINUTILS_PREFIX} CPP=3D/usr/bin/clang-cpp -B ${CROSS_BINUTILS_PREFIX} .export CC .export CXX .export CPP AS=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/as AR=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/ar LD=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/ld NM=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/nm OBJCOPY=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/objcopy OBJDUMP=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/objdump RANLIB=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/ranlib XSIZE=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/size #NO-SUCH: STRINGS=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/strings STRINGS=3D/usr/local/bin/${TOOLS_TO_TYPE}-freebsd-strings .export AS .export AR .export LD .export NM .export OBJCOPY .export OBJDUMP .export RANLIB .export SIZE .export STRINGS .endif =3D=3D=3D Mark Millard markmi at dsl-only.net