svn commit: r308711 - head/share/mk

Alexander Kabaev kan at FreeBSD.org
Wed Nov 16 03:19:37 UTC 2016


Author: kan
Date: Wed Nov 16 03:19:36 2016
New Revision: 308711
URL: https://svnweb.freebsd.org/changeset/base/308711

Log:
  Set endianness and floating point flags explicitly for MIPS targets
  
  The tree can be build with an external toolchain that will not
  necessarily default to desired settings, so we have to specify
  the required flags explicitly to force the required compilation
  mode.
  
  Reviewed by:	adrian, br
  Sponsored by:	https://reviews.freebsd.org/D8505

Modified:
  head/share/mk/bsd.cpu.mk

Modified: head/share/mk/bsd.cpu.mk
==============================================================================
--- head/share/mk/bsd.cpu.mk	Wed Nov 16 02:51:24 2016	(r308710)
+++ head/share/mk/bsd.cpu.mk	Wed Nov 16 03:19:36 2016	(r308711)
@@ -303,9 +303,22 @@ MACHINE_CPU = v9 ultrasparc ultrasparc3
 
 .if ${MACHINE_CPUARCH} == "mips"
 CFLAGS += -G0
-.if ${MACHINE_ARCH:Mmips*hf}
+. if ${MACHINE_ARCH:Mmips*el*} != ""
+ACFLAGS += -EL
+AFLAGS += -EL
+CFLAGS += -EL
+LDFLAGS += -EL
+. else
+ACFLAGS += -EB
+AFLAGS += -EB
+CFLAGS += -EB
+LDFLAGS += -EB
+. endif
+. if ${MACHINE_ARCH:Mmips*hf}
 CFLAGS += -mhard-float
-.endif
+. else
+CFLAGS += -msoft-float
+. endif
 .endif
 
 ########## arm


More information about the svn-src-head mailing list