aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrandon Bergren <bdragon@FreeBSD.org>2019-12-27 05:01:13 +0000
committerBrandon Bergren <bdragon@FreeBSD.org>2019-12-27 05:01:13 +0000
commite99c4e4d6449626eda1934a2bdb80ab80621c8a6 (patch)
tree4ea5e4c186c01769f66e1ca12e737ab418aa1d1d
parent6b457273380f89180e91f8f22522f046e1fb1cdb (diff)
downloadsrc-e99c4e4d6449626eda1934a2bdb80ab80621c8a6.tar.gz
src-e99c4e4d6449626eda1934a2bdb80ab80621c8a6.zip
[PowerPC] Clang powerpcspe build fixes
* Fix a couple of format errors. * Add some extra compiler flags needed to force clang to build SPE code. (These are temporary until the target triple is fixed)
Notes
Notes: svn path=/head/; revision=356118
-rw-r--r--sys/conf/Makefile.powerpc4
-rw-r--r--sys/contrib/ncsw/Peripherals/BM/bm.h2
-rw-r--r--sys/contrib/ncsw/Peripherals/QM/qm.c2
3 files changed, 5 insertions, 3 deletions
diff --git a/sys/conf/Makefile.powerpc b/sys/conf/Makefile.powerpc
index 2f28a9ff732b..907f64dca62e 100644
--- a/sys/conf/Makefile.powerpc
+++ b/sys/conf/Makefile.powerpc
@@ -37,7 +37,9 @@ 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__
+CFLAGS.gcc+= -mabi=spe -D__SPE__
+CFLAGS.clang+= -mspe -D__SPE__ -m32
+HACK_EXTRA_FLAGS= -shared -m32 -mspe -D__SPE__
.endif
CFLAGS+= -msoft-float
CFLAGS.gcc+= -Wa,-many
diff --git a/sys/contrib/ncsw/Peripherals/BM/bm.h b/sys/contrib/ncsw/Peripherals/BM/bm.h
index e9708666e244..09870cb07156 100644
--- a/sys/contrib/ncsw/Peripherals/BM/bm.h
+++ b/sys/contrib/ncsw/Peripherals/BM/bm.h
@@ -395,7 +395,7 @@ static __inline__ uint32_t BmBpidGet(t_Bm *p_Bm, bool force, uint32_t base)
size,
alignment,
"BM BPID MEM");
- KASSERT(ans < UINT32_MAX, ("Oops, %lx > UINT32_MAX!\n", ans));
+ KASSERT(ans < UINT32_MAX, ("Oops, %jx > UINT32_MAX!\n", (uintmax_t)ans));
return (uint32_t)ans;
}
diff --git a/sys/contrib/ncsw/Peripherals/QM/qm.c b/sys/contrib/ncsw/Peripherals/QM/qm.c
index 50b74712e266..ed3049f0a318 100644
--- a/sys/contrib/ncsw/Peripherals/QM/qm.c
+++ b/sys/contrib/ncsw/Peripherals/QM/qm.c
@@ -560,7 +560,7 @@ uint32_t QmFqidGet(t_Qm *p_Qm, uint32_t size, uint32_t alignment, bool force, ui
"QM FQID MEM");
XX_UnlockIntrSpinlock(p_Qm->lock, intFlags);
- KASSERT(ans < UINT32_MAX, ("Oops, %lx > UINT32_MAX!\n", ans));
+ KASSERT(ans < UINT32_MAX, ("Oops, %jx > UINT32_MAX!\n", (uintmax_t)ans));
return (uint32_t)ans;
}