Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 581304
Collapse All | Expand All

(-)configure.ac.old (+28 lines)
Lines 5195-5200 Link Here
5195
              [Define to 1 if the getrandom() function is available])
5195
              [Define to 1 if the getrandom() function is available])
5196
fi
5196
fi
5197
5197
5198
if test "$cross_compiling" = yes; then
5199
    AC_MSG_CHECKING([for native python interpreter])
5200
	for interp in python$PACKAGE_VERSION python3 python; do
5201
		which $interp >/dev/null 2>&1 || continue
5202
		if $interp -c 'import sys;sys.exit(not sys.version_info@<:@:2@:>@ >= (3,3))'; then
5203
			break
5204
		fi
5205
		interp=
5206
	done
5207
	if test x$interp = x; then
5208
		AC_MSG_ERROR([native python$PACKAGE_VERSION interpreter not found])
5209
	fi
5210
	AC_MSG_RESULT($interp)
5211
	AC_CHECK_LIB($interp, main, PYTHON_LIB_FOR_BUILD=-l${interp}, PYTHON_LIB_FOR_BUILD=no)
5212
	if test x$PYTHON_LIB_FOR_BUILD == xno; then
5213
		AC_CHECK_LIB(${interp}m, main, PYTHON_LIB_FOR_BUILD=-l${interp}m, PYTHON_LIB_FOR_BUILD=no)
5214
	fi
5215
	if test x$PYTHON_LIB_FOR_BUILD != xno; then
5216
		PYTHON_INCLUDE_DIR_FOR_BUILD=`$interp -c "from distutils.sysconfig import *; print(get_config_var('CONFINCLUDEPY'))"`
5217
		BUILD_NATIVE_TOOLS=yes
5218
	fi
5219
fi
5220
5221
AC_PROG_CC_FOR_BUILD
5222
AC_SUBST(BUILD_NATIVE_TOOLS)
5223
AC_SUBST(PYTHON_INCLUDE_DIR_FOR_BUILD)
5224
AC_SUBST(PYTHON_LIB_FOR_BUILD)
5225
5198
# generate output files
5226
# generate output files
5199
AC_CONFIG_FILES(Makefile.pre Modules/Setup.config Misc/python.pc Misc/python-config.sh)
5227
AC_CONFIG_FILES(Makefile.pre Modules/Setup.config Misc/python.pc Misc/python-config.sh)
5200
AC_CONFIG_FILES([Modules/ld_so_aix], [chmod +x Modules/ld_so_aix])
5228
AC_CONFIG_FILES([Modules/ld_so_aix], [chmod +x Modules/ld_so_aix])
(-)Makefile.pre.in.old (-2 / +31 lines)
Lines 32-37 Link Here
32
32
33
33
34
CC=		@CC@
34
CC=		@CC@
35
CC_FOR_BUILD=	@CC_FOR_BUILD@
35
CXX=		@CXX@
36
CXX=		@CXX@
36
MAINCC=		@MAINCC@
37
MAINCC=		@MAINCC@
37
LINKCC=		@LINKCC@
38
LINKCC=		@LINKCC@
Lines 86-96 Link Here
86
# command line to append to these values without stomping the pre-set
87
# command line to append to these values without stomping the pre-set
87
# values.
88
# values.
88
PY_CFLAGS=	$(BASECFLAGS) $(OPT) $(CONFIGURE_CFLAGS) $(CFLAGS) $(EXTRA_CFLAGS)
89
PY_CFLAGS=	$(BASECFLAGS) $(OPT) $(CONFIGURE_CFLAGS) $(CFLAGS) $(EXTRA_CFLAGS)
90
PY_BUILDCFLAGS=	$(BASECFLAGS) $(OPT) $(EXTRA_CFLAGS)
89
PY_CFLAGS_NODIST=$(CONFIGURE_CFLAGS_NODIST) $(CFLAGS_NODIST)
91
PY_CFLAGS_NODIST=$(CONFIGURE_CFLAGS_NODIST) $(CFLAGS_NODIST)
90
# Both CPPFLAGS and LDFLAGS need to contain the shell's value for setup.py to
92
# Both CPPFLAGS and LDFLAGS need to contain the shell's value for setup.py to
91
# be able to build extension modules using the directories specified in the
93
# be able to build extension modules using the directories specified in the
92
# environment variables
94
# environment variables
93
PY_CPPFLAGS=	$(BASECPPFLAGS) -I. -IInclude -I$(srcdir)/Include $(CONFIGURE_CPPFLAGS) $(CPPFLAGS)
95
PY_CPPFLAGS=	$(BASECPPFLAGS) -I. -IInclude -I$(srcdir)/Include $(CONFIGURE_CPPFLAGS) $(CPPFLAGS)
96
PY_BUILD_CPPFLAGS=	$(BASECPPFLAGS) -I. -IInclude -I$(PYTHON_INCLUDE_DIR_FOR_BUILD) $(CONFIGURE_CPPFLAGS) $(CPPFLAGS)
94
PY_LDFLAGS=	$(CONFIGURE_LDFLAGS) $(LDFLAGS)
97
PY_LDFLAGS=	$(CONFIGURE_LDFLAGS) $(LDFLAGS)
95
NO_AS_NEEDED=	@NO_AS_NEEDED@
98
NO_AS_NEEDED=	@NO_AS_NEEDED@
96
LDLAST=		@LDLAST@
99
LDLAST=		@LDLAST@
Lines 102-108 Link Here
102
CFLAGSFORSHARED=@CFLAGSFORSHARED@
105
CFLAGSFORSHARED=@CFLAGSFORSHARED@
103
# C flags used for building the interpreter object files
106
# C flags used for building the interpreter object files
104
PY_CORE_CFLAGS=	$(PY_CFLAGS) $(PY_CFLAGS_NODIST) $(PY_CPPFLAGS) $(CFLAGSFORSHARED) -DPy_BUILD_CORE
107
PY_CORE_CFLAGS=	$(PY_CFLAGS) $(PY_CFLAGS_NODIST) $(PY_CPPFLAGS) $(CFLAGSFORSHARED) -DPy_BUILD_CORE
105
108
PY_CORE_BUILDCFLAGS=	$(PY_BUILDCFLAGS) $(PY_CFLAGS_NODIST) $(PY_BUILD_CPPFLAGS) $(CFLAGSFORSHARED) -DPy_BUILD_CORE
106
109
107
# Machine-dependent subdirectories
110
# Machine-dependent subdirectories
108
MACHDEP=	@MACHDEP@
111
MACHDEP=	@MACHDEP@
Lines 226-231 Link Here
226
BUILD_GNU_TYPE=	@build@
229
BUILD_GNU_TYPE=	@build@
227
HOST_GNU_TYPE=	@host@
230
HOST_GNU_TYPE=	@host@
228
231
232
BUILD_NATIVE_TOOLS=@BUILD_NATIVE_TOOLS@
233
ifdef BUILD_NATIVE_TOOLS
234
	PYTHON_INCLUDE_DIR_FOR_BUILD=@PYTHON_INCLUDE_DIR_FOR_BUILD@
235
	PYTHON_LIB_FOR_BUILD=@PYTHON_LIB_FOR_BUILD@
236
endif
237
229
# Tcl and Tk config info from --with-tcltk-includes and -libs options
238
# Tcl and Tk config info from --with-tcltk-includes and -libs options
230
TCLTK_INCLUDES=	@TCLTK_INCLUDES@
239
TCLTK_INCLUDES=	@TCLTK_INCLUDES@
231
TCLTK_LIBS=	@TCLTK_LIBS@
240
TCLTK_LIBS=	@TCLTK_LIBS@
Lines 329-336 Link Here
329
		$(srcdir)/Parser/tokenizer.h
338
		$(srcdir)/Parser/tokenizer.h
330
339
331
PGENSRCS=	$(PSRCS) $(PGSRCS)
340
PGENSRCS=	$(PSRCS) $(PGSRCS)
332
PGENOBJS=	$(POBJS) $(PGOBJS)
333
341
342
ifndef BUILD_NATIVE_TOOLS
343
	PGENOBJS=	$(POBJS) $(PGOBJS)
344
else
345
	PGENOBJS=	$(patsubst %,NativeBuild/%,$(POBJS)) $(patsubst %,NativeBuild/%,$(PGOBJS))
346
endif
334
##########################################################################
347
##########################################################################
335
# opcode.h generation
348
# opcode.h generation
336
OPCODE_H_DIR= 	$(srcdir)/Include
349
OPCODE_H_DIR= 	$(srcdir)/Include
Lines 707-715 Link Here
707
# Importlib
720
# Importlib
708
721
709
Programs/_freeze_importlib.o: Programs/_freeze_importlib.c Makefile
722
Programs/_freeze_importlib.o: Programs/_freeze_importlib.c Makefile
723
ifdef BUILD_NATIVE_TOOLS
724
	$(CC_FOR_BUILD) -c $(PY_CORE_BUILDCFLAGS) -o $@ $<
725
endif
710
726
711
Programs/_freeze_importlib: Programs/_freeze_importlib.o $(LIBRARY_OBJS_OMIT_FROZEN)
727
Programs/_freeze_importlib: Programs/_freeze_importlib.o $(LIBRARY_OBJS_OMIT_FROZEN)
728
ifndef BUILD_NATIVE_TOOLS
712
	$(LINKCC) $(PY_LDFLAGS) -o $@ Programs/_freeze_importlib.o $(LIBRARY_OBJS_OMIT_FROZEN) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
729
	$(LINKCC) $(PY_LDFLAGS) -o $@ Programs/_freeze_importlib.o $(LIBRARY_OBJS_OMIT_FROZEN) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
730
else
731
	$(CC_FOR_BUILD) -o $@ Programs/_freeze_importlib.o $(PYTHON_LIB_FOR_BUILD) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
732
endif
713
733
714
Python/importlib_external.h: $(srcdir)/Lib/importlib/_bootstrap_external.py Programs/_freeze_importlib
734
Python/importlib_external.h: $(srcdir)/Lib/importlib/_bootstrap_external.py Programs/_freeze_importlib
715
	./Programs/_freeze_importlib \
735
	./Programs/_freeze_importlib \
Lines 784-790 Link Here
784
		touch $(GRAMMAR_C)
804
		touch $(GRAMMAR_C)
785
805
786
$(PGEN): $(PGENOBJS)
806
$(PGEN): $(PGENOBJS)
807
ifndef BUILD_NATIVE_TOOLS
787
		$(CC) $(OPT) $(PY_LDFLAGS) $(PGENOBJS) $(LIBS) -o $(PGEN)
808
		$(CC) $(OPT) $(PY_LDFLAGS) $(PGENOBJS) $(LIBS) -o $(PGEN)
809
else
810
		$(CC_FOR_BUILD) $(OPT) $(PY_LDFLAGS) $(PGENOBJS) $(LIBS) -o $(PGEN)
811
endif
812
813
$(PGENOBJS): %.o: %.c
814
ifdef BUILD_NATIVE_TOOLS
815
	$(CC_FOR_BUILD) -c $(PY_CORE_BUILDCFLAGS) -o $@ $<
816
endif
788
817
789
Parser/grammar.o:	$(srcdir)/Parser/grammar.c \
818
Parser/grammar.o:	$(srcdir)/Parser/grammar.c \
790
				$(srcdir)/Include/token.h \
819
				$(srcdir)/Include/token.h \

Return to bug 581304