changeset 296:e6bd998b0308

- FBSD12-CURRENT/mipshf needs to be told explicitly to use -mhard_float (at least as of may 2018)
author Tassilo Philipp
date Wed, 16 May 2018 16:35:39 +0200
parents a6963fd4a8cc
children dd1d0b0fd896
files ChangeLog configure
diffstat 2 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Tue May 08 00:37:28 2018 +0200
+++ b/ChangeLog	Wed May 16 16:35:39 2018 +0200
@@ -1,6 +1,8 @@
 This file lists bigger/noteworthy changes, only...
 
 Version 1.1 (upcoming)
+buildsys:
+  o default ./configure: FreeBSD/mips*hf needed -mhard-float compiler flag set explicitly
 
 Version 1.0 (2018/04/23)
 dyncall:
--- a/configure	Tue May 08 00:37:28 2018 +0200
+++ b/configure	Wed May 16 16:35:39 2018 +0200
@@ -91,7 +91,12 @@
     ;;
   FreeBSD)
     if [ -z "${CFLAGS}" ]; then
-      printf "CFLAGS=-fPIC\n" >>$C
+      if [ `uname -m` = "mips" ] && ! echo 'int main(){return (float)(int)&main;}' | cc -x c -o mips_float_test - >/dev/null 2>&1; then
+        # FBSD12-CURRENT/mipshf needs to be told explicitly to use -mhard_float (at least as of may 2018)
+        printf "CFLAGS=-fPIC -mhard-float\n" >>$C
+      else
+        printf "CFLAGS=-fPIC\n" >>$C
+      fi
     fi
     printf "LDLIBS=-lm\n" >>$C
     printf "RM=rm -f\n" >>$C