From owner-freebsd-ppc@FreeBSD.ORG Mon Mar 16 06:07:26 2015 Return-Path: Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E25B3E9B for ; Mon, 16 Mar 2015 06:07:26 +0000 (UTC) Received: from asp.reflexion.net (outbound-241.asp.reflexion.net [69.84.129.241]) (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 98FEC806 for ; Mon, 16 Mar 2015 06:07:25 +0000 (UTC) Received: (qmail 14613 invoked from network); 16 Mar 2015 06:07:19 -0000 Received: from unknown (HELO mail-cs-02.app.dca.reflexion.local) (10.81.19.2) by 0 (rfx-qmail) with SMTP; 16 Mar 2015 06:07:19 -0000 Received: by mail-cs-02.app.dca.reflexion.local (Reflexion email security v7.40.1) with SMTP; Mon, 16 Mar 2015 02:07:19 -0400 (EDT) Received: (qmail 13287 invoked from network); 16 Mar 2015 06:07:18 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with (DHE-RSA-AES256-SHA encrypted) SMTP; 16 Mar 2015 06:07:18 -0000 X-No-Relay: not in my network X-No-Relay: not in my network Received: from [192.168.1.8] (c-67-189-19-145.hsd1.or.comcast.net [67.189.19.145]) by iron2.pdx.net (Postfix) with ESMTPSA id 8ED2C1C43A6; Sun, 15 Mar 2015 23:07:11 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: powerpc (non-64) using CROSS_TOOLCHAIN=powerpc64-gcc fails: .TOC.@tocbase notation not recognized From: Mark Millard In-Reply-To: <9855CD5C-9086-412F-AD5B-370EAC58D4EC@dsl-only.net> Date: Sun, 15 Mar 2015 23:07:16 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <1D5C9892-8660-4370-BD29-AD2037E99C73@dsl-only.net> References: <9855CD5C-9086-412F-AD5B-370EAC58D4EC@dsl-only.net> To: FreeBSD PowerPC ML , freebsd-toolchain@freebsd.org X-Mailer: Apple Mail (2.2070.6) X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Mar 2015 06:07:27 -0000 In reading my note: Be warned that something is replacing the at-signs = in the assembler notation with "at" with an underscore before and after. = The original I sent was not like that. =3D=3D=3D Mark Millard markmi at dsl-only.net On 2015-Mar-13, at 10:43 PM, Mark Millard = wrote: Basic execution context: > # freebsd-version -ku; uname -ap > 11.0-CURRENT > 11.0-CURRENT > FreeBSD FBSDG4C0 11.0-CURRENT FreeBSD 11.0-CURRENT #0 r279514M: Mon = Mar 9 22:24:27 PDT 2015 = root@FBSDG4S0:/usr/obj/usr/srcC/sys/GENERICvtsc-NODEBUG powerpc powerpc Attmpted: make -j 8 CROSS_TOOLCHAIN=3Dpowerpc64-gcc buildworld = buildkernel KERNCONF=3DGENERIC64vtsc-NODEBUG TARGET=3DpowerPC = TARGET_ARCH=3Dpowerpc64 > # more /etc/src.conf=20 > #CPP=3Dclang-cpp > #CC=3Dclang > #CXX=3Dclang++ > #CFLAGS+=3D-DELF_VERBOSE > #WITH_DEBUG_FILES=3D > WITHOUT_CLANG=3D > NO_WERROR=3D Note that CROSS_TOOLCHAIN=3Dpowerpc64-gcc means the produced files are = ELF 64-bit (even if TARGET_ARCH and/or KERNCONF indicates powerpc). I = remembered to type GENERIC64vtsc to match. :) I had to explicitly supply = TARGET_ARCH=3Dpowerpc64 or it would pick TARGET_ARCH=3Dpowerpc instead. WITHOUT_CLANG=3D avoids various build issues, including lack of any = sufficient c++11 library for building clang. NO_WERROR=3D avoids stopping for warnings that would prevent the build. = I did not figure out any finer grain level of control for a basic = experiment. The problem (something needed else to control configuration?): ... > --- crti.o ---^M > gcc -O2 -pipe -I/usr/srcC/lib/csu/powerpc64/../common = -I/usr/srcC/lib/csu/powerpc64/../../libc/include -mlongcall -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 -c = /usr/srcC/lib/csu/powerpc64/crti.S^M > ... > /usr/srcC/lib/csu/powerpc64/crti.S: Assembler messages:^M > /usr/srcC/lib/csu/powerpc64/crti.S:35: Error: junk at end of line, = first unrecognized character is `@'^M > /usr/srcC/lib/csu/powerpc64/crti.S:51: Error: junk at end of line, = first unrecognized character is `@'^M > *** [crti.o] Error code 1^M > ^M (gcc: so the old compiler is used for assembly of sources.) The lines of crti.S in question are: > .quad .L._init,.TOC.@tocbase,0 > ... > .quad .L._fini,.TOC.@tocbase,0 The crti.S code (starting at the #include) is: > #include > __FBSDID("$FreeBSD: head/lib/csu/powerpc64/crti.S 218824 2011-02-18 = 21:44:53Z nwhitehorn $"); >=20 > .section .init,"ax",@progbits > .align 2 > .globl _init > .section ".opd","aw" > .align 3 > _init: > .quad .L._init,.TOC.@tocbase,0 > .previous > .type _init,@function >=20 > .align 4 > .L._init: > stdu 1,-48(1) > mflr 0 > std 0,64(1) >=20 > .section .fini,"ax",@progbits > .align 2 > .globl _fini > .section ".opd","aw" > .align 3 > _fini: > .quad .L._fini,.TOC.@tocbase,0 > .previous > .type _fini,@function >=20 > .align 4 > .L._fini: > stdu 1,-48(1) > mflr 0 > std 0,64(1) >=20 > .section .note.GNU-stack,"",%progbits Other context details: > # more /etc/make.conf > #CPP=3Dclang-cpp > #CC=3Dclang > #CXX=3Dclang++ > WRKDIRPREFIX=3D/usr/obj/portswork > #WITH_DEBUG=3D > MALLOC_PRODUCTION=3D > # svnlite info > Path: . > 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 > Path: . > Working Copy Root Path: /usr/ports > URL: https://svn0.us-west.freebsd.org/ports/head > Relative URL: ^/head > Repository Root: https://svn0.us-west.freebsd.org/ports > Repository UUID: 35697150-7ecd-e111-bb59-0022644237b5 > Revision: 380683 > Node Kind: directory > Schedule: normal > Last Changed Author: demon > Last Changed Rev: 380683 > Last Changed Date: 2015-03-07 03:31:11 -0800 (Sat, 07 Mar 2015) =3D=3D=3D Mark Millard markmi at dsl-only.net