From owner-svn-src-all@FreeBSD.ORG Mon Feb 16 22:13:05 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0989C6A8; Mon, 16 Feb 2015 22:13:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E784DA60; Mon, 16 Feb 2015 22:13:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1GMD4CA080221; Mon, 16 Feb 2015 22:13:04 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1GMD3QI080217; Mon, 16 Feb 2015 22:13:03 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201502162213.t1GMD3QI080217@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Mon, 16 Feb 2015 22:13:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278870 - in head: lib/libc/sparc64/sys lib/libc/sys sys/sparc64/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Feb 2015 22:13:05 -0000 Author: marius Date: Mon Feb 16 22:13:03 2015 New Revision: 278870 URL: https://svnweb.freebsd.org/changeset/base/278870 Log: Unbreak sparc64 after r276630 by calling __sparc_sigtramp_setup signal trampoline as part of the MD __sys_sigaction again. Submitted by: kib (initial versions) MFC after: 3 days Added: head/lib/libc/sparc64/sys/sigaction1.S - copied, changed from r278826, head/lib/libc/sparc64/sys/sigaction.S Deleted: head/lib/libc/sparc64/sys/sigaction.S Modified: head/lib/libc/sparc64/sys/Makefile.inc head/lib/libc/sys/Makefile.inc head/sys/sparc64/include/asm.h Modified: head/lib/libc/sparc64/sys/Makefile.inc ============================================================================== --- head/lib/libc/sparc64/sys/Makefile.inc Mon Feb 16 21:56:19 2015 (r278869) +++ head/lib/libc/sparc64/sys/Makefile.inc Mon Feb 16 22:13:03 2015 (r278870) @@ -12,7 +12,7 @@ SRCS+= __sparc_sigtramp_setup.c \ CFLAGS+= -I${LIBC_SRCTOP}/sparc64/fpu -MDASM+= brk.S cerror.S exect.S pipe.S ptrace.S sbrk.S setlogin.S sigaction.S +MDASM+= brk.S cerror.S exect.S pipe.S ptrace.S sbrk.S setlogin.S sigaction1.S # Don't generate default code for these syscalls: NOASM= break.o exit.o getlogin.o openbsd_poll.o sstk.o yield.o Copied and modified: head/lib/libc/sparc64/sys/sigaction1.S (from r278826, head/lib/libc/sparc64/sys/sigaction.S) ============================================================================== --- head/lib/libc/sparc64/sys/sigaction.S Sun Feb 15 22:38:00 2015 (r278826, copy source) +++ head/lib/libc/sparc64/sys/sigaction1.S Mon Feb 16 22:13:03 2015 (r278870) @@ -29,7 +29,8 @@ __FBSDID("$FreeBSD$"); #include "SYS.h" -_SYSENTRY(sigaction) + WEAK_REFERENCE(__sys_sigaction, _sigaction) +ENTRY(__sys_sigaction) PIC_PROLOGUE(%o3, %o4) SET(sigcode_installed, %o4, %o3) lduw [%o3], %o4 @@ -44,6 +45,6 @@ _SYSENTRY(sigaction) 1: _SYSCALL(sigaction) retl nop -_SYSEND(sigaction) +END(__sys_sigaction) .comm sigcode_installed, 4, 4 Modified: head/lib/libc/sys/Makefile.inc ============================================================================== --- head/lib/libc/sys/Makefile.inc Mon Feb 16 21:56:19 2015 (r278869) +++ head/lib/libc/sys/Makefile.inc Mon Feb 16 22:13:03 2015 (r278870) @@ -65,7 +65,6 @@ INTERPOSED = \ sendmsg \ sendto \ setcontext \ - sigaction \ sigprocmask \ sigsuspend \ sigtimedwait \ @@ -76,6 +75,13 @@ INTERPOSED = \ write \ writev +.if ${MACHINE_CPUARCH} == "sparc64" +SRCS+= sigaction.c +NOASM+= sigaction.o +.else +INTERPOSED+= sigaction +.endif + SRCS+= ${INTERPOSED:S/$/.c/} NOASM+= ${INTERPOSED:S/$/.o/} PSEUDO+= ${INTERPOSED:C/^.*$/_&.o/} Modified: head/sys/sparc64/include/asm.h ============================================================================== --- head/sys/sparc64/include/asm.h Mon Feb 16 21:56:19 2015 (r278869) +++ head/sys/sparc64/include/asm.h Mon Feb 16 22:13:03 2015 (r278870) @@ -103,6 +103,16 @@ CNAME(x): #define END(x) .size x, . - x /* + * WEAK_REFERENCE(): create a weak reference alias from sym. + * The macro is not a general asm macro that takes arbitrary names, + * but one that takes only C names. It does the non-null name + * translation inside the macro. + */ +#define WEAK_REFERENCE(sym, alias) \ + .weak CNAME(alias); \ + .equ CNAME(alias),CNAME(sym) + +/* * Kernel RCS ID tag and copyright macros */