From owner-svn-src-head@freebsd.org Fri Sep 29 06:36:20 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 696DCE24D58; Fri, 29 Sep 2017 06:36:20 +0000 (UTC) (envelope-from wma@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 mx1.freebsd.org (Postfix) with ESMTPS id 38956800B2; Fri, 29 Sep 2017 06:36:20 +0000 (UTC) (envelope-from wma@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8T6aJQf089558; Fri, 29 Sep 2017 06:36:19 GMT (envelope-from wma@FreeBSD.org) Received: (from wma@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8T6aJDG089556; Fri, 29 Sep 2017 06:36:19 GMT (envelope-from wma@FreeBSD.org) Message-Id: <201709290636.v8T6aJDG089556@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wma set sender to wma@FreeBSD.org using -f From: Wojciech Macek Date: Fri, 29 Sep 2017 06:36:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r324099 - in head: share/mk sys/boot X-SVN-Group: head X-SVN-Commit-Author: wma X-SVN-Commit-Paths: in head: share/mk sys/boot X-SVN-Commit-Revision: 324099 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Sep 2017 06:36:20 -0000 Author: wma Date: Fri Sep 29 06:36:19 2017 New Revision: 324099 URL: https://svnweb.freebsd.org/changeset/base/324099 Log: Compile loader as Little-Endian on PPC64/POWER8 Add flag to the makefile to allow loader compilation as Little-Endian 32-bit executable. Usage: make WITH_LOADER_FORCE_LE=yes -C sys/boot all Submitted by: Wojciech Macek Reviewed by: imp, nwhitehorn Obtained from: Semihalf Sponsored by: QCM Technologies Differential revision: https://reviews.freebsd.org/D12421 Modified: head/share/mk/src.opts.mk head/sys/boot/Makefile.inc Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Fri Sep 29 06:24:45 2017 (r324098) +++ head/share/mk/src.opts.mk Fri Sep 29 06:36:19 2017 (r324099) @@ -180,6 +180,7 @@ __DEFAULT_NO_OPTIONS = \ GNU_GREP_COMPAT \ HESIOD \ LIBSOFT \ + LOADER_FORCE_LE \ NAND \ OFED \ OPENLDAP \ Modified: head/sys/boot/Makefile.inc ============================================================================== --- head/sys/boot/Makefile.inc Fri Sep 29 06:24:45 2017 (r324098) +++ head/sys/boot/Makefile.inc Fri Sep 29 06:36:19 2017 (r324099) @@ -1,6 +1,6 @@ # $FreeBSD$ -.include +.include SSP_CFLAGS= @@ -22,3 +22,11 @@ CFLAGS.clang+= -mfpu=none # when this test succeeds rather than require dd to be a bootstrap tool. DD_NOSTATUS!=(dd status=none count=0 2> /dev/null && echo status=none) || true DD=dd ${DD_NOSTATUS} + +.if ${MK_LOADER_FORCE_LE} != "no" + +.if ${MACHINE_ARCH} == "powerpc64" +CFLAGS+= -mlittle-endian +.endif + +.endif