From cf23d7ce6e94358a3ebf3adee2b332f5f6df85ed Mon Sep 17 00:00:00 2001 From: midipix Date: Sun, 23 Dec 2018 04:50:45 -0500 Subject: project: config, cfghost.sh: simply & unify cfghost profiles (cf. ea008a7). --- config/linux/config.c | 18 ++++++++++++++++++ config/linux/config.mk | 28 ++++++++++++++++++++++++++++ config/linux/pyconfig.h | 12 ++++++++++++ 3 files changed, 58 insertions(+) create mode 100644 config/linux/config.c create mode 100644 config/linux/config.mk create mode 100644 config/linux/pyconfig.h (limited to 'config/linux') diff --git a/config/linux/config.c b/config/linux/config.c new file mode 100644 index 0000000..bdb9243 --- /dev/null +++ b/config/linux/config.c @@ -0,0 +1,18 @@ +#include "linkage/inittab.h" + +struct _inittab _PyImport_Inittab[] = { + + PY_IMPORT_INITTAB_BASE, + PY_IMPORT_INITTAB_COMMON, + +#ifdef PY_ALL_STATIC + PY_IMPORT_INITTAB_ANYOS_CORE, + PY_IMPORT_INITTAB_ANYOS_AUDIO, +#endif + +#ifdef PY_FOR_PYCOMPILE + PY_IMPORT_INITTAB_PYCOMPILE_CORE, +#endif + + {0, 0} +}; diff --git a/config/linux/config.mk b/config/linux/config.mk new file mode 100644 index 0000000..41d2d06 --- /dev/null +++ b/config/linux/config.mk @@ -0,0 +1,28 @@ +# platform +PYTHON_PATH = +PYTHON_PLATFORM = linux2 + + +# extensions: built-in +CONFIG_SRCS = $(CONFIG_DEFAULT_SRCS) + + +# extensions: dynamic loading +DYNLOAD_SRCS = \ + core/Python/dynload_shlib.c \ + + +# extensions: desired subsets +include $(PROJECT_DIR)/profiles/pyexts/subsets.mk + +PYEXT_SHARED = \ + $(PYEXT_SUBSET_SHARED_ANYOS_CORE) \ + $(PYEXT_SUBSET_SHARED_ANYOS_AUDIO) \ + +PYEXT_STATIC = \ + $(PYEXT_SUBSET_STATIC_ANYOS_CORE) \ + $(PYEXT_SUBSET_STATIC_ANYOS_AUDIO) \ + + +# strict shared object generation +LDFLAGS_STRICT += -Wl,-no-undefined diff --git a/config/linux/pyconfig.h b/config/linux/pyconfig.h new file mode 100644 index 0000000..90430d2 --- /dev/null +++ b/config/linux/pyconfig.h @@ -0,0 +1,12 @@ +#ifndef PY_PYCONFIG_H +#define PY_PYCONFIG_H + +#include "osapi/modern.h" +#include "osapi/rtld.h" +#include "osapi/linux.h" +#include "osapi/overrides.h" + +/* cf. Modules/posixmodule.c */ +#define HAVE_BROKEN_NICE 1 + +#endif -- cgit v1.2.3