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: Aleksey Cheusov <cheusov@tut.by>
List: netbsd-bugs
Date: 06/20/2007 17:30:03
The following reply was made to PR lib/36511; it has been noted by GNATS.

From: Aleksey Cheusov <cheusov@tut.by>
To: christos@zoulas.com (Christos Zoulas)
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 20:24:53 +0300

 > 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.
 
 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 ~>
 
 -- 
 Best regards, Aleksey Cheusov.