GCC problem (Was: Re: [bugs] Problem compiling the kernel)
Andreas Jaeger
aj@suse.de
Mon Dec 10 07:39:00 GMT 2001
Bo Thorsen <bo@sonofthor.dk> writes:
> On Friday 07 December 2001 13:26, Bo Thorsen wrote:
>> There is a problem compiling the kernel now, but I can't see if this is a
>> gcc or kernel problem.
>
> I just made a good simplification on this one:
>
> ----- problem.c -----
>
> typedef struct { } spinlock_t;
> spinlock_t runqueue_lock
> __attribute__((__aligned__((1 << ((6)))),
> __section__(".data.cacheline_aligned"))) = (spinlock_t) { };
>
> ----- problem.c -----
>
>> ../crossbuild/x86-64/bin/x86_64-unknown-linux-gcc problem.c
> problem.c:4: initializer element is not constant
>
> ia32 gcc works fine.
That's not right, it fails also on i686-linux:
$ /opt/gcc-3.1-devel/bin/gcc problem.c
problem.c:4: initializer element is not constant
$ /opt/gcc-3.1-devel/bin/gcc problem.c -v
Reading specs from /opt/gcc-3.1-devel/lib/gcc-lib/i686-pc-linux-gnu/3.1/specs
Configured with: /cvs/gcc/configure --prefix=/opt/gcc-3.1-devel --enable-shared --enable-threads=posix --enable-clocale=gnu --with-gnu-as --with-gnu-ld --disable-nls --with-system-zlib --enable-languages=c,c++
Thread model: posix
gcc version 3.1 20011206 (experimental)
/opt/gcc-3.1-devel/lib/gcc-lib/i686-pc-linux-gnu/3.1/cc1 -lang-c -v -D__GNUC__=3 -D__GNUC_MINOR__=1 -D__GNUC_PATCHLEVEL__=0 -D__ELF__ -Dunix -Dlinux -D__ELF__ -D__unix__ -D__linux__ -D__unix -D__linux -Asystem=posix -D__NO_INLINE__ -D__STDC_HOSTED__=1 -Acpu=i386 -Amachine=i386 -Di386 -D__i386 -D__i386__ -D__tune_i686__ -D__tune_pentiumpro__ problem.c -quiet -dumpbase problem.c -version -o /tmp/cctD4Wsi.s
GNU CPP version 3.1 20011206 (experimental) (cpplib) (i386 Linux/ELF)
GNU C version 3.1 20011206 (experimental) (i686-pc-linux-gnu)
compiled by GNU C version 3.1 20011206 (experimental).
[...]
Andreas
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.inka.de
http://www.suse.de/~aj
More information about the Gcc
mailing list