Browse Source

[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)
freebsd/current/master
bdragon 6 months ago
parent
commit
cf45168e07
3 changed files with 5 additions and 3 deletions
  1. +3
    -1
      sys/conf/Makefile.powerpc
  2. +1
    -1
      sys/contrib/ncsw/Peripherals/BM/bm.h
  3. +1
    -1
      sys/contrib/ncsw/Peripherals/QM/qm.c

+ 3
- 1
sys/conf/Makefile.powerpc 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

+ 1
- 1
sys/contrib/ncsw/Peripherals/BM/bm.h 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;
}


+ 1
- 1
sys/contrib/ncsw/Peripherals/QM/qm.c 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;
}


Loading…
Cancel
Save