Skip to content

Commit fba47c6

Browse files
committed
unix: enable tcl/tk to use CoreFoundation
Before, they couldn't find CoreFoundation because the custom Clang we use doesn't know about the default search paths for macOS frameworks. So we define the include and framework path so it can find and use CoreFoundation. As part of this, the number of compiler warnings exploded. So we had to suppress more warnings to keep things in check.
1 parent 169bdad commit fba47c6

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

cpython-unix/build-tcl.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ CFLAGS="-fPIC -I${TOOLS_PATH}/deps/include"
3737

3838
if [ "${PYBUILD_PLATFORM}" = "macos" ]; then
3939
CFLAGS="${CFLAGS} -Wno-nullability-completeness -Wno-expansion-to-defined"
40+
CFLAGS="${CFLAGS} -I${MACOS_SDK_PATH}/System/Library/Frameworks -F${MACOS_SDK_PATH}/System/Library/Frameworks"
4041
fi
4142

4243
CFLAGS="${CFLAGS}" CPPFLAGS="${CFLAGS}" ./configure \

cpython-unix/build-tix.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ CFLAGS="-fPIC -DUSE_INTERP_RESULT"
2525

2626
if [ "${PYBUILD_PLATFORM}" = "macos" ]; then
2727
CFLAGS="${CFLAGS} -I${TOOLS_PATH}/deps/include -Wno-nullability-completeness -Wno-expansion-to-defined"
28+
CFLAGS="${CFLAGS} -I${MACOS_SDK_PATH}/System/Library/Frameworks -F${MACOS_SDK_PATH}/System/Library/Frameworks"
2829
EXTRA_CONFIGURE_FLAGS="--without-x"
2930
else
3031
EXTRA_CONFIGURE_FLAGS="--x-includes=/tools/deps/include --x-libraries=/tools/deps/lib"

cpython-unix/build-tk.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ CFLAGS="-fPIC"
1717
LDFLAGS=""
1818

1919
if [ "${PYBUILD_PLATFORM}" = "macos" ]; then
20-
CFLAGS="${CFLAGS} -I${TOOLS_PATH}/deps/include -Wno-nullability-completeness -Wno-expansion-to-defined"
20+
CFLAGS="${CFLAGS} -I${TOOLS_PATH}/deps/include -Wno-nullability-completeness -Wno-expansion-to-defined -Wno-availability"
21+
CFLAGS="${CFLAGS} -Wno-deprecated-declarations -Wno-unknown-attributes -Wno-typedef-redefinition"
22+
CFLAGS="${CFLAGS} -I${MACOS_SDK_PATH}/System/Library/Frameworks -F ${MACOS_SDK_PATH}/System/Library/Frameworks"
2123
LDFLAGS="-L${TOOLS_PATH}/deps/lib"
2224
EXTRA_CONFIGURE_FLAGS="--enable-aqua=yes --without-x"
2325
else

0 commit comments

Comments
 (0)