]> Zhao Yanbai Git Server - minix.git/commitdiff
Fix NetBSD a.out bug in common/libc and port Makefile
authorGianluca Guida <gianluca@minix3.org>
Tue, 15 Feb 2011 20:12:04 +0000 (20:12 +0000)
committerGianluca Guida <gianluca@minix3.org>
Tue, 15 Feb 2011 20:12:04 +0000 (20:12 +0000)
This patch includes the required modifications (summarized
in common/lib/libc/minix-port.patch) to make the common
part of the NetBSD libc to compile and work under Minix.

common/lib/libc/Makefile.inc
common/lib/libc/arch/i386/string/strchr.S
common/lib/libc/arch/i386/string/strrchr.S
common/lib/libc/minix-port.patch [new file with mode: 0644]

index 1370eddbc4442b6630546726b498f1fb679863a2..4a63d6bfbae55f2f4131e883add7037b5880b576 100644 (file)
@@ -1,7 +1,11 @@
 # $NetBSD: Makefile.inc,v 1.10 2008/10/26 07:22:50 mrg Exp $
 
 COMMON_DIR:=${.PARSEDIR}
+.if defined(__MINIX)
+COMMON_CODEDIRS=atomic gen inet md net quad stdlib string 
+.else
 COMMON_CODEDIRS=atomic gen gmon inet md net quad stdlib string sys
+.endif
 COMMON_CODEDIRS+=hash/sha1 hash/sha2 hash/rmd160
 
 .if defined(COMMON_MACHINE_ARCH) && !empty(COMMON_MACHINE_ARCH) && \
index 400bcdad718da1dcf17fbdeda26461982b755d21..2ad317547bec9a97658b1d1587a095d54b935cf3 100644 (file)
@@ -100,4 +100,8 @@ ENTRY(strchr)
        popl    %esi
        ret
 
+#ifdef __minix
+STRONG_ALIAS(_C_LABEL(index),_C_LABEL(strchr))
+#else
 STRONG_ALIAS(index,strchr)
+#endif
index 26ef5441db2ea5f9f3cdb1e7659719e878be57cf..d7ef0b18ae46ba1f7a8d66c1a31ea2de67b47603 100644 (file)
@@ -93,4 +93,8 @@ ENTRY(strrchr)
        popl    %esi
        ret
 
+#ifdef __minix
+STRONG_ALIAS(_C_LABEL(rindex),_C_LABEL(strrchr))
+#else
 STRONG_ALIAS(rindex,strrchr)
+#endif
diff --git a/common/lib/libc/minix-port.patch b/common/lib/libc/minix-port.patch
new file mode 100644 (file)
index 0000000..cdccb51
--- /dev/null
@@ -0,0 +1,39 @@
+diff -ru /home/netbsd/src/common/lib/libc/Makefile.inc ./Makefile.inc
+--- /home/netbsd/src/common/lib/libc/Makefile.inc      2008-10-27 03:01:48.000000000 +0000
++++ ./Makefile.inc     2011-02-15 13:10:57.000000000 +0000
+@@ -1,7 +1,11 @@
+ # $NetBSD: Makefile.inc,v 1.10 2008/10/26 07:22:50 mrg Exp $
+ COMMON_DIR:=${.PARSEDIR}
++.if defined(__MINIX)
++COMMON_CODEDIRS=atomic gen inet md net quad stdlib string 
++.else
+ COMMON_CODEDIRS=atomic gen gmon inet md net quad stdlib string sys
++.endif
+ COMMON_CODEDIRS+=hash/sha1 hash/sha2 hash/rmd160
+ .if defined(COMMON_MACHINE_ARCH) && !empty(COMMON_MACHINE_ARCH) && \
+diff -ru /home/netbsd/src/common/lib/libc/arch/i386/string/strchr.S ./arch/i386/string/strchr.S
+--- /home/netbsd/src/common/lib/libc/arch/i386/string/strchr.S 2009-07-18 03:01:04.000000000 +0000
++++ ./arch/i386/string/strchr.S        2011-02-15 13:26:06.000000000 +0000
+@@ -100,4 +100,8 @@
+       popl    %esi
+       ret
++#ifdef __minix
++STRONG_ALIAS(_C_LABEL(index),_C_LABEL(strchr))
++#else
+ STRONG_ALIAS(index,strchr)
++#endif
+diff -ru /home/netbsd/src/common/lib/libc/arch/i386/string/strrchr.S ./arch/i386/string/strrchr.S
+--- /home/netbsd/src/common/lib/libc/arch/i386/string/strrchr.S        2009-07-18 03:01:04.000000000 +0000
++++ ./arch/i386/string/strrchr.S       2011-02-15 13:27:15.000000000 +0000
+@@ -93,4 +93,8 @@
+       popl    %esi
+       ret
++#ifdef __minix
++STRONG_ALIAS(_C_LABEL(rindex),_C_LABEL(strrchr))
++#else
+ STRONG_ALIAS(rindex,strrchr)
++#endif