[MacPorts] #64532: graphite2 fails to build for ppc on 10.6.8 (Rosetta): unrecognized command line option '-mfpmath=sse'

MacPorts noreply at macports.org
Wed Jan 26 17:18:19 UTC 2022


#64532: graphite2 fails to build for ppc on 10.6.8 (Rosetta): unrecognized command
line option '-mfpmath=sse'
---------------------------+-------------------------------------------
  Reporter:  barracuda156  |      Owner:  (none)
      Type:  defect        |     Status:  new
  Priority:  Normal        |  Milestone:
 Component:  ports         |    Version:  2.7.1
Resolution:                |   Keywords:  powerpc, snowleopard, rosetta
      Port:  graphite2     |
---------------------------+-------------------------------------------

Comment (by barracuda156):

 The problem lies here:

 {{{

 Use -mfpmath=sse -msse2 only on Intel.
 https://github.com/silnrsi/graphite/pull/44
 --- src/CMakeLists.txt.orig     2018-08-15 00:38:09.000000000 -0500
 +++ src/CMakeLists.txt  2018-10-01 12:46:50.000000000 -0500
 @@ -136,9 +136,14 @@

  if  (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
      set_target_properties(graphite2 PROPERTIES
 -        COMPILE_FLAGS   "-Wall -Wextra -Wno-unknown-pragmas -Wimplicit-
 fallthrough -Wendif-labels -Wshadow -Wno-ctor-dtor-privacy -Wno-non-
 virtual-dtor -fno-rtti -fno-exceptions -fvisibility=hidden -fvisibility-
 inlines-hidden -mfpmath=sse -msse2"
 -        LINK_FLAGS      "-nodefaultlibs"
 +        COMPILE_FLAGS   "-Wall -Wextra -Wno-unknown-pragmas -Wendif-
 labels -Wshadow -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -fno-rtti
 -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden"
          LINKER_LANGUAGE C)
 +    if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86|i.86")
 +        add_definitions(-mfpmath=sse -msse2)
 +    endif (${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86|i.86")
 +    if (${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
 +        add_definitions(-Wimplicit-fallthrough)
 +    endif (${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
      target_link_libraries(graphite2 c)
      include(Graphite)
      nolib_test(stdc++ $<TARGET_SONAME_FILE:graphite2>)
 }}}

 These flags should be only used for Intel, however Cmake applies them
 nevertheless, unaware of Rosetta case.

-- 
Ticket URL: <https://trac.macports.org/ticket/64532#comment:2>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list