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
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to