Subject: cross compile on solaris fails using SunStudio Compiler
To: None <current-users@netbsd.org>
From: Kurt Schreiner <ks@ub.uni-mainz.de>
List: current-users
Date: 09/05/2006 17:02:22
Hi,

im trying to cross compile -current on a solaris 11 box (for i386 today ;-)
and there's seems to be a serious(?) problem:

    compile  makefs/cd9660.lo
"/u/NetBSD/src/tools/makefs/../../usr.sbin/makefs/cd9660.c", line 104: warning: syntax error:  empty declaration
"/u/NetBSD/src/sys/fs/cd9660/iso.h", line 174: warning: no explicit type given
"/u/NetBSD/src/sys/fs/cd9660/iso.h", line 174: syntax error before or at: int
"/u/NetBSD/src/sys/fs/cd9660/iso.h", line 175: warning: no explicit type given
"/u/NetBSD/src/sys/fs/cd9660/iso.h", line 175: syntax error before or at: int
"/u/NetBSD/src/sys/fs/cd9660/iso.h", line 176: warning: no explicit type given
"/u/NetBSD/src/sys/fs/cd9660/iso.h", line 176: syntax error before or at: uint16_t
"/u/NetBSD/src/sys/fs/cd9660/iso.h", line 177: warning: no explicit type given
"/u/NetBSD/src/sys/fs/cd9660/iso.h", line 177: syntax error before or at: uint16_t
"/u/NetBSD/src/sys/fs/cd9660/iso.h", line 178: warning: no explicit type given
"/u/NetBSD/src/sys/fs/cd9660/iso.h", line 178: syntax error before or at: uint16_t
"/u/NetBSD/src/sys/fs/cd9660/iso.h", line 179: warning: no explicit type given
"/u/NetBSD/src/sys/fs/cd9660/iso.h", line 179: syntax error before or at: uint32_t
"/u/NetBSD/src/sys/fs/cd9660/iso.h", line 180: warning: no explicit type given
"/u/NetBSD/src/sys/fs/cd9660/iso.h", line 180: syntax error before or at: uint32_t
"/u/NetBSD/src/sys/fs/cd9660/iso.h", line 181: warning: no explicit type given
"/u/NetBSD/src/sys/fs/cd9660/iso.h", line 181: syntax error before or at: uint32_t
"/u/NetBSD/src/sys/fs/cd9660/iso.h", line 184: warning: no explicit type given
"/u/NetBSD/src/sys/fs/cd9660/iso.h", line 184: syntax error before or at: int
"/u/NetBSD/src/sys/fs/cd9660/iso.h", line 191: warning: no explicit type given
"/u/NetBSD/src/sys/fs/cd9660/iso.h", line 191: syntax error before or at: int
"/u/NetBSD/src/sys/fs/cd9660/iso.h", line 198: warning: no explicit type given
"/u/NetBSD/src/sys/fs/cd9660/iso.h", line 198: syntax error before or at: uint16_t
"/u/NetBSD/src/sys/fs/cd9660/iso.h", line 209: warning: no explicit type given
"/u/NetBSD/src/sys/fs/cd9660/iso.h", line 209: syntax error before or at: uint16_t
"/u/NetBSD/src/sys/fs/cd9660/iso.h", line 220: warning: no explicit type given
"/u/NetBSD/src/sys/fs/cd9660/iso.h", line 220: syntax error before or at: uint16_t
"/u/NetBSD/src/sys/fs/cd9660/iso.h", line 236: warning: no explicit type given
"/u/NetBSD/src/sys/fs/cd9660/iso.h", line 236: syntax error before or at: uint32_t
"/u/NetBSD/src/sys/fs/cd9660/iso.h", line 247: warning: no explicit type given
"/u/NetBSD/src/sys/fs/cd9660/iso.h", line 247: syntax error before or at: uint32_t
"/u/NetBSD/src/sys/fs/cd9660/iso.h", line 258: warning: no explicit type given
"/u/NetBSD/src/sys/fs/cd9660/iso.h", line 258: syntax error before or at: uint32_t
"/u/NetBSD/src/tools/makefs/../../usr.sbin/makefs/cd9660/cd9660_eltorito.h", line 35: warning: invalid white space character in directive
"/u/NetBSD/src/tools/makefs/../../usr.sbin/makefs/cd9660/cd9660_eltorito.h", line 36: warning: invalid white space character in directive

Looking at src/sys/fs/cd9660/iso.h I see a lot of

   174  static __inline int isonum_711(u_char *) __attribute__ ((unused));
   175  static __inline int isonum_712(char *) __attribute__ ((unused));
   176  static __inline uint16_t isonum_721(u_char *) __attribute__ ((unused));
   177  static __inline uint16_t isonum_722(u_char *) __attribute__ ((unused));
   178  static __inline uint16_t isonum_723(u_char *) __attribute__ ((unused));
   179  static __inline uint32_t isonum_731(u_char *) __attribute__ ((unused));
   180  static __inline uint32_t isonum_732(u_char *) __attribute__ ((unused));
   181  static __inline uint32_t isonum_733(u_char *) __attribute__ ((unused));

Is __inline a gcc-ism (or NetBSD-ism?) or should the SunStudio11 cc crock this?
(Sorry my C-skills are still mostly from the K&R days ;-)

Kurt

Btw: There's no problem using gcc (4.0.1) to compile the tools...