Fix linux-user build on ppc
commit8f4d4cb4e4e73d0533aa2cb421c14210c75f6edc
authorMark McLoughlin <markmc@redhat.com>
Mon, 29 Jun 2009 13:49:03 +0000 (29 14:49 +0100)
committerMark McLoughlin <markmc@redhat.com>
Mon, 28 Sep 2009 07:22:29 +0000 (28 08:22 +0100)
tree2b0ec59e4ef09dd4d8c427ae1a798ed000abf120
parentb5c99e96655e8dc938f801e1ac0dbdf2d6dfba37
Fix linux-user build on ppc

kvm-87 build fails on ppc:

  https://koji.fedoraproject.org/koji/getfile?taskID=1441042&name=build.log

  gcc -I. -I.. -I/builddir/build/BUILD/qemu-kvm-devel-87/target-i386
  -I/builddir/build/BUILD/qemu-kvm-devel-87 -MMD -MT elfload.o -MP
  -DNEED_CPU_H -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
  -D__user= -I/builddir/build/BUILD/qemu-kvm-devel-87/tcg
  -I/builddir/build/BUILD/qemu-kvm-devel-87/tcg/ppc64
  -I/builddir/build/BUILD/qemu-kvm-devel-87/fpu
  -I/builddir/build/BUILD/qemu-kvm-devel-87/linux-user
  -I/builddir/build/BUILD/qemu-kvm-devel-87/linux-user/i386 -O2 -g -pipe
  -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
  --param=ssp-buffer-size=4 -m64 -mminimal-toc -g -fno-strict-aliasing
  -O2 -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes
  -Wstrict-prototypes -Wredundant-decls    -c -o elfload.o
  /builddir/build/BUILD/qemu-kvm-devel-87/linux-user/elfload.c
  /builddir/build/BUILD/qemu-kvm-devel-87/linux-user/elfload.c:214: error: conflicting types for 'elf_greg_t'
  /usr/include/asm/elf.h:123: note: previous declaration of 'elf_greg_t' was here
  /builddir/build/BUILD/qemu-kvm-devel-87/linux-user/elfload.c:220: error: conflicting types for 'elf_gregset_t'
  /usr/include/asm/elf.h:124: note: previous declaration of 'elf_gregset_t' was here
  In file included from /builddir/build/BUILD/qemu-kvm-devel-87/linux-user/elfload.c:697:
  ../elf.h:457:1: warning: "R_PPC_NUM" redefined
  In file included from /usr/include/asm/sigcontext.h:13,
                   from /usr/include/bits/sigcontext.h:28,
                   from /usr/include/signal.h:339,
                   from /builddir/build/BUILD/qemu-kvm-devel-87/linux-user/qemu.h:4,
                   from /builddir/build/BUILD/qemu-kvm-devel-87/linux-user/elfload.c:16:
  /usr/include/asm/elf.h:81:1: warning: this is the location of the previous definition

Problem seems to be that signal.h is pulling in a bunch of ppc
headers which expose elf_greg_t, R_PPC_* and PPC_FEATURE_*.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Fedora-patch: qemu-fix-linux-user-build-on-ppc.patch
elf.h
linux-user/elfload.c