Opened 4 years ago
Last modified 4 years ago
#61299 closed defect
python3x: -Wno-unused-result in _sysconfigdata__darwin_darwin.py unrecognized by gcc 4.2 — at Initial Version
Reported by: | chrstphrchvz (Christopher Chavez) | Owned by: | jmroot (Joshua Root) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.6.3 |
Keywords: | Cc: | tobypeterson | |
Port: | python37 python38 python39 py-cchardet py-pycryptodome py-fann2 |
Description
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.)
Note: See
TracTickets for help on using
tickets.