Subject: re: gcc3 status?
To: matthew green <mrg@eterna.com.au>
From: M L Riechers <mlr@rse.com>
List: tech-toolchain
Date: 06/23/2003 14:03:31
On Mon, 23 Jun 2003 16:13:20 +1000 matthew green <mrg@eterna.com.au>:
(attr) On Tue, 8 Apr 2003 18:13:34 -0700, Jason Thorpe
(attr) <thorpej@wasabisystems.com> actually, IIMAD:
> powerpc-netbsd almost-yes (there is an ABI mismatch with
> our in-tree 2.95.3 that needs
> to be addressed in the 3.3 code
> base)
>
>
> did anyone ever explain what the problem is? to me, it always
> manifested itself in programs passing va_list arguments failing
> to compile. the following patch appears to let this work...i'm
> not entirely sure it's correct, but i appear to be able to build
> general software with this change. all it does it make the
> va_list typedef not be a one-member structure in the gcc3 case,
> but just the plain member. this matches the GCC defintion...
(rest of missive deleted.)
Hmmm. (For purposes of QAD 823 Hack,) we did this, and nothing else
(well, we bit the sh/mk files also):
===============================================================================
*** powerpc/ansi.h~ Tue Mar 25 14:09:42 2003
--- powerpc/ansi.h Tue Apr 8 19:38:53 2003
***************
*** 66,82 ****
#define _BSD_TIMER_T_ int /* timer_t */
#define _BSD_SUSECONDS_T_ int /* suseconds_t */
#define _BSD_USECONDS_T_ unsigned int /* useconds_t */
! #ifdef _LP64
#define _BSD_VA_LIST_ __builtin_va_list /* GCC builtin type */
#else
#define _BSD_VA_LIST_ __va_list /* va_list */
typedef struct {
- #if __GNUC_PREREQ__(3, 0)
- __builtin_va_list __va;
- #else
char __gpr, __fpr, __pad[2];
char *__stack, *__base;
- #endif
} __va_list;
#endif
--- 66,79 ----
#define _BSD_TIMER_T_ int /* timer_t */
#define _BSD_SUSECONDS_T_ int /* suseconds_t */
#define _BSD_USECONDS_T_ unsigned int /* useconds_t */
! /*#ifdef _LP64*/
! #if __GNUC_PREREQ__(3, 0)
#define _BSD_VA_LIST_ __builtin_va_list /* GCC builtin type */
#else
#define _BSD_VA_LIST_ __va_list /* va_list */
typedef struct {
char __gpr, __fpr, __pad[2];
char *__stack, *__base;
} __va_list;
#endif
===============================================================================
which seems to be your patch. We used a pre-release gcc3.3, and it
built ok, except for g++; we compiled kernels for the MPC823 using gcc
2.95 but used gcc3.3 with soft-float for user land. Except for some
mysterious bash crashes, which may or may not be gcc's fault, it's
worked ok.
Biggest problems we had were, how to call gcc3.3 during the build
process, how to resolve the conflicts between NetBSD's softfloat and
gcc3.3's softfloat, the lack of a g++ compiler, and confusions with
the the crt modules. However, we since then compiled a gcc3.3 release
version, and magically had no softfloat conflicts. Maybe somebody did
something? But we've not actually tested this compile.
We've set aside a hard disc on our mac 7500 to chroot to as the build
environment. Right now we're puzzling how to install gcc3.3 as the
default system compiler, but, as things are in a small lull, hopefully
waiting for gcc3.3 to become the default -current compiler.
So, FWIW, gcc3.3 seems to work fine for us, so, even though we've not
yet attempted a kernel compile, with your patches, I'd say it's a go
to integrate.
And, thanks to all who helped guide us somewhat cvs and sh challenged
with this compile.
Kind regards,
-Mike