diff options
author | 2020-05-18 09:17:22 -0400 | |
---|---|---|
committer | 2020-05-18 09:17:22 -0400 | |
commit | 0da546665075aefbb476e192ed64122d340164f4 (patch) | |
tree | 7b8ab1370800158880c8bbd210ac36956c768ad7 /Mac | |
parent | bpo-40548: Github Actions: update actions/checkout to v2 (GH-20164) (diff) | |
download | cpython-0da546665075aefbb476e192ed64122d340164f4.tar.gz cpython-0da546665075aefbb476e192ed64122d340164f4.tar.bz2 cpython-0da546665075aefbb476e192ed64122d340164f4.zip |
bpo-26317: Support OBJC and OBJCXX configure command line variables (GH-20176)
Add support to the configure script for OBJC and OBJCXX command line options so that the macOS builds can use the clang compiler for the macOS-specific Objective C source files. This allows third-party compilers, like GNU gcc, to be used to build the rest of the project since some of the Objective C system header files are not compilable by GNU gcc.
Co-authored-by: Jeffrey Kintscher <websurfer@surf2c.net>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Diffstat (limited to 'Mac')
-rw-r--r-- | Mac/Makefile.in | 1 | ||||
-rw-r--r-- | Mac/PythonLauncher/Makefile.in | 16 |
2 files changed, 10 insertions, 7 deletions
diff --git a/Mac/Makefile.in b/Mac/Makefile.in index 0b32673323a..db59fc5d7f5 100644 --- a/Mac/Makefile.in +++ b/Mac/Makefile.in @@ -21,6 +21,7 @@ PYTHONFRAMEWORK=@PYTHONFRAMEWORK@ PYTHONFRAMEWORKIDENTIFIER=@PYTHONFRAMEWORKIDENTIFIER@ LIPO_32BIT_FLAGS=@LIPO_32BIT_FLAGS@ CC=@CC@ +OBJC=@OBJC@ MACOSX_DEPLOYMENT_TARGET=@CONFIGURE_MACOSX_DEPLOYMENT_TARGET@ export MACOSX_DEPLOYMENT_TARGET diff --git a/Mac/PythonLauncher/Makefile.in b/Mac/PythonLauncher/Makefile.in index 4c05f26e835..1553b759051 100644 --- a/Mac/PythonLauncher/Makefile.in +++ b/Mac/PythonLauncher/Makefile.in @@ -1,5 +1,7 @@ CC=@CC@ LD=@CC@ +OBJC=@OBJC@ +OBJCFLAFS=@OBJCFLAGS@ BASECFLAGS=@BASECFLAGS@ OPT=@OPT@ CFLAGS=@CFLAGS@ $(BASECFLAGS) $(OPT) @@ -52,25 +54,25 @@ Python\ Launcher.app: Info.plist \ cp -R $(srcdir)/English.lproj "Python Launcher.app/Contents/Resources" FileSettings.o: $(srcdir)/FileSettings.m - $(CC) $(CFLAGS) -o $@ -c $(srcdir)/FileSettings.m + $(OBJC) $(CFLAGS) -o $@ -c $(srcdir)/FileSettings.m MyAppDelegate.o: $(srcdir)/MyAppDelegate.m - $(CC) $(CFLAGS) -o $@ -c $(srcdir)/MyAppDelegate.m + $(OBJC) $(CFLAGS) -o $@ -c $(srcdir)/MyAppDelegate.m MyDocument.o: $(srcdir)/MyDocument.m - $(CC) $(CFLAGS) -o $@ -c $(srcdir)/MyDocument.m + $(OBJC) $(CFLAGS) -o $@ -c $(srcdir)/MyDocument.m PreferencesWindowController.o: $(srcdir)/PreferencesWindowController.m - $(CC) $(CFLAGS) -o $@ -c $(srcdir)/PreferencesWindowController.m + $(OBJC) $(CFLAGS) -o $@ -c $(srcdir)/PreferencesWindowController.m doscript.o: $(srcdir)/doscript.m - $(CC) $(CFLAGS) -o $@ -c $(srcdir)/doscript.m + $(OBJC) $(CFLAGS) -o $@ -c $(srcdir)/doscript.m main.o: $(srcdir)/main.m - $(CC) $(CFLAGS) -o $@ -c $(srcdir)/main.m + $(OBJC) $(CFLAGS) -o $@ -c $(srcdir)/main.m Python\ Launcher: $(OBJECTS) - $(CC) $(LDFLAGS) -o "Python Launcher" $(OBJECTS) -framework AppKit -framework Carbon + $(OBJC) $(LDFLAGS) -o "Python Launcher" $(OBJECTS) -framework AppKit -framework Carbon Info.plist: $(srcdir)/Info.plist.in sed 's/%VERSION%/'"`$(RUNSHARED) $(BUILDPYTHON) -c 'import platform; print(platform.python_version())'`"'/g' < $(srcdir)/Info.plist.in > Info.plist |