Skip to content

Commit

Permalink
python PG: fix build of py312 packages with Xcode gcc
Browse files Browse the repository at this point in the history
  • Loading branch information
barracuda156 committed Dec 9, 2024
1 parent c8e95c5 commit bb75f02
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions _resources/port1.0/group/python-1.0.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,15 @@ proc python_set_versions {option action args} {
lappend pycxxflags -isysroot${configure.sysroot}
lappend pyobjcflags -isysroot${configure.sysroot}
}
# Only needed for Python 3.12, since later require C11.
if {${python.version} == 312} {
# python3.12/internal/pycore_frame.h:134: error:
# ‘for’ loop initial declaration used outside C99 mode
if {[string match *gcc-4.* ${configure.compiler}]} {
python.add_cflags yes
lappend pycflags -std=c99
}
}
if {$pycflags ne ""} {
build.env-append CFLAGS=[join $pycflags]
}
Expand Down

0 comments on commit bb75f02

Please sign in to comment.