kvm: testsuite: fix compilation failure using gcc 3.x
commit8dfe1a985e7a6a031c32c16d6d3fb9931598a34c
authorDave Hansen <haveblue@us.ibm.com>
Mon, 2 Jul 2007 20:04:50 +0000 (2 13:04 -0700)
committerAvi Kivity <avi@qumranet.com>
Tue, 3 Jul 2007 04:25:43 +0000 (2 21:25 -0700)
tree16dbeea49e86548e3a7bf4fb2d17de725762df4e
parentd28ffc0ef90cabfc82e2ccb7b5ed409884dc0d08
kvm: testsuite: fix compilation failure using gcc 3.x

I've been getting compile errors lately with gcc 3.x compiling kvm 27
and 28:

gcc -I /home/dave/kvm/kvm-28/kernel/include -MMD -MF test/.access.d -g -fomit-frame-pointer -Wall -m64     -nostdlib -o test/access.flat -Wl,-T,flat.lds test/access.o test/cstart64.o test/printf.o test/print.o test/smp.o
test/print.o: In function `print':
/home/dave/kvm/kvm-28/user/test/print.S:19: undefined reference to `PSEUDO_SERIAL_PORT'
collect2: ld returned 1 exit status

Looking at 'gcc -E' output, you can see the problem:

...
.globl print
print:
        push %rax
        push %rsi
        push %rdx

        mov %rdi, %rsi
        mov $PSEUDO_SERIAL_PORT, %edx

The PSEUDO_SERIAL_PORT macro isn't getting expanded for some reason.
However, it works in gcc 4.1.  The following patch fixes it for me.

Signed-off-by: Avi Kivity <avi@qumranet.com>
kvm/user/test/print.S