All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Hansen <haveblue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
To: kvm-devel <kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
Subject: [PATCH] fix gcc 3.x issue
Date: Mon, 02 Jul 2007 13:04:50 -0700	[thread overview]
Message-ID: <1183406690.14314.33.camel@localhost> (raw)

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/

             reply	other threads:[~2007-07-02 20:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-02 20:04 Dave Hansen [this message]
2007-07-03  4:26 ` [PATCH] fix gcc 3.x issue Avi Kivity

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1183406690.14314.33.camel@localhost \
    --to=haveblue-r/jw6+rmf7hqt0dzr+alfa@public.gmane.org \
    --cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.