From patchwork Mon Jun 29 09:26:12 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rainer Orth X-Patchwork-Id: 138024 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 46C134BA2E33 for ; Mon, 29 Jun 2026 09:26:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 46C134BA2E33 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=PJK6gbmG X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from smtp.CeBiTec.Uni-Bielefeld.DE (smtp.CeBiTec.Uni-Bielefeld.DE [129.70.160.84]) by sourceware.org (Postfix) with ESMTPS id CD12D4BA2E04 for ; Mon, 29 Jun 2026 09:26:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CD12D4BA2E04 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 CD12D4BA2E04 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=1782725174; cv=none; b=w0eHnZctghTSG+NYGQBDdV6hTDys9bNP5ysmcpqeJTFEQNijtDcs/wG5MnWvm5FtJg2Y1E958Oo7pKmKNIBR4ZxC0EdmHHN3lkVJG26PmGu4IfzekF+r5zPBnhaLWnHqhyENqHfpHjS0LmOWPd/GCDFWWmpDcZ8OR+YjMI0yALc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1782725174; c=relaxed/simple; bh=rYgE5KmwykI7ozaC1FfSgB9Ktoaw+/aod3SiCU4KdmA=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=sa+Lp/PK0LTN4/kt7fGTvhU9Fl0bAcz37+3QjXl7OvubaV1duZx+ylie6cVcm/W5Ru6mzE9PwA3KTrD5gmnJJ6+hO93bq17qtEGUx36mYWmlhkjhKt1C12U+4X2bJXNEvgSMdZAYOU7OodLEjY57EwkwTyWl+nEvlc0cUaQoxaY= 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=PJK6gbmG DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CD12D4BA2E04 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id AC52EDAE57 for ; Mon, 29 Jun 2026 11:26:13 +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=1782725172; bh=rYgE5 KmwykI7ozaC1FfSgB9Ktoaw+/aod3SiCU4KdmA=; b=PJK6gbmGqOksZGb4axHo9 NhB2XgsSkLT70dkt5uEWE2mV5iCwDKoQED+V+aGd+iiu4gEJhfYFI3yHzL/W5wZ6 D/ldpBFbbS7c4MjYUcKUw6QGxQlcghP/9xisx2uulOVexwtZDBjHM63t/3SeIWUT 7IX6RdSXMxbxLNHcf/+i6n1PYMbO3Uf4MhSxXtD8cY7Ysn8fU32wDqKh5pc48Dqs IQ+hkM4tOTkVLMKRCQl4seIYYQgrlvkYCsHv1xMs+zynqJUW8kzFCV/3wEfhMViJ fYAeh6McHmQrTySdWTbuqQs1ohnAkfKO9PpnUINqcbHa/hQ+iN1R4Zn111uzVohn 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 FrsLPwwuc7Nx for ; Mon, 29 Jun 2026 11:26:12 +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 D8E9ADAC6D for ; Mon, 29 Jun 2026 11:26:12 +0200 (CEST) From: Rainer Orth To: Subject: [PATCH] bfd: Always use CP_ACP=1 on Solaris [PR11280] Date: Mon, 29 Jun 2026 11:26:12 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 X-Spam-Status: No, score=-3778.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, GIT_PATCH_0, RCVD_IN_PBL, SPF_HELO_NONE, SPF_PASS, TXREP shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: binutils-bounces~patchwork=sourceware.org@sourceware.org bfd/configure.host defines CP_ACP=1 on Solaris 11 as a workaround for the lack the MS-ANSI codepage in Solaris libc iconv(3C). However, the issue isn't restricted to some OpenSolaris build as the comment suggests, but present on Solaris in general as can be seen in the iconv -l output: On both Solaris 10 and 11.4, one gets CP1252 (1252, ANSI-1252, WINDOWS-1252), unlike GNU iconv which lists CP1252 MS-ANSI WINDOWS-1252 Therefore, this patch applies the patch on all Solaris versions. Tested on {amd64,i386}-pc-solaris2.11 and sparc{v9,}-sun-solaris2.11. Ok for trunk? I didn't try to reproduce the original issue as reported in PR binutils/11280, but just went by the description there. Rainer # HG changeset patch # Parent 25b1400af2e88d6c429bb02a6779e7ffb29b6766 bfd: Always use CP_ACP=1 on Solaris [PR11280] diff --git a/bfd/configure.host b/bfd/configure.host --- a/bfd/configure.host +++ b/bfd/configure.host @@ -72,11 +72,11 @@ mips*-*-sysv4*) ;; mips*-*-sysv*) HDEFINES="-G 4" ;; mips*-*-riscos*) HDEFINES="-G 4" ;; -# Some Solaris systems (osol0906 at least) have a libc that doesn't recognise -# the "MS-ANSI" code page name, so we define an override for CP_ACP (sets the -# default code page used by windres/windmc when not specified by a commandline -# option) to select the "WINDOWS-1252" name instead. See PR11280 for details. -*-*-solaris2.11) HDEFINES=-DCP_ACP=1 ;; +# Solaris libc doesn't recognise the "MS-ANSI" code page name, so we define +# an override for CP_ACP (sets the default code page used by windres/windmc +# when not specified by a commandline option) to select the "WINDOWS-1252" +# name instead. See PR11280 for details. +*-*-solaris2*) HDEFINES=-DCP_ACP=1 ;; *-*-windows*) HOST_64BIT_TYPE=__int64