[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pcc-list
Subject:    Re: pcc-0.9.9: NetBSD 1.6 on IA-32
From:       Hauke Fath <hauke () Espresso ! Rhein-Neckar ! DE>
Date:       2009-05-14 5:30:56
Message-ID: l03102800c6315c802669 () q840 ! causeuse ! org
[Download RAW message or body]

At 19:27 Uhr -0600 13.5.2009, Nelson H. F. Beebe wrote:
>Here are notes made in attempting to port pcc-0.9.9 to NetBSD 1.6 on
>IA-32 (aka x86):
>
>Build successful.  However, compilations fail:
>
>% pcc ~/c/hello.c && ./a.out
>/usr/include//sys/cdefs.h:212: error: "No function renaming possible"
>
>%  sed -n -e 205,215p /usr/include//sys/cdefs.h
>#if !defined(_STANDALONE) && !defined(_KERNEL)
>#ifdef __GNUC__
>#define __RENAME(x)     ___RENAME(x)
>#else
>#ifdef __lint__
>#define __RENAME(x)     __symbolrename(x)
>#else
> #error "No function renaming possible"
>#endif /* __lint__ */
>#endif /* __GNUC__ */
>#else /* _STANDALONE || _KERNEL */


<sys/cdefs.h> on NetBSD versions before pcc import needs to be patched like

@@ -236,7 +261,7 @@
 #endif /* _KERNEL */

 #if !defined(_STANDALONE) && !defined(_KERNEL)
-#ifdef __GNUC__
+#if defined(__GNUC__) || defined(__PCC__)
 #define        __RENAME(x)     ___RENAME(x)
 #else
 #ifdef __lint__

(from a diff between the netbsd-2 and netbsd-5 versions).

	hauke


--
"It's never straight up and down"     (DEVO)


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic