diff options
author | Ned Deily <nad@python.org> | 2020-05-18 13:17:22 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-18 13:17:22 (GMT) |
commit | 0da546665075aefbb476e192ed64122d340164f4 (patch) | |
tree | 7b8ab1370800158880c8bbd210ac36956c768ad7 /Mac | |
parent | c444108dd62672f2b41539bcc8f15da44501f405 (diff) | |
download | cpython-0da546665075aefbb476e192ed64122d340164f4.zip cpython-0da546665075aefbb476e192ed64122d340164f4.tar.gz cpython-0da546665075aefbb476e192ed64122d340164f4.tar.bz2 |
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 0b32673..db59fc5 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 4c05f26..1553b75 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 |