I tried installing openSUSE 12.1 from scratch (since that is working for Andreas). I grabbed all tools except binutils and gcc from SUSE packages. I used the configure scripts you kindly provided, Andreas, for binutils and for gcc. I get the same error with openSUSE as I did with Arch. Have I overlooked an environment variable that needs to be set? I am just using fresh install stuff with no special environment set by me.

Here is the error output and the gcc -v output.

paul@linux-jkcx:~/src/openbios-devel> make
Building OpenBIOS for sparc32
Building...error:
/usr/include/linux/types.h:35:1: error: unknown type name ‘__u32’
In file included from /usr/include/bits/sigcontext.h:28:0,
                 from /usr/include/signal.h:339,
                 from ../kernel/bootstrap.c:13:
/usr/include/asm/sigcontext.h:24:2: error: unknown type name ‘__u32’
/usr/include/asm/sigcontext.h:25:2: error: unknown type name ‘__u32’
/usr/include/asm/sigcontext.h:28:2: error: unknown type name ‘__u64’
/usr/include/asm/sigcontext.h:33:2: error: unknown type name ‘__u32’
/usr/include/asm/sigcontext.h:38:2: error: unknown type name ‘__u32’
/usr/include/asm/sigcontext.h:191:2: error: unknown type name ‘__u64’
/usr/include/asm/sigcontext.h:192:2: error: unknown type name ‘__u64’
/usr/include/asm/sigcontext.h:193:2: error: unknown type name ‘__u64’
/usr/include/asm/sigcontext.h:198:2: error: unknown type name ‘__u32’
make[1]: *** [host/kernel/bootstrap.o] Error 1
make[1]: Leaving directory `/home/paul/src/openbios-devel/obj-sparc32'
make: *** [build] Error 1
paul@linux-jkcx:~/src/openbios-devel> gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i586-suse-linux/4.6/lto-wrapper
Target: i586-suse-linux
Configured with: ../configure --prefix=/usr --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib --libexecdir=/usr/lib --enable-languages=c,c++,objc,fortran,obj-c++,java,ada --enable-checking=release --with-gxx-include-dir=/usr/include/c++/4.6 --enable-ssp --disable-libssp --disable-plugin --with-bugurl=http://bugs.opensuse.org/ --with-pkgversion='SUSE Linux' --disable-libgcj --disable-libmudflap --with-slibdir=/lib --with-system-zlib --enable-__cxa_atexit --enable-libstdcxx-allocator=new --disable-libstdcxx-pch --enable-version-specific-runtime-libs --program-suffix=-4.6 --enable-linux-futex --without-system-libunwind --with-arch-32=i586 --with-tune=generic --build=i586-suse-linux
Thread model: posix
gcc version 4.6.2 (SUSE Linux)
paul@linux-jkcx:~/src/openbios-devel> sparc-elf-gcc -v
Using built-in specs.
COLLECT_GCC=sparc-elf-gcc
COLLECT_LTO_WRAPPER=/usr/local/lib/gcc/sparc-elf/4.7.0/lto-wrapper
Target: sparc-elf
Configured with: ../gcc-4.7.0/configure --prefix=/usr/local --target=sparc-elf --disable-nls --enable-languages=c --disable-libssp
Thread model: single
gcc version 4.7.0 (GCC)

I also tried the configure you gave shortly ago, Blue, for gcc and get the same error.


Respectfully,
Paul.

On Sat, Jun 2, 2012 at 3:50 PM, Blue Swirl <blauwirbel@gmail.com> wrote:
On Fri, Jun 1, 2012 at 12:48 AM, P. Wilhelm <bearcat.pilot@gmail.com> wrote:
> I've tried to set up a new machine to compile Openbios for Sparc32. The
> machine is x86. OS is Arch Linux. I got all tools from the Arch packages
> except binutils (2.22) and gcc (4.7.0) source.
>
> I used configuration parameters for sparc-elf-gcc as given by Blue last year
> on this group. But, I keep running into a compile error for the bootstrap
> that says that __u32 is not defined (also __u64).

This should not happen, please post the complete error message.
Probably some recent code expects system headers to provide __u32
which is nonstandard.

I'm using these:
$ sparc-elf-gcc -v
Using built-in specs.
COLLECT_GCC=sparc-elf-gcc
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/sparc-elf/4.7.0/lto-wrapper
Target: sparc-elf
Configured with: ../configure --target=sparc-elf
--enable-targets=sparc-elf --disable-nls --disable-threads
--enable-languages=c --disable-shared --disable-libssp
--disable-multilib
Thread model: single
gcc version 4.7.0 (GCC)
$ sparc64-elf-gcc -v
Using built-in specs.
COLLECT_GCC=sparc64-elf-gcc
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/sparc64-elf/4.6.0/lto-wrapper
Target: sparc64-elf
Configured with: ../configure --target=sparc64-elf
--enable-targets=sparc64-elf --disable-nls --disable-threads
--enable-languages=c --disable-shared --disable-libssp
--enable-multilib
Thread model: single
gcc version 4.6.0 20100925 (experimental) (GCC)
$ powerpc-elf-gcc-4.6.0 -v
Using built-in specs.
COLLECT_GCC=powerpc-elf-gcc-4.6.0
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/powerpc-elf/4.6.0/lto-wrapper
Target: powerpc-elf
Configured with: ../configure --target=powerpc-elf
--enable-targets=powerpc-elf --disable-nls --disable-threads
--enable-languages=c --disable-shared --disable-libssp
--disable-multilib
Thread model: single
gcc version 4.6.0 20100925 (experimental) (GCC)
$ powerpc64-linux-gcc-4.6.0 -v
Using built-in specs.
COLLECT_GCC=powerpc64-linux-gcc-4.6.0
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/powerpc64-linux/4.6.0/lto-wrapper
Target: powerpc64-linux
Configured with: ../configure --target=powerpc64-linux
--enable-targets=powerpc64-linux --disable-nls --disable-threads
--enable-languages=c --disable-shared --disable-libssp
--disable-multilib --disable-decimal-float
Thread model: single
gcc version 4.6.0 20100925 (experimental) (GCC)

I think GCC 4.7.0 miscompiles OpenBIOS for PPC, or rather more
probably our libgcc does not match theirs.

>
> Web searches point to a similar issue about a year ago with ppc, but nothing
> recent or related to Sparc32. Any pointers to what I might be doing wrong
> are appreciated.
>
> The x86 gcc is the generic Arch gcc that comes with the base system.
>
>
> Respectfully,
> Paul W.
>
> --
> OpenBIOS                 http://openbios.org/
> Mailinglist:  http://lists.openbios.org/mailman/listinfo
> Free your System - May the Forth be with you

--
OpenBIOS                 http://openbios.org/
Mailinglist:  http://lists.openbios.org/mailman/listinfo
Free your System - May the Forth be with you