From owner-freebsd-toolchain@FreeBSD.ORG Wed Apr 1 21:49:57 2015 Return-Path: Delivered-To: freebsd-toolchain@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 B665DBE6 for ; Wed, 1 Apr 2015 21:49:57 +0000 (UTC) Received: from mail-pd0-f182.google.com (mail-pd0-f182.google.com [209.85.192.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 82121EEF for ; Wed, 1 Apr 2015 21:49:57 +0000 (UTC) Received: by pdbni2 with SMTP id ni2so67826504pdb.1 for ; Wed, 01 Apr 2015 14:49:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:mime-version:content-type:from :in-reply-to:date:cc:message-id:references:to; bh=EIkxfLvIsqptWCLtox+98TaJkfyrwkT0bz4O+oGX6QY=; b=CUkvmf8WoJPZYBe0h+J6BX8YTVNKE3PQ6sYkS/fwmObERLP6txXC6/nZt+8/WG6dyQ e9LknT4LaIpci8s1/8BhR3WZplui4Gt5RoFhaCuUSN3ZnznDqb3zJVliKPKuLbIypU7b pEYB/2b9NZe/Blnc7VtjlceFDhudsp91NoWhe66PnS1jbG2pvzV1wAN/nIVz+EB+B9nI PHQBEpfurARgDKKvTPGreChUP8fQDDkdktOCgOq9SYeTwhqzZcLEm9BZhuZzCII2zC4k cuyaSyrUAcz8XdgQfHtwyAsbpXQH6sTIbro9SPxqWyiIjRFciSlguAkVIzN9pZC7YRtp JLeQ== X-Gm-Message-State: ALoCoQmHqoAQrbwE9j/a/+m4/G5OgE6YDVROFoBl8fFqbdqowDkBKJjQCwPTeLbdjcqNVojgx4xa X-Received: by 10.70.92.132 with SMTP id cm4mr80401773pdb.18.1427924996576; Wed, 01 Apr 2015 14:49:56 -0700 (PDT) Received: from lgmac-panastasopoulos-6.corp.netflix.com ([69.53.236.236]) by mx.google.com with ESMTPSA id ae7sm3100462pac.19.2015.04.01.14.49.54 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 01 Apr 2015 14:49:55 -0700 (PDT) Sender: Warner Losh Subject: Re: Shorter report: powerpc64-xtoolchain-gcc use fails from powerpc (non-64) Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Content-Type: multipart/signed; boundary="Apple-Mail=_67A6748E-28CF-4E69-985A-ECCD2F004B8E"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5b6 From: Warner Losh In-Reply-To: Date: Wed, 1 Apr 2015 14:49:51 -0700 Message-Id: References: To: Mark Millard X-Mailer: Apple Mail (2.2070.6) Cc: FreeBSD Toolchain , FreeBSD PowerPC ML X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Apr 2015 21:49:57 -0000 --Apple-Mail=_67A6748E-28CF-4E69-985A-ECCD2F004B8E Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Apr 1, 2015, at 2:44 PM, Mark Millard wrote: >=20 > Attempting to use CROSS_TOOLCHAIN=3Dpowerpc64-gcc on powerpc (non-64) = 11.0-CURRENT with TARGET_ARCH=3Dpowerpc64 gets: >=20 >> --- crti.o --- >> 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 >> ... >> /usr/srcC/lib/csu/powerpc64/crti.S: Assembler messages: >> /usr/srcC/lib/csu/powerpc64/crti.S:35: Error: junk at end of line, = first unrecognized character is `@' >> /usr/srcC/lib/csu/powerpc64/crti.S:51: Error: junk at end of line, = first unrecognized character is `@' >> *** [crti.o] Error code 1 >>=20 >=20 >=20 >=20 > Read below only for analysis. >=20 >=20 >=20 > First I'll deal with the error messages. Then I'll deal with the = "gcc". >=20 > The lines of crti.S in question are: >=20 >> .quad .L._init,.TOC.@tocbase,0 >> ... >> .quad .L._fini,.TOC.@tocbase,0 >=20 > The error messages are because __powerpc64__ is not defined when = machine/asm.h is included so the wrong definition is used for = _ENTRY(=E2=80=A6): The gcc port needs to be fixed, with changes fed upstream. >> #ifdef __powerpc64__ >> ... >> #define _ENTRY(name) \ >> .section ".text"; \ >> .p2align 2; \ >> .globl name; \ >> .section ".opd","aw"; \ >> .p2align 3; \ >> name: \ >> .quad DOT_LABEL(name),.TOC.@tocbase,0; \ >> .previous; \ >> .p2align 4; \ >> TYPE_ENTRY(name) \ >> DOT_LABEL(name): >> ... >> #else /* !__powerpc64__ */ >> #define _ENTRY(name) \ >> .text; \ >> .p2align 4; \ >> .globl name; \ >> .type name,@function; \ >> name: >> #define _END(name) >> #endif /* __powerpc64__ */ >=20 > The (powerpc64 specific) Makefile may need to force a 64-bit usage = (-m64 ?), presuming that such is supported from the 32 bit environment. Generally, we=E2=80=99ve not added those kinds of flags to the command = line. There=E2=80=99s many subtle issues in the tree trying to do = that=E2=80=A6 Warner --Apple-Mail=_67A6748E-28CF-4E69-985A-ECCD2F004B8E Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJVHGf/AAoJEGwc0Sh9sBEAIZoP/1m2jc320czmLmlohqDGG+m4 KD82iXxH4wnBSTm5AJ9ivtpbV8rkeOu/f1Aw9l0eHPQaj9aAslvaDxDMjpX5kXaa mZGDjzGm4FegktXIhIf8LZo4rRHNNc6fML/qeqL9QYKEQFJqXsGjrtIpRKlkX4Ah 5q3HJcA9By5rxNn/ws2Bktjpcd/2s4gG4Dd4jy9QyjBxGuVjlPU5PeIxV3e5vZ/T RbNsrsV/Hsfi8APnI1kjFe3bp4Muu+/ER9rUKY4V2F/SGtotvhA6iwnoSFNJHaHa 46PA4+ybEXaDYTt+wwGM4FaLGvIG4mZXtBwctUnXZrH+w5oMfgxDiTCPebKmQDmR c+o8aLpXgJr6FdfBwYeuQTM2KcZ9WpbiGSLRoeHA0DPQC/som/sFj/OIqbn08Fce W/Wiw7BYCI1f8aRDWLH8E3xbd6maEp3WuRKLIE5fV5o/Y0Iw2p4T2EJSVcB9xMU7 T/9wh7hWfUNfV63E2uY6Qq5a4CqPzx9AFi9SkhBEp5mPadIgdjKRDMjU+6KAn/x8 PScWRX+xPCkOsLnA6eBYHqMJEAiXo/TgjH6ogyFZw7eEMiMBQHaYWoABn9vhhQ/K EgI+zGrJk0ZlBLSbm2eGbQqXYk9Sa/djhx+vjmK5HVPKeYhN3TQodTgVs2EN5b39 PIw70mMGZkvc6Cf6wo/m =le1J -----END PGP SIGNATURE----- --Apple-Mail=_67A6748E-28CF-4E69-985A-ECCD2F004B8E--