>Description: Existing mit-pthreads code does not compile on current NetBSD/powerpc >How-To-Repeat: Attempt to compile >Fix: Apply patch
$NetBSD$ *** mit-pthreads/machdep/syscall-powerpc-netbsd.S Thu Feb 14 12:30:14 2002 --- mit-pthreads/machdep/syscall-powerpc-netbsd.S Mon Mar 25 09:52:47 2002 *************** *** 1,10 **** #include <machine/asm.h> #define COMPAT_43 #include <sys/syscall.h> - #ifndef __CONCAT - #include <sys/cdefs.h> - #endif - #define CONCAT __CONCAT #undef SYSCALL --- 1,6 ---- *************** *** 26,45 **** SYSCALL invocation. */ ENTRY(machdep_cerror) ! mflr 0 # Save LR in 0 ! stwu 1,-16(1) # allocate new stack frame ! stw 0,20(1) # Stash 0 in stack ! stw 31,8(1) # Stash 31 in stack (since it's callee-saved ! mr 31,3 # and we stash return there) bl PIC_PLT(_C_LABEL(__errno)) ! stw 31,0(3) # *errno() = err ! lwz 0,20(1) # Restore LR from stack to 0 ! neg 3,31 # return -errno to 3 ! lwz 31,8(1) # Restore 31 from stack mtlr 0 ! la 1,16(1) # Restore stack frame ! li 4,-1 # Put -1 in r4 for those syscalls that return ! blr # two values /* The fork system call is special... */ ENTRY(machdep_sys_fork) --- 22,41 ---- SYSCALL invocation. */ ENTRY(machdep_cerror) ! mflr 0 /* Save LR in 0 */ ! stwu 1,-16(1) /* allocate new stack frame */ ! stw 0,20(1) /* Stash 0 in stack */ ! stw 31,8(1) /* Stash 31 in stack (since it's callee-saved */ ! mr 31,3 /* and we stash return there) */ bl PIC_PLT(_C_LABEL(__errno)) ! stw 31,0(3) /* *errno() = err */ ! lwz 0,20(1) /* Restore LR from stack to 0 */ ! neg 3,31 /* return -errno to 3 */ ! lwz 31,8(1) /* Restore 31 from stack */ mtlr 0 ! la 1,16(1) /* Restore stack frame */ ! li 4,-1 /* Put -1 in r4 for those syscalls that ret */ ! blr /* two values */ /* The fork system call is special... */ ENTRY(machdep_sys_fork) *************** *** 55,64 **** li 0,SYS_pipe sc bso PIC_PLT(_C_LABEL(machdep_cerror)) ! stw 3,0(5) # Success, store fds stw 4,4(5) li 3,0 ! blr # And return 0 #ifndef SYS___sigsuspend14 /* The sigsuspend system call is special... */ --- 51,60 ---- li 0,SYS_pipe sc bso PIC_PLT(_C_LABEL(machdep_cerror)) ! stw 3,0(5) /* Success, store fds */ stw 4,4(5) li 3,0 ! blr /* And return 0 */ #ifndef SYS___sigsuspend14 /* The sigsuspend system call is special... */ *************** *** 72,91 **** #ifndef SYS___sigprocmask14 /* The sigprocmask system call is special... */ ENTRY(machdep_sys_sigprocmask) ! or. 4,4,4 # Set == NULL ? ! li 6,1 # how = SIG_BLOCK beq Ldoit ! lwz 4,0(4) # if not, replace it in r4 with #set mr 6,3 ! Ldoit: mr 3,6 # ... using sigprocmask(SIG_BLOCK) li 0,SYS_compat_13_sigprocmask13 sc bso PIC_PLT(_C_LABEL(machdep_cerror)) ! or. 5,5,5 # Check to see if oset requested ! beq Ldone # if oset != NULL ! stw 3,0(5) # *oset = oldmask Ldone: ! li 3,0 # return 0 blr #endif /* SYS_sigprocmask14 */ --- 68,87 ---- #ifndef SYS___sigprocmask14 /* The sigprocmask system call is special... */ ENTRY(machdep_sys_sigprocmask) ! or. 4,4,4 /* Set == NULL ? */ ! li 6,1 /* how = SIG_BLOCK */ beq Ldoit ! lwz 4,0(4) /* if not, replace it in r4 with #set */ mr 6,3 ! Ldoit: mr 3,6 /* ... using sigprocmask(SIG_BLOCK) */ li 0,SYS_compat_13_sigprocmask13 sc bso PIC_PLT(_C_LABEL(machdep_cerror)) ! or. 5,5,5 /* Check to see if oset requested */ ! beq Ldone /* if oset != NULL */ ! stw 3,0(5) /* *oset = oldmask */ Ldone: ! li 3,0 /* return 0 */ blr #endif /* SYS_sigprocmask14 */ >Submitter-Id: <submitter ID> >Originator: Allen Briggs >Organization: Wasabi Systems, Inc. >MySQL support: none >Synopsis: Patch to facilitate compilation on NetBSD/powerpc systems >Severity: critical >Priority: high >Category: mysql >Class: change-request >Release: mysql-3.23.49 (Source distribution) >Environment: System: NetBSD cheetah 1.5ZC NetBSD 1.5ZC (GENERIC) #0: Tue Mar 19 10:17:32 EST 2002 [EMAIL PROTECTED]:/e/netbsd/current/clean/src/sys/arch/macppc/compile/GENERIC macppc Some paths: /usr/pkg/bin/perl /usr/bin/make /usr/pkg/bin/gmake /usr/bin/gcc /usr/bin/cc GCC: Using builtin specs. gcc version 2.95.3 20010315 (release) (NetBSD nb1) Compilation info: CC='cc' CFLAGS='-I/usr/pkg/include -O2' CXX='c++' CXXFLAGS='-I/usr/pkg/include -I/usr/pkg/include -O2' LDFLAGS='-L/usr/pkg/lib -Wl,-R/usr/pkg/lib' LIBC: -r--r--r-- 1 root wheel 1592608 Feb 6 23:38 /usr/lib/libc.a lrwxr-xr-x 1 root wheel 13 Feb 6 23:38 /usr/lib/libc.so -> libc.so.12.82 lrwxr-xr-x 1 root wheel 13 Feb 6 23:38 /usr/lib/libc.so.12 -> libc.so.12.82 -r--r--r-- 1 root wheel 846262 Dec 22 00:18 /usr/lib/libc.so.12.81 -r--r--r-- 1 root wheel 848849 Feb 6 23:38 /usr/lib/libc.so.12.82 Configure command: ./configure --localstatedir=/var/mysql --with-named-z-libs=z --without-libwrap '--with-named-curses-libs=-lcurses -ltermcap' --without-readline --without-docs --without-debug --without-bench --with-low-memory --without-server --host=powerpc--netbsd --prefix=/usr/pkg --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php