Bug#532385: eglibc: FTBFS: build fail on Renesas SH
Package: eglibc
Version: 2.9-13
Severity: wishlist
Tags: patch
X-Debbugs-CC: debian-superh@lists.debian.org
Hi,
I am now trying to run Debian on Renesas SH CPU.
Current source code can not build package.
because the change of the linux kernel header is not reflected to eglibc.
-----
<snip>
In file included from ../sysdeps/unix/sysv/linux/sh/sys/procfs.h:31,
from ../nptl/../nptl_db/thread_db.h:29,
from ../nptl/descr.h:33,
from ../nptl/sysdeps/sh/tls.h:87,
from ../include/tls.h:6,
from ../sysdeps/unix/sysv/linux/sh/sysdep.h:27,
from ../sysdeps/unix/sysv/linux/sh/sh4/sysdep.h:4,
from <stdin>:1:
<snip>
-----
I made a patch to support SH.
Would you please apply it?
Best regards,
Nobuhiro
-- System Information:
Debian Release: squeeze/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.29-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=ja_JP.UTF-8, LC_CTYPE=ja_JP.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
--
Nobuhiro Iwamatsu
diff -urN -Xx a/sysdeps/unix/sysv/linux/sh/sys/procfs.h b/sysdeps/unix/sysv/linux/sh/sys/procfs.h
--- a/sysdeps/unix/sysv/linux/sh/sys/procfs.h 2009-05-22 11:04:22.000000000 +0900
+++ b/sysdeps/unix/sysv/linux/sh/sys/procfs.h 2009-05-22 12:48:23.000000000 +0900
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1999, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1999, 2004, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -24,12 +24,9 @@
used on Linux. */
#include <features.h>
-#include <signal.h>
#include <sys/time.h>
#include <sys/types.h>
-#include <sys/ucontext.h>
#include <sys/user.h>
-#include <asm/elf.h>
__BEGIN_DECLS
diff -urN -Xx a/sysdeps/unix/sysv/linux/sh/sys/user.h b/sysdeps/unix/sysv/linux/sh/sys/user.h
--- a/sysdeps/unix/sysv/linux/sh/sys/user.h 2009-05-22 11:04:22.000000000 +0900
+++ bsysdeps/unix/sysv/linux/sh/sys/user.h 2009-05-22 12:48:23.000000000 +0900
@@ -19,10 +19,51 @@
#ifndef _SYS_USER_H
#define _SYS_USER_H 1
-#include <features.h>
+#include <asm/ptrace.h>
-#include <asm/user.h>
+/* asm/ptrace.h polutes the namespace. */
+#undef PTRACE_GETREGS
+#undef PTRACE_SETREGS
+#undef PTRACE_GETFPREGS
+#undef PTRACE_SETFPREGS
+#undef PTRACE_GETFDPIC
+#undef PTRACE_GETFDPIC_EXEC
+#undef PTRACE_GETFDPIC_INTERP
+#undef PTRACE_GETDSPREGS
+#undef PTRACE_SETDSPREGS
-#undef start_thread
+typedef unsigned long elf_greg_t;
+
+#define ELF_NGREG (sizeof (struct pt_regs) / sizeof (elf_greg_t))
+typedef elf_greg_t elf_gregset_t[ELF_NGREG];
+
+struct user_fpu_struct
+ {
+ unsigned long fp_regs[16];
+ unsigned long xfp_regs[16];
+ unsigned long fpscr;
+ unsigned long fpul;
+ };
+typedef struct user_fpu_struct elf_fpregset_t;
+
+struct user
+ {
+ struct pt_regs regs; /* entire machine state */
+ struct user_fpu_struct fpu; /* Math Co-processor
+ registers */
+ int u_fpvalid; /* True if math co-processor
+ being used */
+ size_t u_tsize; /* text size (pages) */
+ size_t u_dsize; /* data size (pages) */
+ size_t u_ssize; /* stack size (pages) */
+ unsigned long start_code; /* text starting address */
+ unsigned long start_data; /* data starting address */
+ unsigned long start_stack; /* stack starting address */
+ long int signal; /* signal causing core dump */
+ unsigned long u_ar0; /* help gdb find registers */
+ struct user_fpu_struct *u_fpstate; /* Math Co-processor pointer */
+ unsigned long magic; /* identifies a core file */
+ char u_comm[32]; /* user command name */
+ };
#endif /* sys/user.h */
Reply to: