linux-2.5 tree no longer builds.
Subsystems (2)
It appears that the following:
ChangeSet 1.1532.9.160 2004/02/04 10:54:15 [email protected]
[PATCH] Fix ptrace in the vsyscall dso area
From: Roland McGrath <[email protected]>
The #include is the part of this patch that matters, so the #ifdef below works.
breaks the linux.bkbits.net/linux-2.5 tree for ia64 with the following:
arch/ia64/ia32/elfcore32.h:20: conflicting types for elf_gregset_t' include/asm/elf.h:160: previous declaration of elf_gregset_t' arch/ia64/ia32/elfcore32.h:22: conflicting types for elf_fpregset_t' include/asm/elf.h:163: previous declaration of elf_fpregset_t' arch/ia64/ia32/elfcore32.h:23: conflicting types for elf_fpxregset_t' include/asm/elf.h:157: previous declaration of elf_fpxregset_t' In file included from arch/ia64/ia32/binfmt_elf32.c:22:arch/ia64/ia32/elfcore32.h:69:1: warning: "ELF_CORE_COPY_REGS" redefined In file included from include/linux/elf.h:5,
from include/linux/mm.h:15,
from arch/ia64/ia32/binfmt_elf32.c:15:include/asm/elf.h:169:1: warning: this is the location of the previous definition
I commented out the #include in linux/mm.h and everything builds fine. I haven't booted it yet.
Does anybody have a correct fix?
Thanks,
Robin Holt
Robin,
The fix is attached. It's already on its way into linux-2.5 through Andrew Morton.
mh
Quoted 38 lines · Robin Holt
It appears that the following:
ChangeSet 1.1532.9.160 2004/02/04 10:54:15 [email protected]
[PATCH] Fix ptrace in the vsyscall dso areaFrom: Roland McGrath <[email protected]>
The #include is the part of this patch that matters, so the #ifdef below works.
breaks the linux.bkbits.net/linux-2.5 tree for ia64 with the following:
arch/ia64/ia32/elfcore32.h:20: conflicting types forelf_gregset_t' include/asm/elf.h:160: previous declaration ofelf_gregset_t'arch/ia64/ia32/elfcore32.h:22: conflicting types forelf_fpregset_t' include/asm/elf.h:163: previous declaration ofelf_fpregset_t'arch/ia64/ia32/elfcore32.h:23: conflicting types forelf_fpxregset_t' include/asm/elf.h:157: previous declaration ofelf_fpxregset_t' In file included fromarch/ia64/ia32/binfmt_elf32.c:22:arch/ia64/ia32/elfcore32.h:69:1: warning: "ELF_CORE_COPY_REGS" redefined In file included frominclude/linux/elf.h:5,from include/linux/mm.h:15, from arch/ia64/ia32/binfmt_elf32.c:15:
include/asm/elf.h:169:1: warning: this is the location of the previous definitionI commented out the #include in
linux/mm.hand everything builds fine. I haven't booted it yet.Does anybody have a correct fix?
Thanks,
Robin Holt
-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 1 line
Martin Hicks || [email protected] || PGP/GnuPG: 0x4C7F2BEE
The hunk that includes elf.h into include/linux/mm.h breaks the build on
ia64. 2.6.2-mm1
Thanks for testing it. Does the below fix it?
Begin forwarded message:
Date: Thu, 5 Feb 2004 18:01:21 +0100
From: Andi Kleen <[email protected]>
To: Andi Kleen <[email protected]>
Cc: [email protected], [email protected], [email protected]
Subject: Re: [PATCH] Fix x86-64 compilation on 2.6.2-bk1 - new patch
Quoted 8 lines · On Thu, 5 Feb 2004 17:07:14 +0100 Andi Kleen <[email protected]> wrote:
The new
linux/elf.hinclude inlinux/mm.hcaused all kinds of problems for the x86-64 32bit emulation code.This patch avoids the dependency by moving the depending functions out of line. It makes x86-64 compile again.
Please apply.
[...]
Unfortunately that patch broke the build on some other architectures (e.g. s390) due to a wrong ifdef.
Here is the corrected version:
include/linux/mm.h renamed from include/linux/mm.h-o +2 -19
@@ -12,7 +12,6 @@#include <linux/mmzone.h> #include <linux/rbtree.h> #include <linux/fs.h> -#include <linux/elf.h> #ifndef CONFIG_DISCONTIGMEM /* Don't use mapnrs, do it properly */ extern unsigned long max_mapnr;
@@ -644,24 +643,8 @@#endif #ifndef CONFIG_ARCH_GATE_AREA -static inline int in_gate_area (struct task_struct *task,unsigned long addr) -{ -#ifdef AT_SYSINFO_EHDR -if ((addr >=FIXADDR_USER_START ) && (addr <FIXADDR_USER_END )) -return 1 ; -#endif -return 0 ; -} - -extern struct vm_area_struct gate_vma; -static inline struct vm_area_struct *get_gate_vma (struct task_struct *tsk) -{ -#ifdef AT_SYSINFO_EHDR -return &gate_vma; -#else -return 0 ; -#endif -} +extern struct vm_area_struct *get_gate_vma (struct task_struct *tsk); +int in_gate_area (struct task_struct *task,unsigned long addr);#endif #endif /* __KERNEL__ */
mm/memory.c renamed from mm/memory.c-o +24 -1
@@ -55,6 +55,7 @@#include <asm/pgtable.h> #include <linux/swapops.h> +#include <linux/elf.h> #ifndef CONFIG_DISCONTIGMEM /* use the per-pgdat data instead for discontigmem - mbligh */
@@ -1688,7 +1689,9 @@EXPORT_SYMBOL (vmalloc_to_page); -#if !defined(CONFIG_ARCH_GATE_AREA ) && defined(AT_SYSINFO_EHDR ) +#if !defined(CONFIG_ARCH_GATE_AREA ) + +#if defined(AT_SYSINFO_EHDR )struct vm_area_struct gate_vma;static int __init gate_vma_init (void )
@@ -1702,3 +1705,23 @@ }__initcall (gate_vma_init);#endif + +struct vm_area_struct *get_gate_vma (struct task_struct *tsk) +{ +#ifdef AT_SYSINFO_EHDR +return &gate_vma; +#else +return 0 ; +#endif +} + +int in_gate_area (struct task_struct *task,unsigned long addr) +{ +#ifdef AT_SYSINFO_EHDR +if ((addr >=FIXADDR_USER_START ) && (addr <FIXADDR_USER_END )) +return 1 ; +#endif +return 0 ; +} + +#endif