| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 5e61a16 commit 4e45c9c
9 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1650,6 +1650,9 @@ Linker flags | |||
| 1650 | 1650 | value to be able to build extension modules using the | |
| 1651 | 1651 | directories specified in the environment variables. | |
| 1652 | 1652 | ||
| 1653 | + Please consider using ``EXE_LDFLAGS`` if the supplied linker flags are | ||
| 1654 | + executable specific, e.g. GCC's ``-pie`` flag. | ||
| 1655 | + | ||
| 1653 | 1656 | .. envvar:: LIBS | |
| 1654 | 1657 | ||
| 1655 | 1658 | Linker flags to pass libraries to the linker when linking the Python | |
@@ -1685,6 +1688,30 @@ Linker flags | |||
| 1685 | 1688 | ||
| 1686 | 1689 | .. versionadded:: 3.8 | |
| 1687 | 1690 | ||
| 1691 | + .. envvar:: EXE_LDFLAGS | ||
| 1692 | + | ||
| 1693 | + Linker flags used for building executable targets such as the | ||
| 1694 | + interpreter. If supplied, :envvar:`PY_CORE_EXE_LDFLAGS` | ||
| 1695 | + will be used in replacement of :envvar:`PY_CORE_LDFLAGS`. | ||
| 1696 | + | ||
| 1697 | + .. versionadded:: 3.15 | ||
| 1698 | + | ||
| 1699 | + .. envvar:: CONFIGURE_EXE_LDFLAGS | ||
| 1700 | + | ||
| 1701 | + Value of :envvar:`EXE_LDFLAGS` variable passed to the ``./configure`` | ||
| 1702 | + script. | ||
| 1703 | + | ||
| 1704 | + .. versionadded:: 3.15 | ||
| 1705 | + | ||
| 1706 | + .. envvar:: PY_CORE_EXE_LDFLAGS | ||
| 1707 | + | ||
| 1708 | + Linker flags used for building the interpreter and | ||
| 1709 | + executable targets. | ||
| 1710 | + | ||
| 1711 | + Default: ``$(PY_CORE_LDFLAGS)`` | ||
| 1712 | + | ||
| 1713 | + .. versionadded:: 3.15 | ||
| 1714 | + | ||
| 1688 | 1715 | ||
| 1689 | 1716 | .. rubric:: Footnotes | |
| 1690 | 1717 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -17,7 +17,8 @@ | |||
| 17 | 17 | _UNIVERSAL_CONFIG_VARS = ('CFLAGS', 'LDFLAGS', 'CPPFLAGS', 'BASECFLAGS', | |
| 18 | 18 | 'BLDSHARED', 'LDSHARED', 'CC', 'CXX', | |
| 19 | 19 | 'PY_CFLAGS', 'PY_LDFLAGS', 'PY_CPPFLAGS', | |
| 20 | - 'PY_CORE_CFLAGS', 'PY_CORE_LDFLAGS') | ||
| 20 | + 'PY_CORE_CFLAGS', 'PY_CORE_LDFLAGS', | ||
| 21 | + 'PY_CORE_EXE_LDFLAGS') | ||
| 21 | 22 | ||
| 22 | 23 | # configuration variables that may contain compiler calls | |
| 23 | 24 | _COMPILER_CONFIG_VARS = ('BLDSHARED', 'LDSHARED', 'CC', 'CXX') | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -528,6 +528,7 @@ def collect_sysconfig(info_add): | |||
| 528 | 528 | 'PY_CFLAGS', | |
| 529 | 529 | 'PY_CFLAGS_NODIST', | |
| 530 | 530 | 'PY_CORE_LDFLAGS', | |
| 531 | + 'PY_CORE_EXE_LDFLAGS', | ||
| 531 | 532 | 'PY_LDFLAGS', | |
| 532 | 533 | 'PY_LDFLAGS_NODIST', | |
| 533 | 534 | 'PY_STDMODULE_CFLAGS', | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -25,7 +25,7 @@ def setUp(self): | |||
| 25 | 25 | 'CFLAGS', 'LDFLAGS', 'CPPFLAGS', | |
| 26 | 26 | 'BASECFLAGS', 'BLDSHARED', 'LDSHARED', 'CC', | |
| 27 | 27 | 'CXX', 'PY_CFLAGS', 'PY_LDFLAGS', 'PY_CPPFLAGS', | |
| 28 | - 'PY_CORE_CFLAGS', 'PY_CORE_LDFLAGS' | ||
| 28 | + 'PY_CORE_CFLAGS', 'PY_CORE_LDFLAGS', 'PY_CORE_EXE_LDFLAGS' | ||
| 29 | 29 | ) | |
| 30 | 30 | ||
| 31 | 31 | def add_expected_saved_initial_values(self, config_vars, expected_vars): | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -123,7 +123,11 @@ PY_STDMODULE_CFLAGS= $(PY_CFLAGS) $(PY_CFLAGS_NODIST) $(PY_CPPFLAGS) $(CFLAGSFOR | |||
| 123 | 123 | PY_BUILTIN_MODULE_CFLAGS= $(PY_STDMODULE_CFLAGS) -DPy_BUILD_CORE_BUILTIN | |
| 124 | 124 | PY_CORE_CFLAGS= $(PY_STDMODULE_CFLAGS) -DPy_BUILD_CORE | |
| 125 | 125 | # Linker flags used for building the interpreter object files | |
| 126 | + # In particular, EXE_LDFLAGS is an extra flag to provide fine grain distinction between | ||
| 127 | + # LDFLAGS used to build executables and shared targets. | ||
| 126 | 128 | PY_CORE_LDFLAGS=$(PY_LDFLAGS) $(PY_LDFLAGS_NODIST) | |
| 129 | + CONFIGURE_EXE_LDFLAGS=@EXE_LDFLAGS@ | ||
| 130 | + PY_CORE_EXE_LDFLAGS:= $(if $(CONFIGURE_EXE_LDFLAGS), $(CONFIGURE_EXE_LDFLAGS) $(PY_LDFLAGS_NODIST), $(PY_CORE_LDFLAGS)) | ||
| 127 | 131 | # Strict or non-strict aliasing flags used to compile dtoa.c, see above | |
| 128 | 132 | CFLAGS_ALIASING=@CFLAGS_ALIASING@ | |
| 129 | 133 | ||
@@ -986,7 +990,7 @@ clinic-tests: check-clean-src $(srcdir)/Lib/test/clinic.test.c | |||
| 986 | 990 | ||
| 987 | 991 | # Build the interpreter | |
| 988 | 992 | $(BUILDPYTHON): Programs/python.o $(LINK_PYTHON_DEPS) | |
| 989 | - $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(LINK_PYTHON_OBJS) $(LIBS) $(MODLIBS) $(SYSLIBS) | ||
| 993 | + $(LINKCC) $(PY_CORE_EXE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(LINK_PYTHON_OBJS) $(LIBS) $(MODLIBS) $(SYSLIBS) | ||
| 990 | 994 | ||
| 991 | 995 | platform: $(PYTHON_FOR_BUILD_DEPS) pybuilddir.txt | |
| 992 | 996 | $(RUNSHARED) $(PYTHON_FOR_BUILD) -c 'import sys ; from sysconfig import get_platform ; print("%s-%d.%d" % (get_platform(), *sys.version_info[:2]))' >platform | |
@@ -1676,7 +1680,7 @@ regen-re: $(BUILDPYTHON) | |||
| 1676 | 1680 | $(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/build/generate_re_casefix.py $(srcdir)/Lib/re/_casefix.py | |
| 1677 | 1681 | ||
| 1678 | 1682 | Programs/_testembed: Programs/_testembed.o $(LINK_PYTHON_DEPS) | |
| 1679 | - $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/_testembed.o $(LINK_PYTHON_OBJS) $(LIBS) $(MODLIBS) $(SYSLIBS) | ||
| 1683 | + $(LINKCC) $(PY_CORE_EXE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/_testembed.o $(LINK_PYTHON_OBJS) $(LIBS) $(MODLIBS) $(SYSLIBS) | ||
| 1680 | 1684 | ||
| 1681 | 1685 | ############################################################################ | |
| 1682 | 1686 | # "Bootstrap Python" used to run Programs/_freeze_module.py | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1916,6 +1916,7 @@ Guo Ci Teo | |||
| 1916 | 1916 | Mikhail Terekhov | |
| 1917 | 1917 | Victor Terrón | |
| 1918 | 1918 | Pablo Galindo | |
| 1919 | + Rue Ching Teh | ||
| 1919 | 1920 | Richard M. Tew | |
| 1920 | 1921 | Srinivas Reddy Thatiparthy | |
| 1921 | 1922 | Tobias Thelen | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1 @@ | |||
| 1 | + Introduce executable specific linker flags to ``./configure``. | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2422,6 +2422,7 @@ AS_CASE([$enable_wasm_dynamic_linking], | |||
| 2422 | 2422 | AC_SUBST([BASECFLAGS]) | |
| 2423 | 2423 | AC_SUBST([CFLAGS_NODIST]) | |
| 2424 | 2424 | AC_SUBST([LDFLAGS_NODIST]) | |
| 2425 | + AC_SUBST([EXE_LDFLAGS]) | ||
| 2425 | 2426 | AC_SUBST([LDFLAGS_NOLTO]) | |
| 2426 | 2427 | AC_SUBST([WASM_ASSETS_DIR]) | |
| 2427 | 2428 | AC_SUBST([WASM_STDLIB]) | |
| Back | FazBrowse Home | New Git URL |
0 commit comments