From owner-freebsd-toolchain@freebsd.org Sun Dec 6 21:34:40 2015 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 56B289A0DAB for ; Sun, 6 Dec 2015 21:34:40 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: from asp.reflexion.net (outbound-mail-211-151.reflexion.net [208.70.211.151]) (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 02BCB1880 for ; Sun, 6 Dec 2015 21:34:39 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: (qmail 4180 invoked from network); 6 Dec 2015 21:34:40 -0000 Received: from unknown (HELO mail-cs-02.app.dca.reflexion.local) (10.81.19.2) by 0 (rfx-qmail) with SMTP; 6 Dec 2015 21:34:40 -0000 Received: by mail-cs-02.app.dca.reflexion.local (Reflexion email security v7.80.0) with SMTP; Sun, 06 Dec 2015 16:34:39 -0500 (EST) Received: (qmail 7146 invoked from network); 6 Dec 2015 21:34:38 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with SMTP; 6 Dec 2015 21:34:38 -0000 X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network Received: from [192.168.1.8] (c-76-115-7-162.hsd1.or.comcast.net [76.115.7.162]) by iron2.pdx.net (Postfix) with ESMTPSA id EE6E01C43AE; Sun, 6 Dec 2015 13:34:32 -0800 (PST) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: powerpc64-gcc 5.2 vintages get L". . ." type wrong compared to Char for FreeBSD for lib32 compiling Message-Id: <867D2B14-766D-4104-9A77-C35992C357B8@dsl-only.net> Date: Sun, 6 Dec 2015 13:34:36 -0800 To: FreeBSD PowerPC ML , FreeBSD Toolchain , FreeBSD Current , freebsd-ports@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) X-Mailer: Apple Mail (2.2104) X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Dec 2015 21:34:40 -0000 [I picked the lists that I did because powerpc64-gcc is the external = toolchain created to allow modern powerpc64 builds.] For the powerpc64-gcc 5.2 vintages. . . (using my environment's path as = an example) = /usr/obj/portswork/usr/ports/devel/powerpc64-gcc/work/gcc-5.2.0/gcc/config= /rs6000/freebsd64.h has: > /* rs6000.h gets this wrong for FreeBSD. We use the GCC defaults = instead. */ > #undef WCHAR_TYPE > #define WCHAR_TYPE (TARGET_64BIT ? "int" : "long int") > #undef WCHAR_TYPE_SIZE > #define WCHAR_TYPE_SIZE 32 That type in quotes ends up being the base type for L". . ." notation, = for example. Probably the char notation as well (L'?'). For FreeBSD Char compatibility in a powerpc64 lib32 context that "long = int" should effectively instead be "int", making the conditional above = technically unnecessary. This blocks compiling lib32 source code that uses such notations as L". = . .": "long int" is not compatible with FreeBSD's Char in the powerpc64 = environment's 32 bit environment. Some compiler message are explicit = about the base types of pointers that result for the mismatches: that is = how I know that "long int" is in use for L". . ." and "int" is the other = base type involved. (Yes, freebsd64.h appears to be used for lib32, at least on powerpc64. = By contrast freebsd.h agrees for the WCHAR_TYPE_SIZE but only undef's = WCHAR_TYPE, presuming gcc defaults are correct for FreeBSD as far as the = type goes. It might need a more explicit type to be sure of a Char match = for that freebsd.h file's context.) The 4.9 vintages of powerpc64-gcc were messed up the same way, as was = noted at the time. =3D=3D=3D Mark Millard markmi at dsl-only.net