-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
Description
Bug report
The script Modules/makesetup has two issues
-
It uses sed
icommand with multiple escapes newlines. The feature works fine in GNU sed but does not work correctly with macOS' BSD sed. @ned-deily found a workaround for the problem. Thercommand with an external replacement file works correctly on GNU and BSD sed. -
makesetupcreates wrong compile rules for object files that end up in a shared library. The variables$(CCSHARED) $(PY_CFLAGS_NODIST) $(PY_CPPFLAGS)are missing some flags like address sanitizer. The script should create rules with$(PY_STDMODULE_CFLAGS) $(CCSHARED)instead. -
the order of cflags can break builds. For example macOS ARM64 builds are broken because
-I./Modules/_decimal/libmpdeccomes after-I/opt/homebrew/includeand the buildbot seems to come with an incompatible libmpdec header. Module-specific CFLAGs should come before Python CFLAGs. It is probably easier to move module CFLAGS beforePY_STDMODULE_CFLAGS. The homebrew flag comes fromPY_CPPFLAGSandCONFIGURE_CPPFLAGS.