From owner-svn-src-all@freebsd.org Wed Nov 7 09:49:27 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8F0C31121C47; Wed, 7 Nov 2018 09:49:27 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C84C48A57A; Wed, 7 Nov 2018 09:49:26 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A3A1014060; Wed, 7 Nov 2018 09:49:26 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wA79nQAm077498; Wed, 7 Nov 2018 09:49:26 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wA79nQWs077495; Wed, 7 Nov 2018 09:49:26 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201811070949.wA79nQWs077495@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Wed, 7 Nov 2018 09:49:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r340213 - in head: lib/csu/mips lib/csu/sparc64 share/mk X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: in head: lib/csu/mips lib/csu/sparc64 share/mk X-SVN-Commit-Revision: 340213 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C84C48A57A X-Spamd-Result: default: False [-103.11 / 200.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; ALLOW_DOMAIN_WHITELIST(-100.00)[FreeBSD.org]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; HAS_XAW(0.00)[]; R_SPF_SOFTFAIL(0.00)[~all]; DMARC_NA(0.00)[FreeBSD.org]; RCVD_COUNT_THREE(0.00)[4]; MX_GOOD(-0.01)[cached: mx1.FreeBSD.org]; NEURAL_HAM_SHORT(-1.00)[-0.999,0]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; RCVD_TLS_LAST(0.00)[] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 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: Wed, 07 Nov 2018 09:49:27 -0000 Author: andrew Date: Wed Nov 7 09:49:25 2018 New Revision: 340213 URL: https://svnweb.freebsd.org/changeset/base/340213 Log: Add the (untested) mips and sparc64 .init call sequences. The BSD crtbegin/crtend code now builds on all architectures, however further work is needed to check if it works correctly. MFC with: r339738 Sponsored by: DARPA, AFRL Modified: head/lib/csu/mips/crt.h head/lib/csu/sparc64/crt.h head/share/mk/src.opts.mk Modified: head/lib/csu/mips/crt.h ============================================================================== --- head/lib/csu/mips/crt.h Wed Nov 7 08:25:44 2018 (r340212) +++ head/lib/csu/mips/crt.h Wed Nov 7 09:49:25 2018 (r340213) @@ -27,5 +27,25 @@ #define _CRT_H_ #define HAVE_CTORS +#define CTORS_CONSTRUCTORS +#ifdef __mips_o32 +#define INIT_CALL_SEQ(func) \ + ".set noreorder \n" \ + "bal 1f \n" \ + "nop \n" \ + "1: \n" \ + ".cpload $ra \n" \ + ".set reorder \n" \ + "jal " __STRING(func) +#else +#define INIT_CALL_SEQ(func) \ + ".set noreorder \n" \ + "bal 1f \n" \ + "nop \n" \ + "1: \n" \ + ".set reorder \n" \ + ".cpsetup $ra, $v0, 1b \n" \ + "jal " __STRING(func) +#endif #endif Modified: head/lib/csu/sparc64/crt.h ============================================================================== --- head/lib/csu/sparc64/crt.h Wed Nov 7 08:25:44 2018 (r340212) +++ head/lib/csu/sparc64/crt.h Wed Nov 7 09:49:25 2018 (r340213) @@ -27,5 +27,7 @@ #define _CRT_H_ #define HAVE_CTORS +#define CTORS_CONSTRUCTORS +#define INIT_CALL_SEQ(func) "call " __STRING(func) "; nop" #endif Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Wed Nov 7 08:25:44 2018 (r340212) +++ head/share/mk/src.opts.mk Wed Nov 7 09:49:25 2018 (r340213) @@ -193,6 +193,7 @@ __DEFAULT_YES_OPTIONS = \ ZONEINFO __DEFAULT_NO_OPTIONS = \ + BSD_CRTBEGIN \ BSD_GREP \ CLANG_EXTRAS \ DTRACE_TESTS \ @@ -383,13 +384,6 @@ BROKEN_OPTIONS+=HYPERV # NVME is only x86 and powerpc64 .if ${__T} != "amd64" && ${__T} != "i386" && ${__T} != "powerpc64" BROKEN_OPTIONS+=NVME -.endif - -.if ${__T} == "aarch64" || ${__T} == "amd64" || ${__T} == "i386" || \ - ${__T} == "powerpc64" -__DEFAULT_NO_OPTIONS+=BSD_CRTBEGIN -.else -BROKEN_OPTIONS+=BSD_CRTBEGIN .endif .include