From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25021 invoked by alias); 1 Jun 2012 18:43:45 -0000 Received: (qmail 24905 invoked by uid 22791); 1 Jun 2012 18:43:44 -0000 X-SWARE-Spam-Status: No, hits=1.8 required=5.0 tests=AWL,BAYES_00,BOTNET,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_NO,RCVD_IN_HOSTKARMA_YE,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from vms173021pub.verizon.net (HELO vms173021pub.verizon.net) (206.46.173.21) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 01 Jun 2012 18:43:31 +0000 Received: from [10.97.33.69] ([unknown] [151.188.105.156]) by vms173021.mailsrvcs.net (Sun Java(tm) System Messaging Server 7u2-7.02 32bit (built Apr 16 2009)) with ESMTPA id <0M4Y006S0C00X11B@vms173021.mailsrvcs.net> for gcc-patches@gcc.gnu.org; Fri, 01 Jun 2012 13:43:13 -0500 (CDT) Message-id: <4FC90D40.7050901@verizon.net> Date: Fri, 01 Jun 2012 18:43:00 -0000 From: rbmj User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120329 Thunderbird/11.0.1 MIME-version: 1.0 To: gcc-patches@gcc.gnu.org Subject: Re: Fix gcc/gcov.c and libgcc/libgcov.c to fix build on VxWorks References: <4FC90C96.4030507@verizon.net> In-reply-to: <4FC90C96.4030507@verizon.net> Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2012-06/txt/msg00087.txt.bz2 On 06/01/2012 02:40 PM, rbmj wrote: > Hi everyone, > > These fixes are to allow building on vxWorks. Currently there are two > issues: > > 1. VxWorks does not have a variadic open - it must receive three > arguments. gcc/gcov.c however opens a file for reading and does not > pass in a mode argument, which causes an error on vxWorks. This just > adds a platform-based ifdef around this. I am aware that this is > against coding conventions, and if that is an issue, I can think of > two resolutions. One, an autoconf macro to check for a non-variadic > open, or two, simply pass the extra mode argument in unconditionally, > as it should be transparent to the function and ignored if it is > variadic (I'm no expert on calling conventions though). > > 2. VxWorks has a two argument mkdir(). libgcc/libgcov.c uses mkdir() > and calls it with two arguments if TARGET_POSIX_IO is defined and only > one argument otherwise. I don't know what TARGET_POSIX_IO is, but if > it's anything more than just mkdir(), this is probably correct, as > vxworks is only partially POSIX compliant. Again, another > platform-based ifdef, so if that is anathema, it can be replaced by > more autoconf hackery. > > The patch as-is compiles targeting on vxworks and bootstraps on a > native x86_64-linux-gnu build (which makes sense, since it doesn't > touch anything for non-vxworks). > > Gerald Pfeifer has volunteered to apply the patch if approved. > > Also, in an earlier message [1] Janne Blomqvist mentioned that newer > versions of VxWorks do have the variadic open(), and this is true. > However, as far as I know, this version is still not available for > kernel modules, only real-time processes. > > Thanks, > > Robert Mason Sorry, forgot to add in the link. [1]: http://gcc.gnu.org/ml/gcc-patches/2012-05/msg01102.html