Index: head/lib/libc/aarch64/gen/Makefile.inc =================================================================== --- head/lib/libc/aarch64/gen/Makefile.inc (revision 297618) +++ head/lib/libc/aarch64/gen/Makefile.inc (revision 297619) @@ -1,15 +1,17 @@ # $FreeBSD$ +CFLAGS+= -DNO_COMPAT7 + SRCS+= _ctx_start.S \ fabs.S \ flt_rounds.c \ fpgetmask.c \ fpsetmask.c \ infinity.c \ ldexp.c \ makecontext.c \ _setjmp.S \ _set_tp.c \ setjmp.S \ sigsetjmp.S \ trivial-getcontextx.c Index: head/lib/libc/aarch64/sys/Makefile.inc =================================================================== --- head/lib/libc/aarch64/sys/Makefile.inc (revision 297618) +++ head/lib/libc/aarch64/sys/Makefile.inc (revision 297619) @@ -1,25 +1,27 @@ # $FreeBSD$ +MIASM:= ${MIASM:Nfreebsd[467]_*} + SRCS+= __vdso_gettc.c #MDASM= ptrace.S MDASM= brk.S \ cerror.S \ pipe.S \ sbrk.S \ shmat.S \ sigreturn.S \ syscall.S \ vfork.S # Don't generate default code for these syscalls: NOASM= break.o \ exit.o \ getlogin.o \ openbsd_poll.o \ sstk.o \ vfork.o \ yield.o PSEUDO= _exit.o \ _getlogin.o Index: head/lib/libc/arm/aeabi/aeabi_vfp.h =================================================================== --- head/lib/libc/arm/aeabi/aeabi_vfp.h (revision 297618) +++ head/lib/libc/arm/aeabi/aeabi_vfp.h (revision 297619) @@ -1,131 +1,133 @@ /* * Copyright (C) 2013 Andrew Turner * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * $FreeBSD$ * */ #ifndef AEABI_VFP_H #define AEABI_VFP_H #include /* * ASM helper macros. These allow the functions to be changed depending on * the endian-ness we are building for. */ /* Allow the name of the function to be changed depending on the ABI */ #ifndef __ARM_PCS_VFP #define AEABI_ENTRY(x) ENTRY(__aeabi_ ## x ## _vfp) #define AEABI_END(x) END(__aeabi_ ## x ## _vfp) #else -#define AEABI_ENTRY(x) ENTRY(__aeabi_ ## x) +#define AEABI_ENTRY(x) \ + .set __fbsd_ ## x, __aeabi_ ## x; \ + ENTRY(__aeabi_ ## x) #define AEABI_END(x) END(__aeabi_ ## x) #endif /* * These should be used when a function either takes, or returns a floating * point falue. They will load the data from an ARM to a VFP register(s), * or from a VFP to an ARM register */ #ifdef __ARM_BIG_ENDIAN #define LOAD_DREG(vreg, reg0, reg1) vmov vreg, reg1, reg0 #define UNLOAD_DREG(reg0, reg1, vreg) vmov reg1, reg0, vreg #else #define LOAD_DREG(vreg, reg0, reg1) vmov vreg, reg0, reg1 #define UNLOAD_DREG(reg0, reg1, vreg) vmov reg0, reg1, vreg #endif #define LOAD_SREGS(vreg0, vreg1, reg0, reg1) vmov vreg0, vreg1, reg0, reg1 #define LOAD_SREG(vreg, reg) vmov vreg, reg #define UNLOAD_SREG(reg, vreg) vmov reg, vreg /* * C Helper macros */ #if __ARM_ARCH >= 6 /* * Generate a function that will either call into the VFP implementation, * or the soft float version for a given __aeabi_* helper. The function * will take a single argument of the type given by in_type. */ #define AEABI_FUNC(name, in_type, soft_func) \ __aeabi_ ## name(in_type a) \ { \ if (_libc_arm_fpu_present) \ return __aeabi_ ## name ## _vfp(a); \ else \ return soft_func (a); \ } /* As above, but takes two arguments of the same type */ #define AEABI_FUNC2(name, in_type, soft_func) \ __aeabi_ ## name(in_type a, in_type b) \ { \ if (_libc_arm_fpu_present) \ return __aeabi_ ## name ## _vfp(a, b); \ else \ return soft_func (a, b); \ } /* As above, but with the soft float arguments reversed */ #define AEABI_FUNC2_REV(name, in_type, soft_func) \ __aeabi_ ## name(in_type a, in_type b) \ { \ if (_libc_arm_fpu_present) \ return __aeabi_ ## name ## _vfp(a, b); \ else \ return soft_func (b, a); \ } #else /* * Helper macros for when we are only able to use the softfloat * version of these functions, i.e. on arm before armv6. */ #define AEABI_FUNC(name, in_type, soft_func) \ __aeabi_ ## name(in_type a) \ { \ return soft_func (a); \ } /* As above, but takes two arguments of the same type */ #define AEABI_FUNC2(name, in_type, soft_func) \ __aeabi_ ## name(in_type a, in_type b) \ { \ return soft_func (a, b); \ } /* As above, but with the soft float arguments reversed */ #define AEABI_FUNC2_REV(name, in_type, soft_func) \ __aeabi_ ## name(in_type a, in_type b) \ { \ return soft_func (b, a); \ } #endif #endif Index: head/lib/libc/gen/semctl.c =================================================================== --- head/lib/libc/gen/semctl.c (revision 297618) +++ head/lib/libc/gen/semctl.c (revision 297619) @@ -1,84 +1,90 @@ /*- * Copyright (c) 2002 Doug Rabson * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * */ #include __FBSDID("$FreeBSD$"); +#ifndef NO_COMPAT7 #define _WANT_SEMUN_OLD +#endif #include #include #include #include #include int __semctl(int semid, int semnum, int cmd, union semun *arg); +#ifndef NO_COMPAT7 int freebsd7___semctl(int semid, int semnum, int cmd, union semun_old *arg); int freebsd7_semctl(int semid, int semnum, int cmd, ...); +#endif int semctl(int semid, int semnum, int cmd, ...) { va_list ap; union semun semun; union semun *semun_ptr; va_start(ap, cmd); if (cmd == IPC_SET || cmd == IPC_STAT || cmd == GETALL || cmd == SETVAL || cmd == SETALL) { semun = va_arg(ap, union semun); semun_ptr = &semun; } else { semun_ptr = NULL; } va_end(ap); return (__semctl(semid, semnum, cmd, semun_ptr)); } +#ifndef NO_COMPAT7 int freebsd7_semctl(int semid, int semnum, int cmd, ...) { va_list ap; union semun_old semun; union semun_old *semun_ptr; va_start(ap, cmd); if (cmd == IPC_SET || cmd == IPC_STAT || cmd == GETALL || cmd == SETVAL || cmd == SETALL) { semun = va_arg(ap, union semun_old); semun_ptr = &semun; } else { semun_ptr = NULL; } va_end(ap); return (freebsd7___semctl(semid, semnum, cmd, semun_ptr)); } __sym_compat(semctl, freebsd7_semctl, FBSD_1.0); +#endif Index: head/lib/libc/include/compat.h =================================================================== --- head/lib/libc/include/compat.h (revision 297618) +++ head/lib/libc/include/compat.h (revision 297619) @@ -1,55 +1,57 @@ /*- * Copyright (c) 2009 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * $FreeBSD$ */ /* * This file defines compatiblity symbol versions for old system calls. It * is included in all generated system call files. */ #ifndef __LIBC_COMPAT_H__ #define __LIBC_COMPAT_H__ #define __sym_compat(sym,impl,verid) \ .symver impl, sym@verid +#ifndef NO_COMPAT7 __sym_compat(__semctl, freebsd7___semctl, FBSD_1.0); __sym_compat(msgctl, freebsd7_msgctl, FBSD_1.0); __sym_compat(shmctl, freebsd7_shmctl, FBSD_1.0); +#endif #undef __sym_compat #define __weak_reference(sym,alias) \ .weak alias;.equ alias,sym __weak_reference(__sys_fcntl,__fcntl_compat) #undef __weak_reference #endif /* __LIBC_COMPAT_H__ */