Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Jul 2019 18:40:43 +0000 (UTC)
From:      Brooks Davis <brooks@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r350476 - stable/12/share/mk
Message-ID:  <201907311840.x6VIehED028301@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: brooks
Date: Wed Jul 31 18:40:43 2019
New Revision: 350476
URL: https://svnweb.freebsd.org/changeset/base/350476

Log:
  MFC r350159:
  
  Make setting mips endian and ABI less verbose.
  
  Allow ABI to be over ridden to allow (with other changes) programs to be
  built targeting ABIs other than the default.  This is used in CheriBSD.
  
  Reviewed by:	imp
  Obtained from:	CheriBSD
  Sponsored by:	DARPA, AFRL
  Differential Revision:	https://reviews.freebsd.org/D21001

Modified:
  stable/12/share/mk/bsd.cpu.mk
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/share/mk/bsd.cpu.mk
==============================================================================
--- stable/12/share/mk/bsd.cpu.mk	Wed Jul 31 18:25:52 2019	(r350475)
+++ stable/12/share/mk/bsd.cpu.mk	Wed Jul 31 18:40:43 2019	(r350476)
@@ -312,27 +312,20 @@ MACHINE_CPU = v9 ultrasparc ultrasparc3
 
 .if ${MACHINE_CPUARCH} == "mips"
 CFLAGS += -G0
+AFLAGS+= -${MIPS_ENDIAN} -mabi=${MIPS_ABI}
+CFLAGS+= -${MIPS_ENDIAN} -mabi=${MIPS_ABI}
+LDFLAGS+= -${MIPS_ENDIAN} -mabi=${MIPS_ABI}
 . if ${MACHINE_ARCH:Mmips*el*} != ""
-AFLAGS += -EL
-CFLAGS += -EL
-LDFLAGS += -EL
+MIPS_ENDIAN=	EL
 . else
-AFLAGS += -EB
-CFLAGS += -EB
-LDFLAGS += -EB
+MIPS_ENDIAN=	EB
 . endif
 . if ${MACHINE_ARCH:Mmips64*} != ""
-AFLAGS+= -mabi=64
-CFLAGS+= -mabi=64
-LDFLAGS+= -mabi=64
+MIPS_ABI?=	64
 . elif ${MACHINE_ARCH:Mmipsn32*} != ""
-AFLAGS+= -mabi=n32
-CFLAGS+= -mabi=n32
-LDFLAGS+= -mabi=n32
+MIPS_ABI?=	n32
 . else
-AFLAGS+= -mabi=32
-CFLAGS+= -mabi=32
-LDFLAGS+= -mabi=32
+MIPS_ABI?=	32
 . endif
 . if ${MACHINE_ARCH:Mmips*hf}
 CFLAGS += -mhard-float



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201907311840.x6VIehED028301>