From owner-freebsd-toolchain@FreeBSD.ORG Sun Nov 25 17:31:27 2012 Return-Path: Delivered-To: toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2DB7BF2A for ; Sun, 25 Nov 2012 17:31:27 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id D7EB98FC08 for ; Sun, 25 Nov 2012 17:31:26 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:506f:2496:5d7d:d4f3] (unknown [IPv6:2001:7b8:3a7:0:506f:2496:5d7d:d4f3]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 5142B5C59; Sun, 25 Nov 2012 18:31:25 +0100 (CET) Message-ID: <50B255EC.9040602@FreeBSD.org> Date: Sun, 25 Nov 2012 18:31:24 +0100 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: David Chisnall Subject: Re: [patch][libc++]using some undeclared functions with -std=c++98, -std=c++03 or -ansi References: <50AEB0A1.3090803@kbh.biglobe.ne.jp> <50AFEA5D.2020607@FreeBSD.org> <76D35059-88C3-49F3-A871-3402A49875CD@theravensnest.org> In-Reply-To: <76D35059-88C3-49F3-A871-3402A49875CD@theravensnest.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: toolchain@freebsd.org X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.14 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, 25 Nov 2012 17:31:27 -0000 On 2012-11-24 11:45, David Chisnall wrote: > On 23 Nov 2012, at 21:27, Dimitry Andric wrote: >> Note there are also other problems when compiling libc++ with -std=c++98 >> and -std=c++03, such as complaints about namespacing and such. I am not >> entirely sure libc++ is fully supported yet under those restrictions. :) > > In theory, the libc++ headers that are part of the C++03 spec (i.e. not things like ) should work in C++98 / C++03 mode, however the implementation in libc++ must be compiled in C++11 mode. > > To upstream this patch, the __LONG_LONG_SUPPORTED flag should be unconditionally set for non-FreeBSD flags in the __config file in libc++. This will have no functionality change on other platforms. I have posted a proposed patch to the upstream mailing list here: http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20121119/068587.html If it is accepted as-is, I will merge it immediately. From owner-freebsd-toolchain@FreeBSD.ORG Mon Nov 26 20:11:55 2012 Return-Path: Delivered-To: toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0CA51589 for ; Mon, 26 Nov 2012 20:11:55 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) by mx1.freebsd.org (Postfix) with ESMTP id AD8688FC16 for ; Mon, 26 Nov 2012 20:11:54 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:5996:6a9e:9a88:4013] (unknown [IPv6:2001:7b8:3a7:0:5996:6a9e:9a88:4013]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 681245C37; Mon, 26 Nov 2012 21:11:52 +0100 (CET) Message-ID: <50B3CD06.7040304@FreeBSD.org> Date: Mon, 26 Nov 2012 21:11:50 +0100 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: David Chisnall Subject: Re: [patch][libc++]using some undeclared functions with -std=c++98, -std=c++03 or -ansi References: <50AEB0A1.3090803@kbh.biglobe.ne.jp> <50AFEA5D.2020607@FreeBSD.org> <76D35059-88C3-49F3-A871-3402A49875CD@theravensnest.org> In-Reply-To: <76D35059-88C3-49F3-A871-3402A49875CD@theravensnest.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: toolchain@freebsd.org X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Nov 2012 20:11:55 -0000 On 2012-11-24 11:45, David Chisnall wrote: ... > In theory, the libc++ headers that are part of the C++03 spec (i.e. not things like ) should work in C++98 / C++03 mode, however the implementation in libc++ must be compiled in C++11 mode. Minor note: we now use -std=c++0x by default for building libc++, so shall I update that to -std=c++11? From owner-freebsd-toolchain@FreeBSD.ORG Mon Nov 26 20:32:59 2012 Return-Path: Delivered-To: toolchain@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A54DCF05; Mon, 26 Nov 2012 20:32:59 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from theravensnest.org (theraven.freebsd.your.org [216.14.102.27]) by mx1.freebsd.org (Postfix) with ESMTP id 65F7A8FC16; Mon, 26 Nov 2012 20:32:56 +0000 (UTC) Received: from [192.168.0.2] (cpc39-cmbg15-2-0-cust69.5-4.cable.virginmedia.com [81.101.138.70]) (authenticated bits=0) by theravensnest.org (8.14.5/8.14.5) with ESMTP id qAQKWrK1099176 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Mon, 26 Nov 2012 20:32:55 GMT (envelope-from theraven@FreeBSD.org) Subject: Re: [patch][libc++]using some undeclared functions with -std=c++98, -std=c++03 or -ansi Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: text/plain; charset=us-ascii From: David Chisnall In-Reply-To: <50B3CD06.7040304@FreeBSD.org> Date: Mon, 26 Nov 2012 20:32:48 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <4F2767D3-C5F9-4E06-85AC-6C3B9BB1C1B4@FreeBSD.org> References: <50AEB0A1.3090803@kbh.biglobe.ne.jp> <50AFEA5D.2020607@FreeBSD.org> <76D35059-88C3-49F3-A871-3402A49875CD@theravensnest.org> <50B3CD06.7040304@FreeBSD.org> To: Dimitry Andric X-Mailer: Apple Mail (2.1278) Cc: toolchain@FreeBSD.org X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Nov 2012 20:32:59 -0000 On 26 Nov 2012, at 20:11, Dimitry Andric wrote: > On 2012-11-24 11:45, David Chisnall wrote: > ... >> In theory, the libc++ headers that are part of the C++03 spec (i.e. = not things like ) should work in C++98 / C++03 mode, however = the implementation in libc++ must be compiled in C++11 mode. >=20 > Minor note: we now use -std=3Dc++0x by default for building libc++, so > shall I update that to -std=3Dc++11? Yes, if we've now got a clang in base that understands that. David From owner-freebsd-toolchain@FreeBSD.ORG Mon Nov 26 21:36:29 2012 Return-Path: Delivered-To: toolchain@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 05689178 for ; Mon, 26 Nov 2012 21:36:29 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id AE8ED8FC17 for ; Mon, 26 Nov 2012 21:36:28 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:5996:6a9e:9a88:4013] (unknown [IPv6:2001:7b8:3a7:0:5996:6a9e:9a88:4013]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id C3CCB5C37; Mon, 26 Nov 2012 22:36:26 +0100 (CET) Message-ID: <50B3E0D5.8090304@FreeBSD.org> Date: Mon, 26 Nov 2012 22:36:21 +0100 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: David Chisnall Subject: Re: [patch][libc++]using some undeclared functions with -std=c++98, -std=c++03 or -ansi References: <50AEB0A1.3090803@kbh.biglobe.ne.jp> <50AFEA5D.2020607@FreeBSD.org> <76D35059-88C3-49F3-A871-3402A49875CD@theravensnest.org> <50B255EC.9040602@FreeBSD.org> In-Reply-To: <50B255EC.9040602@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: toolchain@FreeBSD.org X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Nov 2012 21:36:29 -0000 On 2012-11-25 18:31, Dimitry Andric wrote: ... > I have posted a proposed patch to the upstream mailing list here: > > http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20121119/068587.html > > If it is accepted as-is, I will merge it immediately. Upstream committed the patch after some explanation, and I merged it to head in r243572. From owner-freebsd-toolchain@FreeBSD.ORG Tue Nov 27 08:00:37 2012 Return-Path: Delivered-To: freebsd-toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BE1099C7 for ; Tue, 27 Nov 2012 08:00:37 +0000 (UTC) (envelope-from pete.chou@gmail.com) Received: from mail-la0-f54.google.com (mail-la0-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 32BFE8FC13 for ; Tue, 27 Nov 2012 08:00:36 +0000 (UTC) Received: by mail-la0-f54.google.com with SMTP id j13so11541553lah.13 for ; Tue, 27 Nov 2012 00:00:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:from:date:x-google-sender-auth:message-id :subject:to:content-type; bh=+RuRoBv0I99hGv+BeFEL0k27+p01wz/JCt/5aQ57qas=; b=CY09sLP5XQqzUPFL9Ffzz8Hia/TnOga+0bldJBGKnR6C4gsN39Zlss09GcIMqdPCpD FAavL3ILcyNrGWOyOokjPRQt5cS9fysZbh1L83Vekei/ug5rk8Fs7OWWGymLaz4Kr6ro FF/ErBsQklGju9NQnSgRKgS2KlpLy9njUx1eHai1e/d7+n/Q/CSGDbMrgNNxNZeR4A1u HI4i2+OUn9JYbzRiOpJ66tSVYIbF3HMtYtgWto0X99u+LMLxzTmrjDLJX2ApJO7l5YHR DNoNqk+/rgJIXYmqX6wPX1+Kp22dY0FsvCSfjd/D2TD6yO67fJzt8qZUq+9xzRLRiI7H ah5g== Received: by 10.152.114.100 with SMTP id jf4mr13810013lab.47.1354003235549; Tue, 27 Nov 2012 00:00:35 -0800 (PST) MIME-Version: 1.0 Sender: pete.chou@gmail.com Received: by 10.114.69.131 with HTTP; Tue, 27 Nov 2012 00:00:05 -0800 (PST) From: pete Date: Tue, 27 Nov 2012 16:00:05 +0800 X-Google-Sender-Auth: eUacTAfY2KxCLz7k3MCRLx-kW_Y Message-ID: Subject: crunchide breaks object files when using mclinker to do base system linking To: freebsd-toolchain@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Nov 2012 08:00:37 -0000 Hi, I meet a problem when using mclinker to do base system linking. And the problem is crunchide is gnu ld specific. it presumes the section layout of a object file is like what gnu ld generates. To make it clear, gnu ld would generate the following layout. And crunchide will update elf section header, symbol table, and then string table. (The string table is likely enlarged.) ld -dc -r -o cat.lo cat_stub.o /usr/obj/usr/src/rescue/rescue//usr/src/bin/cat/cat.o crunchide -k _crunched_cat_stub cat.lo ----gnu ld------------ + elf header + ---------------------- + + + + ---------------------- + elf section header + ---------------------- + symbol table + ---------------------- + string table + ---------------------- However, mclinker does not produce this layout, but put elf section header in the end of file. And then crunchide will break the object file generated by mclinker. (elf section header is overwritten by new strings) I know the layout generated by gold linker is also different to gnu ld. On the other hand, we can find only ELF header is required to be fixed in *"System V Application Binary Interface*". For mclinker, I think it's not difficult to add the change to be compatible with gnu ld. But do you think if it will be better to modify crunchide utility to support more elf linkers? Any idea? Thanks, Pete From owner-freebsd-toolchain@FreeBSD.ORG Tue Nov 27 08:23:32 2012 Return-Path: Delivered-To: freebsd-toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6DD8CDF5 for ; Tue, 27 Nov 2012 08:23:32 +0000 (UTC) (envelope-from erik@cederstrand.dk) Received: from csmtp3.one.com (csmtp3.one.com [91.198.169.23]) by mx1.freebsd.org (Postfix) with ESMTP id 28EAA8FC0C for ; Tue, 27 Nov 2012 08:23:31 +0000 (UTC) Received: from [192.168.1.18] (unknown [217.157.7.221]) by csmtp3.one.com (Postfix) with ESMTPA id 36DE32404986; Tue, 27 Nov 2012 08:16:48 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) Subject: Re: crunchide breaks object files when using mclinker to do base system linking From: Erik Cederstrand In-Reply-To: Date: Tue, 27 Nov 2012 09:16:49 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: To: pete X-Mailer: Apple Mail (2.1499) Cc: freebsd-toolchain@freebsd.org X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Nov 2012 08:23:32 -0000 Den 27/11/2012 kl. 09.00 skrev pete : > Hi, >=20 > I meet a problem when using mclinker to do base system linking. And = the > problem is crunchide is gnu ld specific. it presumes the section = layout of > a object file is like what gnu ld generates. >=20 > To make it clear, gnu ld would generate the following layout. And = crunchide > will update elf section header, symbol table, and then string table. = (The > string table is likely enlarged.) >=20 > ld -dc -r -o cat.lo cat_stub.o > /usr/obj/usr/src/rescue/rescue//usr/src/bin/cat/cat.o > crunchide -k _crunched_cat_stub cat.lo >=20 > ----gnu ld------------ > + elf header + > ---------------------- > + + > + + > ---------------------- > + elf section header + > ---------------------- > + symbol table + > ---------------------- > + string table + > ---------------------- >=20 > However, mclinker does not produce this layout, but put elf section = header > in the end of file. And then crunchide will break the object file = generated > by mclinker. (elf section header is overwritten by new strings) >=20 > I know the layout generated by gold linker is also different to gnu = ld. On > the other hand, we can find only ELF header is required to be fixed in = *"System > V Application Binary Interface*". >=20 > For mclinker, I think it's not difficult to add the change to be = compatible > with gnu ld. But do you think if it will be better to modify crunchide > utility to support more elf linkers? Unless you have compelling technical reasons to keep your layout, I = think it's better for mclinker to be as compatible with GNU ld as = possible, even though your layout also adheres to the standards. If = other tools in FreeBSD or other platforms also make assumptions about = the header layout, you'll end up patching lots of tools instead of = working on mclinker. With that in mind, I also think it's worthwhile to patch our crunchide = to be more permissive. If you have the resources, please send patches. Thanks, Erik= From owner-freebsd-toolchain@FreeBSD.ORG Thu Nov 29 14:01:50 2012 Return-Path: Delivered-To: toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 87281E6A for ; Thu, 29 Nov 2012 14:01:50 +0000 (UTC) (envelope-from zeising@freebsd.org) Received: from mail.lysator.liu.se (mail.lysator.liu.se [IPv6:2001:6b0:17:f0a0::3]) by mx1.freebsd.org (Postfix) with ESMTP id 9FCD88FC14 for ; Thu, 29 Nov 2012 14:01:49 +0000 (UTC) Received: from mail.lysator.liu.se (localhost [127.0.0.1]) by mail.lysator.liu.se (Postfix) with ESMTP id 7675A40026 for ; Thu, 29 Nov 2012 15:01:48 +0100 (CET) Received: by mail.lysator.liu.se (Postfix, from userid 1004) id 6BB6D40016; Thu, 29 Nov 2012 15:01:48 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on bernadotte.lysator.liu.se X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=AWL autolearn=disabled version=3.3.1 X-Spam-Score: 0.0 Received: from mx.daemonic.se (mx.daemonic.se [IPv6:2001:470:dca9:0:1::3]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.lysator.liu.se (Postfix) with ESMTPSA id 1D1EC40015; Thu, 29 Nov 2012 15:01:46 +0100 (CET) Received: from mailscanner.daemonic.se (mailscanner.daemonic.se [IPv6:2001:470:dca9:0:1::6]) by mx.daemonic.se (Postfix) with ESMTPS id 3YC0lZ4v9Jz8hVt; Thu, 29 Nov 2012 15:01:46 +0100 (CET) X-Virus-Scanned: amavisd-new at daemonic.se Received: from mx.daemonic.se ([10.1.0.3]) (using TLS with cipher CAMELLIA256-SHA) by mailscanner.daemonic.se (mailscanner.daemonic.se [10.1.0.6]) (amavisd-new, port 10025) with ESMTPS id F1zdelQTEkUY; Thu, 29 Nov 2012 15:01:39 +0100 (CET) Received: from mail.daemonic.se (mail.daemonic.se [IPv6:2001:470:dca9:0:1::4]) by mx.daemonic.se (Postfix) with ESMTPS id 3YC0lQ3Kprz8hVn; Thu, 29 Nov 2012 15:01:38 +0100 (CET) Received: from vivi.daemonic.se (vivi.daemonic.se [IPv6:2001:470:dca9:1::4]) by mail.daemonic.se (Postfix) with ESMTPSA id 3YC0lQ2y73z9Ctj; Thu, 29 Nov 2012 15:01:38 +0100 (CET) Message-ID: <50B76AC2.4050207@freebsd.org> Date: Thu, 29 Nov 2012 15:01:38 +0100 From: Niclas Zeising User-Agent: Mutt/1.5.21 MIME-Version: 1.0 To: Hans Ottevanger Subject: Re: [CFT] devel/binutils 2.23 References: <201211141445.qAEEjTXQ047896@mech-cluster241.men.bris.ac.uk> <50A3FCEF.9060204@freebsd.org> <50A4A5A2.2000902@beastielabs.net> <50A4A69B.7030200@freebsd.org> In-Reply-To: <50A4A69B.7030200@freebsd.org> Content-Type: multipart/mixed; boundary="------------000501090506000105040402" X-Virus-Scanned: ClamAV using ClamSMTP Cc: toolchain@freebsd.org X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Nov 2012 14:01:50 -0000 This is a multi-part message in MIME format. --------------000501090506000105040402 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On 11/15/12 09:23, Niclas Zeising wrote: > On 2012-11-15 09:19, Hans Ottevanger wrote: >> On 11/14/12 21:19, Niclas Zeising wrote: >>> On 11/14/12 15:45, Anton Shterenlikht wrote: >>>> It installed fine on ia64 and sparc64, both -current. >>>> I don't know how to test. Please advise if there are >>>> simple tests. >>>> >>>> Also, just to check, I manually deleted *orig files >>>> from under files/ after applying the patch: >>>> >>>> # ls -al /usr/ports/devel/binutils/files/ >>>> total 20 >>>> drwxr-xr-x 2 root wheel 1024 Nov 14 12:58 . >>>> drwxr-xr-x 4 root wheel 512 Nov 14 13:00 .. >>>> -rw-r--r-- 1 root wheel 353 Nov 14 12:55 patch-bfd_Makefile.in >>>> -rw-r--r-- 1 root wheel 297 Nov 14 12:55 patch-gold_Makefile.in >>>> -rw-r--r-- 1 root wheel 471 Nov 14 12:55 patch-gold_script.cc >>>> # >>>> >>>> because I think all files in this directory >>>> will be used as patches, no matter the name. >>>> Am I wrong? >>>> >>>> Anton >>> >>> Just compile test some binaries and see that they link and work ok. >>> The .orig files are left over when running patch, and has to be removed. >>> Sorry if I wasn't clear on that in my previous mail. >>> Thanks for testing! >>> Regards! >> >> Please be aware that apparently something went wrong with the release of >> binutils-2.23 (see the discussion ending in: >> >> http://sourceware.org/ml/binutils/2012-10/msg00339.html >> >> though I doubt the glitches will affect your usage) and it has been >> re-released as binutils-2.23.1. Maybe it is better to base the update if >> the binutils port on that release. >> > > I noticed that late last night, but haven't had time to update the patch > yet. Thank you for pointing it out. > Regards! > Hi! Apologies for the delay. Attached is a patch that updates binutils from 2.22 to 2.23.1. Please test it. The plan is to commit it once 9.1 is out the door and the feature freeze on the ports tree is lifted. Regards! -- Niclas Zeising --------------000501090506000105040402 Content-Type: text/x-patch; name="binutils.2.23.1.update.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="binutils.2.23.1.update.diff" Index: devel/binutils/Makefile =================================================================== --- devel/binutils/Makefile (revision 307959) +++ devel/binutils/Makefile (working copy) @@ -2,8 +2,7 @@ # $FreeBSD$ PORTNAME= binutils -PORTVERSION= 2.22 -PORTREVISION= 3 +PORTVERSION= 2.23.1 CATEGORIES= devel MASTER_SITES= ${MASTER_SITE_SOURCEWARE} MASTER_SITE_SUBDIR= binutils/releases Index: devel/binutils/distinfo =================================================================== --- devel/binutils/distinfo (revision 307959) +++ devel/binutils/distinfo (working copy) @@ -1,2 +1,2 @@ -SHA256 (binutils-2.22.tar.bz2) = 6c7af8ed1c8cf9b4b9d6e6fe09a3e1d3d479fe63984ba8b9b26bf356b6313ca9 -SIZE (binutils-2.22.tar.bz2) = 19973532 +SHA256 (binutils-2.23.1.tar.bz2) = 2ab2e5b03e086d12c6295f831adad46b3e1410a3a234933a2e8fac66cb2e7a19 +SIZE (binutils-2.23.1.tar.bz2) = 21455321 Index: devel/binutils/files/patch-bfd__config.bfd =================================================================== --- devel/binutils/files/patch-bfd__config.bfd (revision 307959) +++ devel/binutils/files/patch-bfd__config.bfd (working copy) @@ -1,26 +0,0 @@ ---- ./bfd/config.bfd.orig 2011-07-29 00:35:13.000000000 +0200 -+++ ./bfd/config.bfd 2011-12-21 09:44:40.000000000 +0100 -@@ -1128,6 +1128,11 @@ - targ_selvecs=rs6000coff_vec - want64=true - ;; -+ powerpc64-*-freebsd*) -+ targ_defvec=bfd_elf64_powerpc_freebsd_vec -+ targ_selvecs="bfd_elf64_powerpc_vec bfd_elf32_powerpc_vec bfd_elf32_powerpc_freebsd_vec bfd_elf32_powerpcle_vec rs6000coff_vec rs6000coff64_vec aix5coff64_vec" -+ want64=true -+ ;; - powerpc64-*-elf* | powerpc-*-elf64* | powerpc64-*-linux* | \ - powerpc64-*-*bsd*) - targ_defvec=bfd_elf64_powerpc_vec -@@ -1140,6 +1145,11 @@ - want64=true - ;; - #endif -+ powerpc-*-*freebsd*) -+ targ_defvec=bfd_elf32_powerpc_freebsd_vec -+ targ_selvecs="rs6000coff_vec bfd_elf32_powerpc_vec bfd_elf32_powerpcle_vec ppcboot_vec" -+ targ64_selvecs="bfd_elf64_powerpc_vec bfd_elf64_powerpcle_vec bfd_elf64_powerpc_freebsd_vec" -+ ;; - powerpc-*-*bsd* | powerpc-*-elf* | powerpc-*-sysv4* | powerpc-*-eabi* | \ - powerpc-*-solaris2* | powerpc-*-linux-* | powerpc-*-rtems* | \ - powerpc-*-chorus*) Index: devel/binutils/files/patch-bfd__configure =================================================================== --- devel/binutils/files/patch-bfd__configure (revision 307959) +++ devel/binutils/files/patch-bfd__configure (working copy) @@ -1,18 +0,0 @@ ---- ./bfd/configure.orig 2011-11-21 12:55:48.000000000 +0100 -+++ ./bfd/configure 2011-12-21 09:44:40.000000000 +0100 -@@ -15262,6 +15262,7 @@ - bfd_elf32_pjl_vec) tb="$tb elf32-pj.lo elf32.lo $elf";; - bfd_elf32_powerpc_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;; - bfd_elf32_powerpcle_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;; -+ bfd_elf32_powerpc_freebsd_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;; - bfd_elf32_powerpc_vxworks_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;; - bfd_elf32_rx_le_vec) tb="$tb elf32-rx.lo elf32.lo $elf" ;; - bfd_elf32_rx_be_vec) tb="$tb elf32-rx.lo elf32.lo $elf" ;; -@@ -15327,6 +15328,7 @@ - bfd_elf64_mmix_vec) tb="$tb elf64-mmix.lo elf64.lo $elf" target_size=64 ;; - bfd_elf64_powerpc_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf"; target_size=64 ;; - bfd_elf64_powerpcle_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf" target_size=64 ;; -+ bfd_elf64_powerpc_freebsd_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf" target_size=64 ;; - bfd_elf64_s390_vec) tb="$tb elf64-s390.lo elf64.lo $elf"; target_size=64 ;; - bfd_elf64_sh64_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;; - bfd_elf64_sh64l_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;; Index: devel/binutils/files/patch-bfd__elf32-ppc.c =================================================================== --- devel/binutils/files/patch-bfd__elf32-ppc.c (revision 307959) +++ devel/binutils/files/patch-bfd__elf32-ppc.c (working copy) @@ -1,36 +0,0 @@ ---- ./bfd/elf32-ppc.c.orig 2011-11-21 10:29:21.000000000 +0100 -+++ ./bfd/elf32-ppc.c 2011-12-21 09:44:40.000000000 +0100 -@@ -9127,6 +9127,24 @@ - - #include "elf32-target.h" - -+/* FreeBSD Target */ -+ -+#undef TARGET_LITTLE_SYM -+#undef TARGET_LITTLE_NAME -+ -+#undef TARGET_BIG_SYM -+#define TARGET_BIG_SYM bfd_elf32_powerpc_freebsd_vec -+#undef TARGET_BIG_NAME -+#define TARGET_BIG_NAME "elf32-powerpc-freebsd" -+ -+#undef ELF_OSABI -+#define ELF_OSABI ELFOSABI_FREEBSD -+ -+#undef elf32_bed -+#define elf32_bed elf32_powerpc_fbsd_bed -+ -+#include "elf32-target.h" -+ - /* VxWorks Target */ - - #undef TARGET_LITTLE_SYM -@@ -9137,6 +9155,8 @@ - #undef TARGET_BIG_NAME - #define TARGET_BIG_NAME "elf32-powerpc-vxworks" - -+#undef ELF_OSABI -+ - /* VxWorks uses the elf default section flags for .plt. */ - static const struct bfd_elf_special_section * - ppc_elf_vxworks_get_sec_type_attr (bfd *abfd ATTRIBUTE_UNUSED, asection *sec) Index: devel/binutils/files/patch-bfd__elf64-ppc.c =================================================================== --- devel/binutils/files/patch-bfd__elf64-ppc.c (revision 307959) +++ devel/binutils/files/patch-bfd__elf64-ppc.c (working copy) @@ -1,25 +0,0 @@ ---- ./bfd/elf64-ppc.c.orig 2011-11-21 10:29:24.000000000 +0100 -+++ ./bfd/elf64-ppc.c 2011-12-21 09:44:40.000000000 +0100 -@@ -13897,3 +13897,22 @@ - } - - #include "elf64-target.h" -+ -+/* FreeBSD support */ -+ -+#undef TARGET_LITTLE_SYM -+#undef TARGET_LITTLE_NAME -+ -+#undef TARGET_BIG_SYM -+#define TARGET_BIG_SYM bfd_elf64_powerpc_freebsd_vec -+#undef TARGET_BIG_NAME -+#define TARGET_BIG_NAME "elf64-powerpc-freebsd" -+ -+#undef ELF_OSABI -+#define ELF_OSABI ELFOSABI_FREEBSD -+ -+#undef elf64_bed -+#define elf64_bed elf64_powerpc_fbsd_bed -+ -+#include "elf64-target.h" -+ Index: devel/binutils/files/patch-bfd__targets.c =================================================================== --- devel/binutils/files/patch-bfd__targets.c (revision 307959) +++ devel/binutils/files/patch-bfd__targets.c (working copy) @@ -1,34 +0,0 @@ ---- ./bfd/targets.c.orig 2011-08-17 02:39:38.000000000 +0200 -+++ ./bfd/targets.c 2011-12-21 09:44:40.000000000 +0100 -@@ -667,6 +667,7 @@ - extern const bfd_target bfd_elf32_pjl_vec; - extern const bfd_target bfd_elf32_powerpc_vec; - extern const bfd_target bfd_elf32_powerpcle_vec; -+extern const bfd_target bfd_elf32_powerpc_freebsd_vec; - extern const bfd_target bfd_elf32_powerpc_vxworks_vec; - extern const bfd_target bfd_elf32_rx_le_vec; - extern const bfd_target bfd_elf32_rx_be_vec; -@@ -729,6 +730,7 @@ - extern const bfd_target bfd_elf64_mmix_vec; - extern const bfd_target bfd_elf64_powerpc_vec; - extern const bfd_target bfd_elf64_powerpcle_vec; -+extern const bfd_target bfd_elf64_powerpc_freebsd_vec; - extern const bfd_target bfd_elf64_s390_vec; - extern const bfd_target bfd_elf64_sh64_vec; - extern const bfd_target bfd_elf64_sh64l_vec; -@@ -1033,6 +1035,7 @@ - &bfd_elf32_powerpc_vec, - &bfd_elf32_powerpc_vxworks_vec, - &bfd_elf32_powerpcle_vec, -+ &bfd_elf32_powerpc_freebsd_vec, - &bfd_elf32_rx_be_vec, - &bfd_elf32_rx_be_ns_vec, - &bfd_elf32_rx_le_vec, -@@ -1095,6 +1098,7 @@ - &bfd_elf64_mmix_vec, - &bfd_elf64_powerpc_vec, - &bfd_elf64_powerpcle_vec, -+ &bfd_elf64_powerpc_freebsd_vec, - &bfd_elf64_s390_vec, - &bfd_elf64_sh64_vec, - &bfd_elf64_sh64l_vec, Index: devel/binutils/files/patch-gas__config__tc-ppc.c =================================================================== --- devel/binutils/files/patch-gas__config__tc-ppc.c (revision 307959) +++ devel/binutils/files/patch-gas__config__tc-ppc.c (working copy) @@ -1,13 +0,0 @@ ---- ./gas/config/tc-ppc.c.orig 2011-06-14 11:03:51.000000000 +0200 -+++ ./gas/config/tc-ppc.c 2011-12-21 09:44:40.000000000 +0100 -@@ -1370,7 +1370,9 @@ - #endif - #endif - #ifdef OBJ_ELF --# ifdef TE_VXWORKS -+# ifdef TE_FreeBSD -+ return (ppc_obj64 ? "elf64-powerpc-freebsd" : "elf32-powerpc-freebsd"); -+# elif defined (TE_VXWORKS) - return "elf32-powerpc-vxworks"; - # else - return (target_big_endian Index: devel/binutils/files/patch-ld__Makefile.in =================================================================== --- devel/binutils/files/patch-ld__Makefile.in (revision 307959) +++ devel/binutils/files/patch-ld__Makefile.in (working copy) @@ -1,29 +0,0 @@ ---- ./ld/Makefile.in.orig 2011-07-22 22:22:37.000000000 +0200 -+++ ./ld/Makefile.in 2011-12-21 09:44:40.000000000 +0100 -@@ -783,6 +783,7 @@ - eelf64ltsmip_fbsd.c \ - eelf64mmix.c \ - eelf64ppc.c \ -+ eelf64ppc_fbsd.c \ - eelf64tilegx.c \ - eelf_l1om.c \ - eelf_l1om_fbsd.c \ -@@ -1180,6 +1181,7 @@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64ltsmip_fbsd.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64mmix.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64ppc.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64ppc_fbsd.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64tilegx.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386_be.Po@am__quote@ -@@ -3425,6 +3427,10 @@ - ldemul-list.h \ - $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} - ${GENSCRIPTS} elf64ppc "$(tdir_elf64ppc)" -+eelf64ppc_fbsd.c: $(srcdir)/emulparams/elf64ppc_fbsd.sh \ -+ $(srcdir)/emultempl/ppc64elf.em ldemul-list.h \ -+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} -+ ${GENSCRIPTS} elf64ppc_fbsd "$(tdir_elf64ppc_fbsd)" - eelf64tilegx.c: $(srcdir)/emulparams/elf64tilegx.sh \ - $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/needrelax.em \ - $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} Index: devel/binutils/files/patch-ld__configure.tgt =================================================================== --- devel/binutils/files/patch-ld__configure.tgt (revision 307959) +++ devel/binutils/files/patch-ld__configure.tgt (working copy) @@ -1,22 +0,0 @@ ---- ./ld/configure.tgt.orig 2011-11-21 10:29:37.000000000 +0100 -+++ ./ld/configure.tgt 2011-12-21 09:44:40.000000000 +0100 -@@ -453,10 +453,17 @@ - pj*-*-*) targ_emul=pjelf - ;; - powerpc-*-freebsd* | powerpc-*-kfreebsd*-gnu) -- targ_emul=elf32ppc_fbsd; -- targ_extra_emuls="elf32ppc elf32ppcsim"; -+ targ_emul=elf32ppc_fbsd -+ targ_extra_emuls="elf32ppc elf32ppcsim" - targ_extra_libpath=elf32ppc; - tdir_elf32ppcsim=`echo ${targ_alias} | sed -e 's/ppc/ppcsim/'` ;; -+powerpc64-*-freebsd*) -+ targ_emul=elf64ppc_fbsd -+ targ_extra_emuls="elf64ppc elf32ppc_fbsd elf32ppc" -+ targ_extra_libpath="elf32ppc_fbsd elf32ppc" -+ tdir_elf32ppc=`echo "${targ_alias}" | sed -e 's/64//'` -+ tdir_elf32ppc_fbsd=$tdir_elf32ppc -+ ;; - powerpc*-*-linux*) case "${targ}" in - *64*) targ_emul=elf64ppc - targ_extra_emuls="elf32ppclinux elf32ppc elf32ppcsim" Index: devel/binutils/files/patch-ld__emulparams__elf32ppc_fbsd.sh =================================================================== --- devel/binutils/files/patch-ld__emulparams__elf32ppc_fbsd.sh (revision 307959) +++ devel/binutils/files/patch-ld__emulparams__elf32ppc_fbsd.sh (working copy) @@ -1,8 +0,0 @@ ---- ./ld/emulparams/elf32ppc_fbsd.sh.orig 2002-02-18 10:38:01.000000000 +0100 -+++ ./ld/emulparams/elf32ppc_fbsd.sh 2011-12-21 09:44:40.000000000 +0100 -@@ -1,2 +1,5 @@ - . ${srcdir}/emulparams/elf32ppc.sh - . ${srcdir}/emulparams/elf_fbsd.sh -+ -+OUTPUT_FORMAT="elf32-powerpc-freebsd" -+ Index: devel/binutils/files/patch-ld__emulparams__elf64ppc_fbsd.sh =================================================================== --- devel/binutils/files/patch-ld__emulparams__elf64ppc_fbsd.sh (revision 307959) +++ devel/binutils/files/patch-ld__emulparams__elf64ppc_fbsd.sh (working copy) @@ -1,9 +0,0 @@ ---- ./ld/emulparams/elf64ppc_fbsd.sh.orig 2011-12-21 09:44:40.000000000 +0100 -+++ ./ld/emulparams/elf64ppc_fbsd.sh 2011-12-21 09:44:40.000000000 +0100 -@@ -0,0 +1,6 @@ -+. ${srcdir}/emulparams/elf64ppc.sh -+. ${srcdir}/emulparams/elf_fbsd.sh -+ -+OUTPUT_FORMAT="elf64-powerpc-freebsd" -+DEFAULT_PLT_STATIC_CHAIN=1 -+ Index: devel/binutils/files/patch-ld__emultempl__ppc64elf.em =================================================================== --- devel/binutils/files/patch-ld__emultempl__ppc64elf.em (revision 307959) +++ devel/binutils/files/patch-ld__emultempl__ppc64elf.em (working copy) @@ -1,11 +0,0 @@ ---- ./ld/emultempl/ppc64elf.em.orig 2011-11-21 10:29:39.000000000 +0100 -+++ ./ld/emultempl/ppc64elf.em 2011-12-21 09:44:40.000000000 +0100 -@@ -62,7 +62,7 @@ - static int no_toc_sort = 0; - - /* Set if PLT call stubs should load r11. */ --static int plt_static_chain = 0; -+static int plt_static_chain = ${DEFAULT_PLT_STATIC_CHAIN-0}; - - /* Whether to emit symbols for stubs. */ - static int emit_stub_syms = -1; Index: devel/binutils/pkg-plist =================================================================== --- devel/binutils/pkg-plist (revision 307959) +++ devel/binutils/pkg-plist (working copy) @@ -67,8 +67,15 @@ %%NLS%%share/locale/id/LC_MESSAGES/gas.mo %%NLS%%share/locale/id/LC_MESSAGES/ld.mo %%NLS%%%%GOLD%%share/locale/id/LC_MESSAGES/gold.mo +%%NLS%%share/locale/it/LC_MESSAGES/binutils.mo +%%NLS%%share/locale/it/LC_MESSAGES/gprof.mo +%%NLS%%share/locale/it/LC_MESSAGES/ld.mo +%%NLS%%share/locale/it/LC_MESSAGES/opcodes.mo +%%NLS%%%%GOLD%%share/locale/it/LC_MESSAGES/gold.mo %%NLS%%share/locale/ja/LC_MESSAGES/bfd.mo %%NLS%%share/locale/ja/LC_MESSAGES/binutils.mo +%%NLS%%share/locale/ja/LC_MESSAGES/gas.mo +%%NLS%%share/locale/ja/LC_MESSAGES/gprof.mo %%NLS%%share/locale/ja/LC_MESSAGES/ld.mo %%NLS%%share/locale/ms/LC_MESSAGES/gprof.mo %%NLS%%share/locale/nl/LC_MESSAGES/gprof.mo @@ -88,6 +95,7 @@ %%NLS%%share/locale/rw/LC_MESSAGES/gas.mo %%NLS%%share/locale/rw/LC_MESSAGES/gprof.mo %%NLS%%share/locale/sk/LC_MESSAGES/binutils.mo +%%NLS%%share/locale/sr/LC_MESSAGES/gprof.mo %%NLS%%share/locale/sv/LC_MESSAGES/bfd.mo %%NLS%%share/locale/sv/LC_MESSAGES/binutils.mo %%NLS%%share/locale/sv/LC_MESSAGES/gprof.mo @@ -99,7 +107,11 @@ %%NLS%%share/locale/tr/LC_MESSAGES/gprof.mo %%NLS%%share/locale/tr/LC_MESSAGES/ld.mo %%NLS%%share/locale/tr/LC_MESSAGES/opcodes.mo +%%NLS%%share/locale/uk/LC_MESSAGES/bfd.mo %%NLS%%share/locale/uk/LC_MESSAGES/binutils.mo +%%NLS%%share/locale/uk/LC_MESSAGES/gprof.mo +%%NLS%%share/locale/uk/LC_MESSAGES/ld.mo +%%NLS%%share/locale/uk/LC_MESSAGES/opcodes.mo %%NLS%%share/locale/vi/LC_MESSAGES/bfd.mo %%NLS%%share/locale/vi/LC_MESSAGES/binutils.mo %%NLS%%share/locale/vi/LC_MESSAGES/gprof.mo --------------000501090506000105040402-- From owner-freebsd-toolchain@FreeBSD.ORG Fri Nov 30 11:21:05 2012 Return-Path: Delivered-To: freebsd-toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 643F6FF8 for ; Fri, 30 Nov 2012 11:21:05 +0000 (UTC) (envelope-from pete.chou@gmail.com) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) by mx1.freebsd.org (Postfix) with ESMTP id C7A458FC12 for ; Fri, 30 Nov 2012 11:21:04 +0000 (UTC) Received: by mail-lb0-f182.google.com with SMTP id go10so461105lbb.13 for ; Fri, 30 Nov 2012 03:21:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=sUfzXb+j2eUrMC/OHlo4Je7dX/aDaoMiTHBDm/xPckY=; b=w4tX/FefIrQtSfw7zPzFtd5c7O/fQcvz75B/X8z/32tmQN9xP8mnivPukVNWjlDdum iJ8KVn3rwwGtXcgiR+MKR9YRdcjKZHwrqqS4rqYZN0iIEnbtNnGwM5RCmB5yh/Qyhutu DRSwMUhJ90OH+2aIKr8rCLxB6alHPCgT0EZE5KcWSfb1G7K2l0WXVKQNXcvtQEPe5cOK 6v6z8zXBGxn/UQUfEpN8FeaVRIsHL9yIabQ6+wXqv77l/oQ6eGbE/OW8sqvzhE0Ab8gM wmDus01mTrK9FKZ52oDjUh/u3R5S5iNop7sdz1RAUA08Bs5MQooSXhviM2R7b5KNaiT3 3AFw== Received: by 10.112.9.135 with SMTP id z7mr684744lba.66.1354274463119; Fri, 30 Nov 2012 03:21:03 -0800 (PST) MIME-Version: 1.0 Sender: pete.chou@gmail.com Received: by 10.114.69.131 with HTTP; Fri, 30 Nov 2012 03:20:32 -0800 (PST) In-Reply-To: References: From: pete Date: Fri, 30 Nov 2012 19:20:32 +0800 X-Google-Sender-Auth: SbdBGexFVtHTn4MuR9yt0erdlK4 Message-ID: Subject: Re: crunchide breaks object files when using mclinker to do base system linking To: Erik Cederstrand Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: freebsd-toolchain@freebsd.org X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Nov 2012 11:21:05 -0000 I made a patch at http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/174011 Not sure if it looks good to you since the changes are not small. With this patch, crunchide is able to handle object files generated by both gold and mclinker. And if using input from gnu ld, patched crunchide produces exactly the same output as before. However, now I check my patch on X86 FreeBSD only. Thanks, Pete On Tue, Nov 27, 2012 at 4:16 PM, Erik Cederstrand wrote: > Den 27/11/2012 kl. 09.00 skrev pete : > > > Hi, > > > > I meet a problem when using mclinker to do base system linking. And the > > problem is crunchide is gnu ld specific. it presumes the section layout > of > > a object file is like what gnu ld generates. > > > > To make it clear, gnu ld would generate the following layout. And > crunchide > > will update elf section header, symbol table, and then string table. (The > > string table is likely enlarged.) > > > > ld -dc -r -o cat.lo cat_stub.o > > /usr/obj/usr/src/rescue/rescue//usr/src/bin/cat/cat.o > > crunchide -k _crunched_cat_stub cat.lo > > > > ----gnu ld------------ > > + elf header + > > ---------------------- > > + + > > + + > > ---------------------- > > + elf section header + > > ---------------------- > > + symbol table + > > ---------------------- > > + string table + > > ---------------------- > > > > However, mclinker does not produce this layout, but put elf section > header > > in the end of file. And then crunchide will break the object file > generated > > by mclinker. (elf section header is overwritten by new strings) > > > > I know the layout generated by gold linker is also different to gnu ld. > On > > the other hand, we can find only ELF header is required to be fixed in > *"System > > V Application Binary Interface*". > > > > For mclinker, I think it's not difficult to add the change to be > compatible > > with gnu ld. But do you think if it will be better to modify crunchide > > utility to support more elf linkers? > > > Unless you have compelling technical reasons to keep your layout, I think > it's better for mclinker to be as compatible with GNU ld as possible, even > though your layout also adheres to the standards. If other tools in FreeBSD > or other platforms also make assumptions about the header layout, you'll > end up patching lots of tools instead of working on mclinker. > > With that in mind, I also think it's worthwhile to patch our crunchide to > be more permissive. If you have the resources, please send patches. > > Thanks, > Erik From owner-freebsd-toolchain@FreeBSD.ORG Sat Dec 1 15:53:30 2012 Return-Path: Delivered-To: toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C3E93FF7; Sat, 1 Dec 2012 15:53:30 +0000 (UTC) (envelope-from hans@beastielabs.net) Received: from mail.beastielabs.net (beasties.demon.nl [82.161.3.114]) by mx1.freebsd.org (Postfix) with ESMTP id 261448FC18; Sat, 1 Dec 2012 15:53:28 +0000 (UTC) Received: from merom.hotsoft.nl (merom.hotsoft.nl [192.168.0.12]) by mail.beastielabs.net (8.14.5/8.14.5) with ESMTP id qB1FrLA1064115; Sat, 1 Dec 2012 16:53:21 +0100 (CET) (envelope-from hans@beastielabs.net) Message-ID: <50BA27F1.3080002@beastielabs.net> Date: Sat, 01 Dec 2012 16:53:21 +0100 From: Hans Ottevanger User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Niclas Zeising Subject: Re: [CFT] devel/binutils 2.23 References: <201211141445.qAEEjTXQ047896@mech-cluster241.men.bris.ac.uk> <50A3FCEF.9060204@freebsd.org> <50A4A5A2.2000902@beastielabs.net> <50A4A69B.7030200@freebsd.org> <50B76AC2.4050207@freebsd.org> In-Reply-To: <50B76AC2.4050207@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: toolchain@freebsd.org X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Dec 2012 15:53:30 -0000 On 11/29/12 15:01, Niclas Zeising wrote: > On 11/15/12 09:23, Niclas Zeising wrote: >> On 2012-11-15 09:19, Hans Ottevanger wrote: >>> On 11/14/12 21:19, Niclas Zeising wrote: >>>> On 11/14/12 15:45, Anton Shterenlikht wrote: >>>>> It installed fine on ia64 and sparc64, both -current. >>>>> I don't know how to test. Please advise if there are >>>>> simple tests. >>>>> >>>>> Also, just to check, I manually deleted *orig files >>>>> from under files/ after applying the patch: >>>>> >>>>> # ls -al /usr/ports/devel/binutils/files/ >>>>> total 20 >>>>> drwxr-xr-x 2 root wheel 1024 Nov 14 12:58 . >>>>> drwxr-xr-x 4 root wheel 512 Nov 14 13:00 .. >>>>> -rw-r--r-- 1 root wheel 353 Nov 14 12:55 patch-bfd_Makefile.in >>>>> -rw-r--r-- 1 root wheel 297 Nov 14 12:55 patch-gold_Makefile.in >>>>> -rw-r--r-- 1 root wheel 471 Nov 14 12:55 patch-gold_script.cc >>>>> # >>>>> >>>>> because I think all files in this directory >>>>> will be used as patches, no matter the name. >>>>> Am I wrong? >>>>> >>>>> Anton >>>> >>>> Just compile test some binaries and see that they link and work ok. >>>> The .orig files are left over when running patch, and has to be removed. >>>> Sorry if I wasn't clear on that in my previous mail. >>>> Thanks for testing! >>>> Regards! >>> >>> Please be aware that apparently something went wrong with the release of >>> binutils-2.23 (see the discussion ending in: >>> >>> http://sourceware.org/ml/binutils/2012-10/msg00339.html >>> >>> though I doubt the glitches will affect your usage) and it has been >>> re-released as binutils-2.23.1. Maybe it is better to base the update if >>> the binutils port on that release. >>> >> >> I noticed that late last night, but haven't had time to update the patch >> yet. Thank you for pointing it out. >> Regards! >> > > Hi! > Apologies for the delay. Attached is a patch that updates binutils from > 2.22 to 2.23.1. Please test it. The plan is to commit it once 9.1 is > out the door and the feature freeze on the ports tree is lifted. > Regards! > I tested your patch on amd64 and i386 systems (all a recent 8.3-STABLE r243569). The patch applied cleanly and the resulting port compiled without problems, both by directly using make and by using portmaster. I tested the results by recompiling a fairly large application (my gcc based cross-build environment for embedded development) using gcc 4.7 from the ports and the new binutils-2.23.1 on both i386 and amd64, Everything functioned as it should and up to now there were no surprises whatsoever. I do not have the systems to test the other architectures, but I will retest on the 10.0-CURRENT i386 and amd64 systems that I expect to install one of these days. I will come back to you to report on that. Kind regards, Hans Ottevanger