This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Matsushita AM33/2.0 port


On Jun 24, 2004, Roland McGrath <roland@redhat.com> wrote:

> This is even more obfuscation of where to find the code.  If we do this, I
> think we should go with the convention of putting nptl code in the
> unadorned myport/sysdeps/... dir and linuxthreads files in
> myport/sysdeps/.../linuxthreads

--enable-add-ons=am33,linuxthreads wasn't enough to get
am33/sysdeps/.../linuxthreads added to the search dirs.  Adding a
linuxthreads Implies to linuxthreads/sysdeps didn't add them either.
Am I missing anything?


I've managed to get around all of the other issues.  I enclose two
patches below, plus the rest of the now-drop-in am33 port.  Ok to
install the patches?

Index: ChangeLog
from  Alexandre Oliva  <aoliva@redhat.com>

	* Makeconfig (shlib-versions.v.i): Move top-level
	shlib-versions last.
	* configure.in (base_machine): Let add-on's mach.sh set it.
	* configure: Rebuilt.
	* sysdeps/unix/sysv/linux/configure.in (arch_minimum_kernel):
	Leave it alone if it's already set.
	* sysdeps/unix/sysv/linux/configure: Rebuilt.

Index: Makeconfig
===================================================================
RCS file: /cvs/glibc/libc/Makeconfig,v
retrieving revision 1.294
diff -u -p -r1.294 Makeconfig
--- Makeconfig 9 May 2004 17:30:23 -0000 1.294
+++ Makeconfig 28 Jun 2004 06:34:47 -0000
@@ -793,9 +793,9 @@ ifeq ($(sysd-sorted-done),t)
 -include $(common-objpfx)soversions.mk
 ifndef avoid-generated
 $(common-objpfx)shlib-versions.v.i: \
-	$(..)shlib-versions $(wildcard $(patsubst %, $(..)%/shlib-versions,\
-						     $(add-ons) \
-						     $(subdirs)))
+	$(wildcard $(patsubst %, $(..)%/shlib-versions, \
+			$(add-ons) $(subdirs))) \
+	$(..)shlib-versions
 $(common-objpfx)soversions.i: $(common-objpfx)shlib-versions.v
 	default_setname='$(filter-out %_default,$(oldest-abi:%=GLIBC_%))'; \
 	while read conf version setname; do \
Index: configure
===================================================================
RCS file: /cvs/glibc/libc/configure,v
retrieving revision 1.405
diff -u -p -r1.405 configure
--- configure 9 May 2004 17:31:21 -0000 1.405
+++ configure 28 Jun 2004 06:34:51 -0000
@@ -1932,7 +1932,10 @@ sparc64 | ultrasparc)
 sparc64b | ultrasparc3)
 		base_machine=sparc machine=sparc/sparc64/sparcv9b ;;
 thumb*)		base_machine=thumb machine=arm/thumb/$machine ;;
-*)		base_machine=$machine ;;
+*)		for d in $add_ons_pfx; do
+		    test ! -f $srcdir/$d/mach.sh || . $srcdir/$d/mach.sh
+		done
+		test -n "$base_machine" || base_machine=$machine ;;
 esac
 
 
Index: configure.in
===================================================================
RCS file: /cvs/glibc/libc/configure.in,v
retrieving revision 1.416
diff -u -p -r1.416 configure.in
--- configure.in 9 May 2004 17:29:52 -0000 1.416
+++ configure.in 28 Jun 2004 06:34:52 -0000
@@ -439,7 +439,10 @@ sparc64 | ultrasparc)
 sparc64b | ultrasparc3)
 		base_machine=sparc machine=sparc/sparc64/sparcv9b ;;
 thumb*)		base_machine=thumb machine=arm/thumb/$machine ;;
-*)		base_machine=$machine ;;
+*)		for d in $add_ons_pfx; do
+		    test ! -f $srcdir/$d/mach.sh || . $srcdir/$d/mach.sh
+		done
+		test -n "$base_machine" || base_machine=$machine ;;
 esac
 changequote([,])dnl
 AC_SUBST(base_machine)
Index: sysdeps/unix/sysv/linux/configure
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/configure,v
retrieving revision 1.86
diff -u -p -r1.86 configure
--- sysdeps/unix/sysv/linux/configure 23 Mar 2003 02:10:04 -0000 1.86
+++ sysdeps/unix/sysv/linux/configure 28 Jun 2004 06:35:00 -0000
@@ -143,7 +143,7 @@ case "$machine" in
     arch_minimum_kernel=2.4.0
     ;;
   *)
-    arch_minimum_kernel=2.0.10
+    test -n "$arch_minimum_kernel" || arch_minimum_kernel=2.0.10
     ;;
 esac
 if test -n "$minimum_kernel"; then
Index: sysdeps/unix/sysv/linux/configure.in
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/configure.in,v
retrieving revision 1.64
diff -u -p -r1.64 configure.in
--- sysdeps/unix/sysv/linux/configure.in 23 Mar 2003 02:10:04 -0000 1.64
+++ sysdeps/unix/sysv/linux/configure.in 28 Jun 2004 06:35:00 -0000
@@ -102,7 +102,7 @@ case "$machine" in
     arch_minimum_kernel=2.4.0
     ;;
   *)
-    arch_minimum_kernel=2.0.10
+    test -n "$arch_minimum_kernel" || arch_minimum_kernel=2.0.10
     ;;
 esac
 if test -n "$minimum_kernel"; then
Index: ChangeLog
from  Alexandre Oliva  <aoliva@redhat.com>

	2001-10-31  Alexandre Oliva  <aoliva@redhat.com>
	* elf/elf.h: Defined R_MN10300_* relocation numbers.

Index: elf/elf.h
===================================================================
RCS file: /cvs/glibc/libc/elf/elf.h,v
retrieving revision 1.140
diff -u -p -r1.140 elf.h
--- elf/elf.h 7 May 2004 01:56:25 -0000 1.140
+++ elf/elf.h 28 Jun 2004 06:39:16 -0000
@@ -2462,6 +2462,34 @@ typedef Elf32_Addr Elf32_Conflict;
 
 #define R_X86_64_NUM		24
 
+/* AM33 relocations.  */
+#define R_MN10300_NONE		0	/* No reloc.  */
+#define R_MN10300_32		1	/* Direct 32 bit.  */
+#define R_MN10300_16		2	/* Direct 16 bit.  */
+#define R_MN10300_8		3	/* Direct 8 bit.  */
+#define R_MN10300_PCREL32	4	/* PC-relative 32-bit.  */
+#define R_MN10300_PCREL16	5	/* PC-relative 16-bit signed.  */
+#define R_MN10300_PCREL8	6	/* PC-relative 8-bit signed.  */
+#define R_MN10300_GNU_VTINHERIT	7	/* Ancient C++ vtable garbage... */
+#define R_MN10300_GNU_VTENTRY	8	/* ... collection annotation.  */
+#define R_MN10300_24		9	/* Direct 24 bit.  */
+#define R_MN10300_GOTPC32	10	/* 32-bit PCrel offset to GOT.  */
+#define R_MN10300_GOTPC16	11	/* 16-bit PCrel offset to GOT.  */
+#define R_MN10300_GOTOFF32	12	/* 32-bit offset from GOT.  */
+#define R_MN10300_GOTOFF24	13	/* 24-bit offset from GOT.  */
+#define R_MN10300_GOTOFF16	14	/* 16-bit offset from GOT.  */
+#define R_MN10300_PLT32		15	/* 32-bit PCrel to PLT entry.  */
+#define R_MN10300_PLT16		16	/* 16-bit PCrel to PLT entry.  */
+#define R_MN10300_GOT32		17	/* 32-bit offset to GOT entry.  */
+#define R_MN10300_GOT24		18	/* 24-bit offset to GOT entry.  */
+#define R_MN10300_GOT16		19	/* 16-bit offset to GOT entry.  */
+#define R_MN10300_COPY		20	/* Copy symbol at runtime.  */
+#define R_MN10300_GLOB_DAT	21	/* Create GOT entry.  */
+#define R_MN10300_JMP_SLOT	22	/* Create PLT entry.  */
+#define R_MN10300_RELATIVE	23	/* Adjust by program base.  */
+
+#define R_MN10300_NUM 24
+
 __END_DECLS
 
 #endif	/* elf.h */

Attachment: am33-drop-in-port.tar.bz2
Description: BZip2 compressed data

-- 
Alexandre Oliva             http://www.ic.unicamp.br/~oliva/
Red Hat Compiler Engineer   aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist  oliva@{lsd.ic.unicamp.br, gnu.org}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]