From mboxrd@z Thu Jan 1 00:00:00 1970 Mime-Version: 1.0 (Apple Message framework v752.3) In-Reply-To: <3C3F92CD-00DC-41E2-960F-8E092A993F5D@orthanc.ca> References: <3C3F92CD-00DC-41E2-960F-8E092A993F5D@orthanc.ca> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <57E60D32-521B-40CC-BE6C-4D30A1EC7DDB@mac.com> Content-Transfer-Encoding: 7bit From: Pietro Gagliardi Subject: Re: [9fans] Re: Ruby port Date: Mon, 12 Nov 2007 20:25:19 -0500 To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu> Topicbox-Message-UUID: f606ae4c-ead2-11e9-9d60-3106f5b1d025 for (x in gcc/src/*.[chyl7s]) { # All this nonsense is simply to avoid useful and/or standard things like __FILE__ or __STDC__ */ sed 's/__asm__//g s/__extension__//g s/__inline__//g s/__typeof__//g s/__restrict__//g s/__builtin_[a-zA-Z0-9_][a-zA-Z0-9_]*//g s/__cxa_atexit//g s/__cxa_get_exception_ptr//g s/__attribute__//g s/__null//g s/__strong//g s/__weak//g s/__int64//g' $x > $x^.new # keep going # note that we need a little extra work for __attribute__ mv $x^.new $x } On Nov 12, 2007, at 7:59 PM, Lyndon Nerenberg wrote: > > On 2007-Nov-12, at 11:39 , Steve Simon wrote: > >> Is the "problem" more the lack of g++ and perhaps >> glibc than the gcc C compiler itself or am I >> missing somthing. > > I find that > 90% of the problem is code that makes use of all the > __(foo)__ attribute crud in function declarations. It shouldn't be > difficult to write a tool to strip that nonsense out. > > Alternatively you could teach the compilers to recognize and ignore > those constructs, but my personal preference is to just elide the > bits from the source at import. Even ignoring them lends them more > credibility than my morals allow ;-P > > -lyndon