Commit Graph

70 Commits

Author SHA1 Message Date
Stéphane Wirtel 6bf85acf60 [2.7] Docs: fix some wrong words (GH-6987) (GH-10315) 2018-11-04 14:38:50 -05:00
Benjamin Peterson 8575503115
[2.7] Don't run AC_STRUCT_TIMEZONE twice. (GH-9309)
(cherry picked from commit a4414ef20b)
2018-09-14 09:53:09 -07:00
Benjamin Peterson 69e9691015
[2.7] closes bpo-34652: Always disable lchmod on Linux. (GH-9242)
(cherry picked from commit 40caa05fa4)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
2018-09-12 16:31:17 -07:00
Xiang Zhang 95f9e14e33
[2.7] bpo-30411: Use --git-dir instead of -C to make git work under version below 1.8.5. (GH-8744) (GH-8838)
(cherry picked from commit 4c8555773a)
2018-08-20 23:15:07 +08:00
Victor Stinner 319cfb5f30
bpo-30345: Add -g to LDFLAGS for LTO (GH-7709) (GH-7825)
Add -g to LDFLAGS when compiling with LTO to get debug symbols.
2018-06-22 09:11:33 +02:00
Ned Deily ee8e4b61d6
[2.7] Backport macOS universal build and installer fixes from 3.6. (GH-6469)
These include:

- bpo-32726: Provide an additional, more modern macOS installer variant that
  supports macOS 10.9+ systems in 64-bit mode only. Upgrade the supplied
  third-party libraries to OpenSSL 1.0.2n and SQLite 3.22.0. The 10.9+
  installer now supplies its own private copy of Tcl/Tk 8.6.8.

- bpo-24414: Default macOS deployment target is now set by ``configure`` to
  the build system's OS version (as is done by Python 3), not ``10.4``;
  override with, for example, ``./configure MACOSX_DEPLOYMENT_TARGET=10.4``.

- bpo-19019: All 2.7 macOS installer variants now supply their own version
  of ``OpenSSL 1.0.2``; the Apple-supplied SSL libraries and root
  certificates are not longer used.  The ``Installer Certificate`` command
  in ``/Applications/Python 2.7`` may be used to download and install a
  default set of root certificates from the third-party ``certifi`` package.

- bpo-11485: python.org macOS Pythons no longer supply a default SDK value
  (e.g. ``-isysroot /``) or specific compiler version default (e.g.
  ``gcc-4.2``) when building extension modules.  Use ``CC``, ``SDKROOT``,
  and ``DEVELOPER_DIR`` environment variables to override compilers or to
  use an SDK.  See Apple's ``xcrun`` man page for more info.

- prepare for pending Apple removal of 32-bit support in future macOS release
2018-04-14 10:37:28 -04:00
Miss Islington (bot) 6ccdad7b1f bpo-32635: Fix a segfault when importing the crypt module with libxcrypt. (GH-5284) (#5295)
glibc is deprecating libcrypt in favor of libxcrypt, however python assumes
that crypt.h will always be included. This change makes the header inclusion
explicit when libxcrypt is present on the system.
(cherry picked from commit e768c86ef4)
2018-01-24 10:51:39 +01:00
Miss Islington (bot) 87c66e46ce bpo-31919: Fix building the curses module on OpenIndiana. (GH-4211) (#4216)
(cherry picked from commit 894ebd065e)
2017-11-01 15:11:18 +02:00
Miss Islington (bot) 6ba0b583d6 bpo-25720: Fix the method for checking pad state of curses WINDOW (GH-4164) (#4213)
Modify the code to use ncurses is_pad() instead of checking WINDOW
_flags field.  If your platform does not provide the is_pad(), the
existing way that checks the field will be enabled.

Note: This change does not drop support for platforms where do not
have both WINDOW _flags field and is_pad().
(cherry picked from commit 8bc7d63560)
2017-11-01 14:36:48 +02:00
Serhiy Storchaka e0fc1af67a
[2.7] bpo-31891: Fix building the curses module on NetBSD. (GH-4165). (#4194)
(cherry picked from commit baac01e629)
2017-10-31 16:12:35 +02:00
Hanno Schlichting abea972d28 [2.7] bpo-29766: Fix configure/.ac to match LTO/enable-optimizations behavior. (#2705)
See also 1f29cefc87.  The configure.ac change was omitted from the earlier change...
2017-09-07 11:43:45 -07:00
Christian Heimes ffa7011cb9 [2.7] bpo-31343: Include sys/sysmacros.h (GH-3318) (#3345)
Include sys/sysmacros.h for major(), minor(), and makedev(). GNU C libray
plans to remove the functions from sys/types.h.

Signed-off-by: Christian Heimes <christian@python.org>.
(cherry picked from commit 75b961869a)
2017-09-05 17:08:45 +02:00
Victor Stinner 8a19eb24c9 bpo-23404: make touch becomes make regen-all (#1466)
Don't rebuild generated files based on file modification time
anymore, the action is now explicit. Replace "make touch"
with "make regen-all".

Changes:

* Remove "make touch", Tools/hg/hgtouch.py and .hgtouch
* Add a new "make regen-all" command to rebuild all generated files
* Add subcommands to only generate specific files:

  - regen-ast: Include/Python-ast.h and Python/Python-ast.c
  - regen-grammar: Include/graminit.h and Python/graminit.c
  - regen-opcode-targets: Python/opcode_targets.h

* Add PYTHON_FOR_REGEN variable
* pgen is now only built by by "make regen-grammar"
* Add $(srcdir)/ prefix to paths to source files to handle correctly
  compilation outside the source directory
2017-05-05 03:14:23 +02:00
Victor Stinner df5692549a bpo-30232: Support Git worktree in configure.ac (#1402)
Don't test if .git/HEAD file exists, but only if the .git file (or
directory) exists.
2017-05-03 00:05:45 +02:00
Victor Stinner 2c7085fd7b bpo-27593: Get SCM build info from git instead of hg (#1327)
Based on commit 5c4b0d063a by Ned
Deily, which is based on original patches by Brett Cannon and Steve
Dower.

Remove also the private _Py_svnversion() function and SVNVERSION
variable.

Note: Py_SubversionRevision() and Py_SubversionShortBranch() are
unchanged, they are part of the public API.
2017-05-02 16:55:50 +02:00
Victor Stinner 5f4056a3c9 Fix "make tags" command (#1337)
Backport enhancements from master, commits:

* 9c4bfa6669e220efdd379b9f8e7db32bb4e25e72: "make tags": remove -t
  option of ctags. The option was kept for backward compatibility,
  but it was completly removed recently. Patch written by Stéphane
  Wirtel.
* cf0ac6a71ae51249a05521f49c1a0fabbb948488: Fix "make tags": set
  locale to C to call sort
* 8a543c0bc7347d5b333f334d157bf4a7cd33c14a: `make tags` fixes (GH-717)
2017-04-28 03:41:40 +02:00
INADA Naoki 6a04ef7ced bpo-29643: Fix check for --enable-optimizations (GH-873)
The presence of the ``--enable-optimizations`` flag is indicated by the
value of ``$enableval``, but the configure script was checking ``$withval``,
resulting in the ``--enable-optimizations`` flag being effectively ignored.
(cherry picked from commit 8cea5929f5)
2017-03-29 01:50:48 +09:00
Benjamin Peterson 6b1c909c08 add a specific configure check for sys/random.h (closes #28932) 2016-12-19 23:54:25 -08:00
Martin Panter f75a2ebbac Issue #10656: Fix out-of-tree building on AIX
The ld_so_aix script and python.exp file are created in the build directory.
Patch by Tristan Carel and Michael Haubenwallner.
2016-11-20 09:31:41 +00:00
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D) b999915854 Rename the new --with-optimiations flag to --enable-optimizations. 2016-11-20 21:19:36 +00:00
Martin Panter 51bfaa7efe Issue #15819: Drop dead code; -IInclude already added unconditionally 2016-09-13 11:41:45 +00:00
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D) 9cbfa79111 issue28032: never imply --with-lto as part of --with-optimizations.
Too many build tool chains do not properly support it, including building
and linking an executable fine that simply segfaults when you try to run
it (such as debian jessie 8.5's gcc 4.9).  On others where it does appear
to build (ubuntu 16.04's gcc 5.4) there are still test_distutils and test_gdb
failures to deal with.

We're not going to spend time attempting to maintain a complicated white list
of what does and doesn't work in our configure.ac file.
2016-09-08 22:44:44 +00:00
Gregory P. Smith 794b2912ac Fixes issue# 27983: Cause lack of llvm-profdata tool when using clang -
required for PGO linking - to be a configure time error rather than
make time when --with-optimizations is enabled.  Also improve our
ability to find the llvm-profdata tool on MacOS and some Linuxes.
2016-09-08 00:07:40 -07:00
Gregory P. Smith 6d8fdfc84b Issue #26359: Add the --with-optimizations flag. 2016-09-07 23:28:23 -07:00
Benjamin Peterson d34677c130 do not leak addrinfo in configure test 2016-09-06 15:54:24 -07:00
Benjamin Peterson cc8929b8cd https link to the bug tracker (closes #27670) 2016-08-03 22:01:32 -07:00
Martin Panter bc82de084c Issue #27641: Comment out regeneration rules when cross compiling 2016-07-29 05:52:32 +00:00
Martin Panter 801110b303 Issue #27490: Do not build pgen when cross-compiling
The dependendency on the $(PGEN) variable must only be
set when not cross-compiling. When cross-compiling,
$(PGEN) will not be used, so no need to build it.

Patch by Thomas Perl.
2016-07-28 01:28:27 +00:00
Benjamin Peterson 42e1029564 assume egd unless OPENSSL_NO_EGD is defined—remove configure check (closes #24557) 2016-07-07 00:02:31 -07:00
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D) c543a0fc3b Issue #25702: A --with-lto configure option has been added that will
enable link time optimizations at build time during a make profile-opt.
Some compilers and toolchains are known to not produce stable code when
using LTO, be sure to test things thoroughly before relying on it.
It can provide a few % speed up over profile-opt alone.
2016-06-02 23:44:40 +00:00
Martin Panter b1d867f149 Issue #27076: Doc, comment and test function name spelling fixes
Most fixes to Doc/ and Lib/ directories by Ville Skyttä.
2016-05-26 05:28:50 +00:00
Martin Panter e9ee317062 Issue #22359: Avoid recursive $(MAKE); disable running cross-compiled pgen
Patches by Jonas Wagner and Xavier de Gaye.
2016-04-23 00:58:44 +00:00
Martin Panter a70c3239a7 Issue #23735: Add SIGWINCH handler for Readline 6.3+ support, by Eric Price 2016-04-03 02:54:58 +00:00
Martin Panter a45120db96 Issue #17603: Check for st_blocks field without requiring fileblocks.o 2016-03-18 02:36:41 +00:00
Zachary Ware 6ed42ea08b Issue #25827: Add support for ICC to configure 2015-12-21 11:43:03 -06:00
Brett Cannon 4ff151a72a Issue #24915: Make PGO builds support Clang and use the test suite for
profile data.

Thanks to Alecsandru Patrascu of Intel for the initial patch.
2015-09-18 15:09:42 -07:00
Stefan Krah 99e36b9a84 Issue #24543: Use AC_LINK instead of AC_COMPILE in order to prevent false
positives with the -flto option (gcc >= 4.9.0 and clang).
2015-07-03 15:30:54 +02:00
Benjamin Peterson 2c992a0788 backport computed gotos (#4753) 2015-05-28 12:45:31 -05:00
doko@ubuntu.com 9e7ece271f - Use PLATDIR for the platform directory everywhere (refactoring only) 2015-04-13 21:55:08 +02:00
Victor Stinner 7c90667f74 Issue #21356: Make ssl.RAND_egd() optional to support LibreSSL. The
availability of the function is checked during the compilation. Patch written
by Bernard Spil.
2015-01-06 13:53:37 +01:00
Benjamin Peterson 27c269a1fe use getentropy when available (backport of 75ede5bec8db) (closes #23115) 2014-12-26 11:09:00 -06:00
Benjamin Peterson 64e8f6ec1c use autoconf macro to check for pkg-config (closes #15506) 2014-12-15 00:00:23 -05:00
Ned Deily 3f1d0b3121 Issue 22878: PEP 477 - "make install" and "make altinstall" integration
The backport of ensurepip to 2.7.9 allows pip to optionally be installed
or upgraded using the bundled pip provided by the new ensurepip module.
The option can be specified persistently using the configure option:

    ./configure --with-ensurepip[=upgrade|install|no]

It can also be overridden on either the "install" or "altinstall" targets:

    make [alt]install ENSUREPIP=[upgrade|install|no]

For Python 2, the default option is "no" (do not install pip).
2014-11-20 02:11:03 -08:00
Ned Deily 983df8688d Issue #21166: Prevent possible segfaults and other random failures of
python --generate-posix-vars in pybuilddir.txt build target by ensuring
that pybuilddir.txt is always regenerated when configure is run and
that the newly built skeleton python does not inadvertently import
modules from previously installed instances.
2014-08-22 13:30:59 -07:00
Ned Deily c40b9039da Issue #21811: Anticipated fixes to 2.7 configure for OS X 10.10 Yosemite. 2014-06-25 13:48:46 -07:00
doko@ubuntu.com 9ba90c9f06 - Issue #17752: Fix distutils tests when run from the installed location. 2014-05-07 04:41:26 +02:00
doko@ubuntu.com f27ec3e551 - Issue #21285: Refactor and fix curses configure check to always search
in a ncursesw directory.
2014-04-17 20:11:19 +02:00
Benjamin Peterson d16e01cf75 mmap obmalloc arenas so that they may be immediately returned to the system when unused (closes #20494) 2014-02-04 10:20:26 -05:00
Ned Deily a2a9f571a5 Issue #1584: Provide options to override default search paths for Tcl and Tk
when building _tkinter.  configure has two new options; if used, both must
be specified:

  ./configure \
      --with-tcltk-includes="-I/opt/local/include" \
      --with-tcltk-libs="-L/opt/local/lib -ltcl8.5 -ltk8.5"

In addition, the options can be overridden with make:

   make \
       TCLTK_INCLUDES="-I/opt/local/include" \
       TCLTK_LIBS="-L/opt/local/lib -ltcl8.6 -ltk8.6"
2013-10-25 00:30:10 -07:00
Christian Heimes 0d604cf65e Issue #18747: Re-seed OpenSSL's pseudo-random number generator after fork.
A pthread_atfork() child handler is used to seeded the PRNG with pid, time
and some stack data.
2013-08-21 13:26:05 +02:00