From owner-freebsd-ports@freebsd.org Sun Dec 6 22:44:16 2015 Return-Path: Delivered-To: freebsd-ports@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 7C7D29A0C24; Sun, 6 Dec 2015 22:44:16 +0000 (UTC) (envelope-from andreast-list@fgznet.ch) Received: from smtp.fgznet.ch (unknown [IPv6:2001:4060:1:1001::14:53]) (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 441F217AE; Sun, 6 Dec 2015 22:44:16 +0000 (UTC) (envelope-from andreast-list@fgznet.ch) Received: from [192.168.225.14] (dhclient-91-190-14-19.flashcable.ch [91.190.14.19]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by fgznet.ch (Postfix) with ESMTPS id 79AA5CF0E8; Sun, 6 Dec 2015 23:44:02 +0100 (CET) Subject: Re: powerpc64-gcc 5.2 vintages get L". . ." type wrong compared to Char for FreeBSD for lib32 compiling To: Mark Millard , FreeBSD PowerPC ML , FreeBSD Toolchain , FreeBSD Current , freebsd-ports@freebsd.org References: <867D2B14-766D-4104-9A77-C35992C357B8@dsl-only.net> From: Andreas Tobler Message-ID: <5664BA32.3010306@fgznet.ch> Date: Sun, 6 Dec 2015 23:44:02 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <867D2B14-766D-4104-9A77-C35992C357B8@dsl-only.net> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.73 on 127.0.1.1 X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Dec 2015 22:44:16 -0000 On 06.12.15 22:34, Mark Millard wrote: > [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. I'll take care. Andreas