From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id A8pvD3qghWoRgjAAWB0awg (envelope-from ) for ; Wed, 19 Aug 2026 08:24:26 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=cebitec.uni-bielefeld.de header.i=@cebitec.uni-bielefeld.de header.a=rsa-sha256 header.s=20200306 header.b=hZ1umOgy; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 2B3C11E033; Wed, 19 Aug 2026 08:24:26 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 061501E033 for ; Wed, 19 Aug 2026 08:24:24 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 07ADC4BA23E7 for ; Wed, 19 Aug 2026 12:24:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 07ADC4BA23E7 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=cebitec.uni-bielefeld.de header.i=@cebitec.uni-bielefeld.de header.a=rsa-sha256 header.s=20200306 header.b=hZ1umOgy Received: from smtp.CeBiTec.Uni-Bielefeld.DE (smtp.CeBiTec.Uni-Bielefeld.DE [129.70.160.84]) by sourceware.org (Postfix) with ESMTPS id 29B604BA2E28 for ; Wed, 19 Aug 2026 12:23:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 29B604BA2E28 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=CeBiTec.Uni-Bielefeld.DE Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=cebitec.uni-bielefeld.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 29B604BA2E28 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=129.70.160.84 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1787142239; cv=none; b=dKl20LGMr0a1KELc+dC4bUaInAitQ3AptjJmV7IV1QNQB8K6V3H8IP9gVPuj0pbF6Y4hb8MHri9TUYseaTAMYDLRm6gEIZ/mjynGOK+6khgvx0ntRRq2KibrE7CBfd+tS6aIWRNu5nCMwdEHRf1tU6bbUzK3MYtMe8vX7M+3Tr8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1787142239; c=relaxed/simple; bh=h1jJA/YuuUZPD9sJx88bFDBlTsZK+V7Eh5/zwfKG08w=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=q6eA1gSEAsQT7hVdycBsJMpWX4FrhtQAa3cjTWX6s/1ftTqdfqwzhmlhT4I27DDy6s0prLTsyIsk47u4s1AuXqRS2jrkak4tnqvXBjQqSG9HU1kKIgPc1Nzoj0nkXBrJ4W2doI5Q2/IHs4odNYJj+Dy1g7EE3qawWi//oWbAxgc= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=cebitec.uni-bielefeld.de header.i=@cebitec.uni-bielefeld.de header.a=rsa-sha256 header.s=20200306 header.b=hZ1umOgy DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 29B604BA2E28 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id 42EAAE52D5 for ; Wed, 19 Aug 2026 14:23:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d= cebitec.uni-bielefeld.de; h=content-type:content-type :mime-version:user-agent:message-id:date:date:subject:subject :from:from:received:received; s=20200306; t=1787142237; bh=h1jJA /YuuUZPD9sJx88bFDBlTsZK+V7Eh5/zwfKG08w=; b=hZ1umOgyA7U/hfs/qXyqX r26dp2yHM+D0jFdpjs1et3pQ5b0lIpbPsHtW4Yoj05VvMEerFICvnAIALI5DKTB9 fQzLsoQI1cRXRRr+ZBbNObPBjZLV2ceRMKM8Bo41b0Br2oRozDntsq0F+3h0XS9b D0D6zE9+uafETznIq8B2BYR2dzf3L+mn9qsG+aQxsWJ4zmBp3Nv7S0i5bh7fCq7r oYlMKnPIihZGLssFMwjGee/PqSDyVchmZL3xZO3RsLdYOOmVdbkv7VgMgM3KQsxa fCvaQdp0otRXMl7bDZaJ5ia0ROmlW5RygGhb5ftY8rAUOlrqFjuonkKSou0SZFbT A== X-Virus-Scanned: amavisd-new at cebitec.uni-bielefeld.de Received: from smtp.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (smtp.cebitec.uni-bielefeld.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id ze4DANYtzmCU for ; Wed, 19 Aug 2026 14:23:57 +0200 (CEST) Received: from manam.CeBiTec.Uni-Bielefeld.DE (p508553da.dip0.t-ipconnect.de [80.133.83.218]) (Authenticated sender: ro) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPSA id CA75CE5276 for ; Wed, 19 Aug 2026 14:23:57 +0200 (CEST) From: Rainer Orth To: gdb-patches@sourceware.org Subject: [PATCH] Use Solaris iconv Date: Wed, 19 Aug 2026 14:23:57 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org --=-=-= Content-Type: text/plain Currently hundreds of tests FAIL on Solaris with warning: could not convert '...' from the host encoding (ISO-8859-1) to UTF-32. This normally should not happen, please file a bug report. This happens because the system headers don't define __STDC_ISO_10646__ which was only introduced in C17. However, Solaris libc only conforms to C11. Consequently PHONY_ICONV is defined, leading to those failures. However, Solaris 11.4 iconv is good enough to use: enabling its use fixes 300+ failures. The results are on par with those using GNU libiconv 1.17, while forcibly disabling HAVE_ICONV on Linux/x86_64 adds causes the same amount of failures. Tested on sparcv9-sun-solaris2.11, x86_64-pc-solaris2.11, and x86_64-pc-solaris2.11. Ok for trunk? Rainer -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=sol2-iconv.patch # HG changeset patch # Parent 97bd89d84470fc76016c1f0a387cad83b62d0c7a Use Solaris iconv diff --git a/gdb/gdb_wchar.h b/gdb/gdb_wchar.h --- a/gdb/gdb_wchar.h +++ b/gdb/gdb_wchar.h @@ -34,10 +34,12 @@ functionality is available to the user, but many characters (those outside the narrow range) will be displayed as escapes. - Finally, some systems do not have iconv, or are really broken - (e.g., Solaris, which almost has all of this working, but where - just enough is broken to make it too hard to use). Here we provide - a phony iconv which only handles a single character set, and we + While the Solaris 11.4 system headers don't define __STDC_ISO_10646__ + (it's a C17 addition while Solaris libc only conforms to C11), the + system iconv works well enough. + + Finally, some systems do not have iconv, or are really broken. Here we + provide a phony iconv which only handles a single character set, and we provide wrappers for the wchar_t functionality we use. */ @@ -59,7 +61,8 @@ iconvlist. */ #if defined (HAVE_ICONV) && defined (HAVE_BTOWC) \ && (defined (__STDC_ISO_10646__) \ - || (defined (_LIBICONV_VERSION) && _LIBICONV_VERSION >= 0x108)) + || (defined (_LIBICONV_VERSION) && _LIBICONV_VERSION >= 0x108) \ + || (defined (__sun__) && defined (__svr4__))) using gdb_wchar_t = wchar_t; using gdb_wint_t = wint_t; @@ -88,7 +91,8 @@ using gdb_wint_t = wint_t; Sonoma specifically, but it is desirable for binaries built for older versions of macOS to still work on newer ones such as Sonoma, so there is no version check here for this workaround. */ -#if defined (__STDC_ISO_10646__) || defined (__APPLE__) +#if defined (__STDC_ISO_10646__) || defined (__APPLE__) \ + || (defined (__sun__) && defined (__svr4__)) #define USE_INTERMEDIATE_ENCODING_FUNCTION #define INTERMEDIATE_ENCODING intermediate_encoding () const char *intermediate_encoding (void); --=-=-=--