Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Mar 2016 22:32:03 +0000 (UTC)
From:      Justin Hibbits <jhibbits@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r296812 - in projects/powerpcspe/sys: conf powerpc/include
Message-ID:  <201603132232.u2DMW3js088142@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhibbits
Date: Sun Mar 13 22:32:03 2016
New Revision: 296812
URL: https://svnweb.freebsd.org/changeset/base/296812

Log:
  Pass __SPE__ on the command line, to enforce SPE availability.
  
  -mno-spe, specified later, overrides -mspe, and undefines the implicit __SPE__.
  To maintain consistency between user and kernel, specify it manually.

Modified:
  projects/powerpcspe/sys/conf/Makefile.powerpc
  projects/powerpcspe/sys/powerpc/include/param.h

Modified: projects/powerpcspe/sys/conf/Makefile.powerpc
==============================================================================
--- projects/powerpcspe/sys/conf/Makefile.powerpc	Sun Mar 13 21:26:18 2016	(r296811)
+++ projects/powerpcspe/sys/conf/Makefile.powerpc	Sun Mar 13 22:32:03 2016	(r296812)
@@ -35,6 +35,10 @@ LDSCRIPT_NAME?= ldscript.${MACHINE_ARCH}
 
 INCLUDES+= -I$S/contrib/libfdt
 
+.if "${MACHINE_ARCH}" == "powerpcspe"
+# Force __SPE__, since the builtin will be removed later with -mno-spe
+CFLAGS+= -mabi=spe -D__SPE__
+.endif
 CFLAGS+= -msoft-float -Wa,-many
 
 # Build position-independent kernel

Modified: projects/powerpcspe/sys/powerpc/include/param.h
==============================================================================
--- projects/powerpcspe/sys/powerpc/include/param.h	Sun Mar 13 21:26:18 2016	(r296811)
+++ projects/powerpcspe/sys/powerpc/include/param.h	Sun Mar 13 22:32:03 2016	(r296812)
@@ -57,9 +57,13 @@
 #ifdef __powerpc64__
 #define	MACHINE_ARCH	"powerpc64"
 #else
+#ifdef	__SPE__
+#define	MACHINE_ARCH	"powerpcspe"
+#else
 #define	MACHINE_ARCH	"powerpc"
 #endif
 #endif
+#endif
 #define	MID_MACHINE	MID_POWERPC
 #ifdef __powerpc64__
 #ifndef	MACHINE_ARCH32



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