* [PATCH] fix gcc 3.x issue
@ 2007-07-02 20:04 Dave Hansen
2007-07-03 4:26 ` Avi Kivity
0 siblings, 1 reply; 2+ messages in thread
From: Dave Hansen @ 2007-07-02 20:04 UTC (permalink / raw)
To: kvm-devel
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.
--- kvm-28/user/test/print.S.orig 2007-07-02 12:57:02.000000000 -0700
+++ kvm-28/user/test/print.S 2007-07-02 12:57:14.000000000 -0700
@@ -16,7 +16,7 @@
push %rdx
mov %rdi, %rsi
- mov $PSEUDO_SERIAL_PORT, %edx
+ mov $(PSEUDO_SERIAL_PORT), %edx
putchar:
cmpb $0, (%rsi)
-- Dave
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] fix gcc 3.x issue
2007-07-02 20:04 [PATCH] fix gcc 3.x issue Dave Hansen
@ 2007-07-03 4:26 ` Avi Kivity
0 siblings, 0 replies; 2+ messages in thread
From: Avi Kivity @ 2007-07-03 4:26 UTC (permalink / raw)
To: Dave Hansen; +Cc: kvm-devel
Dave Hansen wrote:
> 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
>
>
Applied, thanks.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-07-03 4:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-02 20:04 [PATCH] fix gcc 3.x issue Dave Hansen
2007-07-03 4:26 ` Avi Kivity
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox