[MacPorts] #61299: python3x: -Wno-unused-result in _sysconfigdata__darwin_darwin.py unrecognized by gcc 4.2

MacPorts noreply at macports.org
Fri Oct 9 22:44:26 UTC 2020


#61299: python3x: -Wno-unused-result in _sysconfigdata__darwin_darwin.py
unrecognized by gcc 4.2
-------------------------+-------------------------------------------------
 Reporter:               |      Owner:  jmroot
  chrstphrchvz           |
     Type:  defect       |     Status:  assigned
 Priority:  Normal       |  Milestone:
Component:  ports        |    Version:  2.6.3
 Keywords:               |       Port:  python37 python38 python36 py-
                         |  chardet
-------------------------+-------------------------------------------------
 Python 3.x ports build using `-Wno-unused-result`; this argument gets
 saved in `CFLAGS` and other variables in
 _sysconfigdata!__darwin_darwin.py, and is used again when building ports
 for Python modules. On macOS 10.6, Python itself is built using an
 alternative compiler (e.g. MacPorts' clang 3.7 or clang 9.0) which
 recognizes `-Wno-unused-result`, but modules (e.g. `py3x-cchardet`) might
 try to build using a system compiler (e.g. gcc 4.2) which doesn't
 recognize the option:
 {{{
 /usr/bin/gcc-4.2 -Wno-unused-result -Wsign-compare -Wunreachable-code
 -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -pipe -Os -isysroot/
 -Isrc/ext/uchardet/src
 -I/opt/local/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9
 -c src/cchardet/_cchardet.cpp -o
 build/temp.macosx-10.6-x86_64-3.9/src/cchardet/_cchardet.o
 cc1plus: error: unrecognized command line option "-Wno-unused-result"
 }}}
 Possibly related to #56458. Possibly present in `python35` or earlier but
 haven't checked. (I personally am not using macOS 10.6.)

-- 
Ticket URL: <https://trac.macports.org/ticket/61299>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list