buildkernel error with -CURRENT on moby with newly gcc 3.3.1

Jens Rehsack rehsack at liwing.de
Mon Jul 14 23:44:24 PDT 2003


Jens Rehsack wrote:

 > Hi,
 >
 > I tried to update a machine which will become a webserver in
 > near future. I received following error in buildkernel:
 >
 > [...]
 >
 > cc -c -O -pipe -march=pentium4 -Wall \
 >     -Wredundant-decls -Wnested-externs -Wstrict-prototypes \
 >     -Wmissing-prototypes -Wpointer-arith -Winline \
 >     -Wcast-qual-fformat-extensions -std=c99  -nostdinc \
 >     -I-  -I. -I/usr/src/sys -I/usr/src/sys/dev \
 >     -I/usr/src/sys/contrib/dev/acpica \
 >     -I/usr/src/sys/contrib/ipfilter \
 >     -I/usr/src/sys/contrib/dev/ath \
 >     -I/usr/src/sys/contrib/dev/ath/freebsd -D_KERNEL \
 >     -include opt_global.h -fno-common  \
 >     -mno-align-long-strings \
 >     -mpreferred-stack-boundary=2 -ffreestanding \
 >     /usr/src/sys/dev/ata/ata-all.c
 > {standard input}: Assembler messages:
 > {standard input}:7652: Error: invalid character '_' in mnemonic
 > *** Error code 1
 >
 > Stop in /usr/obj/usr/src/sys/MOBY.
 > *** Error code 1
 >
 > Stop in /usr/src.
 > *** Error code 1
 >

I made some research (as good as I could) and found out/assumed sth.:
1) #APP and #NO_APP will be placed by cc around inline assembly
    and forces the assembler to reformat spaces as required to parse
    code well.
2) in /usr/obj/usr/src/sys/MOBY/ata-all.s (generated by cc -S)
    are 209 #APP/#NO_APP pairs are used, but only above described
    one fails.
3) in theory, the error described by me couldn't happen
4) the asm instruction lock ; x ; causes the processor to lock the
    execution of instruction x.
    b) lock ; x ; y ; cause the processor to lock x and executes y normal
    c) "lock ; x ; y ;" could be written as "lock\n\tx\n\t\y\n\t" with
       same generated binary code
5) if in /usr/src/sys/i386/include/atomic.h the line
    "	movzbl	%%al,%0 ;	"
    is changed into
    "	movzbl	%%al,%0\n\t" ,
    the ata-all.c is compiled without any warning.

Regards,
Jens


-- 
L     i  W     W     W  i                 Jens Rehsack
L        W     W     W
L     i   W   W W   W   i  nnn    gggg    LiWing IT-Services
L     i    W W   W W    i  n  n  g   g
LLLL  i     W     W     i  n  n  g   g    Friesenstraße 2
                                   gggg    06112 Halle
                                      g
                                  g   g
Tel.:  +49 - 3 45 - 5 17 05 91    ggg     e-Mail: <rehsack at liwing.de>
Fax:   +49 - 3 45 - 5 17 05 92            http://www.liwing.de/




More information about the freebsd-current mailing list