Subject: Re: lib/36511: lcc is an ANSI C compiler for a variety of platforms
To: None <lib-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: Christos Zoulas <christos@zoulas.com>
List: netbsd-bugs
Date: 06/20/2007 17:30:09
The following reply was made to PR lib/36511; it has been noted by GNATS.

From: christos@zoulas.com (Christos Zoulas)
To: Aleksey Cheusov <cheusov@tut.by>
Cc: matthew green <mrg@eterna.com.au>, lib-bug-people@netbsd.org,
	gnats-admin@netbsd.org, netbsd-bugs@netbsd.org, gnats-bugs@NetBSD.org
Subject: Re: lib/36511: lcc is an ANSI C compiler for a variety of platforms
Date: Wed, 20 Jun 2007 13:27:46 -0400

 On Jun 20,  8:24pm, cheusov@tut.by (Aleksey Cheusov) wrote:
 -- Subject: Re: lib/36511: lcc is an ANSI C compiler for a variety of platfor
 
 | > On Jun 20,  9:47am, mrg@eterna.com.au (matthew green) wrote:
 | > -- Subject: re: lib/36511: lcc is an ANSI C compiler for a variety of platfor
 | 
 | > | 
 | > | the lcc package needs to have it's own sys/cdefs.h updated to a modern
 | > | netbsd.  (and perhaps some magic to make it work on older release?)
 | > | 
 | > | see pkgsrc/devel/lcc/files/cdefs.h.
 | 
 | > I think that we can add an #ifdef __LCC__ and fix the RENAME() macro
 | > in cdefs.h.
 | 
 | RENAME macro is defined in lcc's cdefs.h but after #including cdecl_elf.h.
 
 That is why we should not make local copies of those file.
 
 | How about about fixing
 |       #if __STDC__
 | !         ^^^^^^^^
 |       #define ___RENAME(x)    __asm(___STRING(_C_LABEL(x)))
 |       #else
 |       #ifdef __LEADING_UNDERSCORE
 |       ...
 | 
 | and 
 | 
 |       #if __STDC__
 | !         ^^^^^^^^
 |       #define __strong_alias(alias,sym)                      \
 |       __asm(".global " _C_LABEL_STRING(#alias) "\n"          \
 |       _C_LABEL_STRING(#alias) " = " _C_LABEL_STRING(#sym));
 | 
 | 
 | P.S.
 | wip/tcc has the same problem
 | 
 | 0 ~>tcc -c -o main.o main.c 
 | In file included from main.c:1:
 | In file included from /usr/include/stdio.h:40:
 | /usr/include/sys/cdefs.h:254: #error "No function renaming possible"
 | 1 ~>tcc -v 
 | tcc version 0.9.22
 | 0 ~>
 
 I don't understand what to fix here....
 
 christos