Skip to content

Commit 8c14333

Browse files
committed
PPC970: drop -mcpu=970 which seems to produce faulty code
Fixes: #4376
1 parent d2f1594 commit 8c14333

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

cmake/cc.cmake

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,18 +282,21 @@ if (${CORE} STREQUAL POWER8)
282282
endif ()
283283
endif ()
284284

285+
# With -mcpu=970 added it compiles, but library is broken, at least on macOS. If someone
286+
# tests on *BSD or Linux and adds this flag, please make sure it is not used for macOS case.
285287
if (${CORE} STREQUAL PPC970)
286288
if (NOT DYNAMIC_ARCH)
287-
set (CCOMMON_OPT "${CCOMMON_OPT} -mcpu=970 -mtune=970 -maltivec -fno-fast-math")
289+
set (CCOMMON_OPT "${CCOMMON_OPT} -mtune=970 -maltivec -fno-fast-math")
288290
endif ()
289291
if (APPLE)
290292
set (CCOMMON_OPT "${CCOMMON_OPT} -force_cpusubtype_ALL")
291293
endif ()
292294
endif ()
293295

296+
# -mcpu=G4 seems to work fine, but perhaps avoid it for the sake of consistency?
294297
if (${CORE} STREQUAL PPCG4)
295298
if (NOT DYNAMIC_ARCH)
296-
set (CCOMMON_OPT "${CCOMMON_OPT} -mcpu=G4 -mtune=G4 -maltivec -fno-fast-math")
299+
set (CCOMMON_OPT "${CCOMMON_OPT} -mtune=G4 -maltivec -fno-fast-math")
297300
endif ()
298301
if (APPLE)
299302
set (CCOMMON_OPT "${CCOMMON_OPT} -force_cpusubtype_ALL")

0 commit comments

Comments
 (0)