[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)
This commit is contained in:
Brandon Bergren 2019-12-27 05:01:13 +00:00
parent 6b45727338
commit e99c4e4d64
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=356118
3 changed files with 5 additions and 3 deletions

View File

@ -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

View File

@ -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;
}

View File

@ -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;
}