Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "bpo-26317: Support OBJC and OBJCXX configure variables .. " (GH-20176) #20182

Merged
merged 1 commit into from
May 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions Doc/whatsnew/3.9.rst
Original file line number Diff line number Diff line change
Expand Up @@ -892,14 +892,6 @@ Build Changes
functions are now required to build Python.
(Contributed by Victor Stinner in :issue:`39395`.)

* The ``OBJC`` and ``OBJCXX`` standard command line options for the configure
script are now supported. This allows building fot macOS with a third-party
compiler, like GNU `gcc`, for everything except for the several
system-specific source files that need system headers that require the
Apple-supplied compile chain (e.g. the ``_scproxy`` helper module and
``PythonLauncher.app``).
(Contributed by Jeffrey Kintscher in :issue:`26317`.)


C API Changes
=============
Expand Down
1 change: 0 additions & 1 deletion Mac/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ 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

Expand Down
16 changes: 7 additions & 9 deletions Mac/PythonLauncher/Makefile.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
CC=@CC@
LD=@CC@
OBJC=@OBJC@
OBJCFLAFS=@OBJCFLAGS@
BASECFLAGS=@BASECFLAGS@
OPT=@OPT@
CFLAGS=@CFLAGS@ $(BASECFLAGS) $(OPT)
Expand Down Expand Up @@ -54,25 +52,25 @@ Python\ Launcher.app: Info.plist \
cp -R $(srcdir)/English.lproj "Python Launcher.app/Contents/Resources"

FileSettings.o: $(srcdir)/FileSettings.m
$(OBJC) $(CFLAGS) -o $@ -c $(srcdir)/FileSettings.m
$(CC) $(CFLAGS) -o $@ -c $(srcdir)/FileSettings.m

MyAppDelegate.o: $(srcdir)/MyAppDelegate.m
$(OBJC) $(CFLAGS) -o $@ -c $(srcdir)/MyAppDelegate.m
$(CC) $(CFLAGS) -o $@ -c $(srcdir)/MyAppDelegate.m

MyDocument.o: $(srcdir)/MyDocument.m
$(OBJC) $(CFLAGS) -o $@ -c $(srcdir)/MyDocument.m
$(CC) $(CFLAGS) -o $@ -c $(srcdir)/MyDocument.m

PreferencesWindowController.o: $(srcdir)/PreferencesWindowController.m
$(OBJC) $(CFLAGS) -o $@ -c $(srcdir)/PreferencesWindowController.m
$(CC) $(CFLAGS) -o $@ -c $(srcdir)/PreferencesWindowController.m

doscript.o: $(srcdir)/doscript.m
$(OBJC) $(CFLAGS) -o $@ -c $(srcdir)/doscript.m
$(CC) $(CFLAGS) -o $@ -c $(srcdir)/doscript.m

main.o: $(srcdir)/main.m
$(OBJC) $(CFLAGS) -o $@ -c $(srcdir)/main.m
$(CC) $(CFLAGS) -o $@ -c $(srcdir)/main.m

Python\ Launcher: $(OBJECTS)
$(OBJC) $(LDFLAGS) -o "Python Launcher" $(OBJECTS) -framework AppKit -framework Carbon
$(CC) $(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
13 changes: 1 addition & 12 deletions Makefile.pre.in
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ abs_builddir= @abs_builddir@

CC= @CC@
CXX= @CXX@
OBJC= @OBJC@
MAINCC= @MAINCC@
LINKCC= @LINKCC@
AR= @AR@
Expand Down Expand Up @@ -614,22 +613,12 @@ $(srcdir)/Modules/_blake2/blake2s_impl.c: $(srcdir)/Modules/_blake2/blake2b_impl
$(PYTHON_FOR_REGEN) $(srcdir)/Modules/_blake2/blake2b2s.py
$(PYTHON_FOR_REGEN) $(srcdir)/Tools/clinic/clinic.py -f $@

# _scproxy.o needs to be built outside of setup.py so that we can force
# the use of the OBJC compiler when the CC compiler is different. For
# example, it allows _scproxy.c to be compiled using the clang compiler
# while the rest of the project uses the GNU C compiler.
#
# see issue #26317 for details
@SCPROXY@Modules/_scproxy.o: $(srcdir)/Modules/_scproxy.c $(srcdir)/Include/Python.h
@SCPROXY@ $(OBJC) -c $(CCSHARED) $(PY_CORE_CFLAGS) -o $@ $<
@NOSCPROXY@.PHONY: Modules/_scproxy.o

# Build the shared modules
# Under GNU make, MAKEFLAGS are sorted and normalized; the 's' for
# -s, --silent or --quiet is always the first char.
# Under BSD make, MAKEFLAGS might be " -s -v x=y".
# Ignore macros passed by GNU make, passed after --
sharedmods: $(BUILDPYTHON) pybuilddir.txt Modules/_math.o Modules/_scproxy.o
sharedmods: $(BUILDPYTHON) pybuilddir.txt Modules/_math.o
@case "`echo X $$MAKEFLAGS | sed 's/^X //;s/ -- .*//'`" in \
*\ -s*|s*) quiet="-q";; \
*) quiet="";; \
Expand Down
1 change: 0 additions & 1 deletion Misc/ACKS
Original file line number Diff line number Diff line change
Expand Up @@ -882,7 +882,6 @@ Sam Kimbrel
Tomohiko Kinebuchi
James King
W. Trevor King
Jeffrey Kintscher
Paul Kippes
Steve Kirsch
Sebastian Kirsche
Expand Down

This file was deleted.

10 changes: 5 additions & 5 deletions aclocal.m4
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ dnl
dnl See the "Since" comment for each macro you use to see what version
dnl of the macros you require.
m4_defun([PKG_PREREQ],
[m4_define([PKG_MACROS_VERSION], [0.29.2])
[m4_define([PKG_MACROS_VERSION], [0.29.1])
m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
[m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
])dnl PKG_PREREQ
Expand Down Expand Up @@ -156,7 +156,7 @@ AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl

pkg_failed=no
AC_MSG_CHECKING([for $2])
AC_MSG_CHECKING([for $1])

_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
Expand All @@ -166,11 +166,11 @@ and $1[]_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.])

if test $pkg_failed = yes; then
AC_MSG_RESULT([no])
AC_MSG_RESULT([no])
_PKG_SHORT_ERRORS_SUPPORTED
if test $_pkg_short_errors_supported = yes; then
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
else
else
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
Expand All @@ -187,7 +187,7 @@ installed software in a non-standard prefix.
_PKG_TEXT])[]dnl
])
elif test $pkg_failed = untried; then
AC_MSG_RESULT([no])
AC_MSG_RESULT([no])
m4_default([$4], [AC_MSG_FAILURE(
[The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
Expand Down
Loading