Return-Path: Delivered-To: apmail-stdcxx-dev-archive@www.apache.org Received: (qmail 15118 invoked from network); 8 Mar 2011 15:11:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 8 Mar 2011 15:11:20 -0000 Received: (qmail 61244 invoked by uid 500); 8 Mar 2011 15:11:20 -0000 Delivered-To: apmail-stdcxx-dev-archive@stdcxx.apache.org Received: (qmail 61190 invoked by uid 500); 8 Mar 2011 15:11:19 -0000 Mailing-List: contact dev-help@stdcxx.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@stdcxx.apache.org Delivered-To: mailing list dev@stdcxx.apache.org Received: (qmail 61182 invoked by uid 99); 8 Mar 2011 15:11:19 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Mar 2011 15:11:19 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=MSGID_MULTIPLE_AT,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of wojciech.meyer@arm.com designates 94.185.240.25 as permitted sender) Received: from [94.185.240.25] (HELO service87.mimecast.com) (94.185.240.25) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 08 Mar 2011 15:11:10 +0000 Received: from cam-owa2.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Tue, 08 Mar 2011 15:10:49 +0000 Received: from E102393 ([10.1.255.212]) by cam-owa2.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 8 Mar 2011 15:10:46 +0000 From: "Wojciech Meyer" To: "'Martin Sebor'" Cc: References: <4D72B23D.3090309@gmail.com> In-Reply-To: Subject: RE: patch for STDCXX-1051 Date: Tue, 8 Mar 2011 15:10:43 -0000 Message-ID: <001001cbdda2$fe9b4460$fbd1cd20$@Meyer@arm.com> MIME-Version: 1.0 X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AcvbgJzDQuw1np51RNOeliQRp3xVggBLvtewADyOEFA= Content-Language: en-gb X-OriginalArrivalTime: 08 Mar 2011 15:10:46.0429 (UTC) FILETIME=[004794D0:01CBDDA3] X-MC-Unique: 111030815104901601 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org > > 2) Removed the changes to the link and compile_then_link > > functions. Because of the comments within them these > > were effectively commented out and had no effect. > > I also don't understand why the chmod +x command is > > necessary. The linker should set the executable bit after > > a successful link. There is one linker (HP) that fails (or > > used to) to delete the output file on failure (maybe when > > when it crashes). With that linker the only way to tell > > that the file is bad (other than the exit status of the > > linker) is by examining the executable bit. > I don't remember why I did this, but I remember it was something > that I needed to do, probably it was related somewhat to > cross-compilation. Now I know! The reason behind it, is that our linker which performs linking *does not* setup executable flag on the destination file. It's an image which should not be executed directly anyway. Now, it would be all fine besides that stdcxx build system checks for this flag here (..) etc/config/GNUmakefile.cfg:247: elif [ ! -x $$file ] ; then \ nm -gp $$file.o 2>&1 | grep "T *main *$$" >/dev/null ; \ test -f $$file.o -a ! $$? -eq 0 ; \ else \ echo "./$$file" >>$(LOGFILE) ; \ LD_LIBRARY_PATH=3D$$LD_LIBRARY_PATH:. ; = \ LIBPATH=3D$$LIBPATH:. ; = \ export LIBPATH LD_LIBRARY_PATH ; \ text=3D`./$$file` ; = \ fi; \ (..) So, I needed to do it manually to ensure it does search for that. Using this shell trickery everything seems to work fine. Let me know your thoughts. Thanks! Wojciech