diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest deleted file mode 100644 index a5a67acc..00000000 --- a/dev-lang/python/Manifest +++ /dev/null @@ -1,18 +0,0 @@ -DIST Python-2.7.18.tar.xz 12854736 BLAKE2B 060a621c91dd8e3d321aec99d44c17aa67381998256a1a002d316b38288349884d5960de35c49352d03129ed0bae599e641ec2225898158ebce50a7a2fd74d2c SHA512 a7bb62b51f48ff0b6df0b18f5b0312a523e3110f49c3237936bfe56ed0e26838c0274ff5401bda6fc21bf24337477ccac49e8026c5d651e4b4cafb5eb5086f6c -DIST Python-2.7.18.tar.xz.asc 833 BLAKE2B 1d98770e46171971fb99994508d238c01d2755281d2f94353314014d9e83e0ec5f0b3e3950ea1fdf5fce9ba6b8f55312355845c2a3fc4291c27ee56fe6215448 SHA512 c2a5f5a52f47dec52460ad3275758d4e5de6e7075c3def4353c988d74d563a39b42cae2d5eb24e2a23a6247cef69100f91620b11a49c2359fbf99b203c9cbda8 -DIST Python-3.10.0b3.tar.xz 18640292 BLAKE2B 29af2d0e042714d6cfed08f6ecc5846dded1bec9a3efce01cca740e7dbfb036c06389ba638cd984410613067021bdd4291cb8f1fda353ed21444ee4dc4404a89 SHA512 ef0dc5eddb5f9702ab88faa2827455347caa81ab6c03192d6e37c968a40c53ab485d5c923905c511d19bc35e10129aa302f6733e0a7d296da8f725367dd1b258 -DIST Python-3.10.0b3.tar.xz.asc 833 BLAKE2B 8978db8f2443e4a9d8f8997b64a731f7d8d5cdc9028dfc8812c3363298777aa227d9dd896a518e08f2793fbcc93a71bac4b422277b3ecd2ee4210b03e665385f SHA512 6b8d2caf753f0d92019e18d1441e323a44aff06ee8bdc272572a67359dc4bece833db56b9318c91962d39ee4d09bf701b548d71ae02c4b64f3c21f1c23ed1d36 -DIST Python-3.6.14.tar.xz 17218148 BLAKE2B efe655cb907ffa678ca135f88ba9d867e523969ad82dbc09ffb6d8d383824a4b43c525e156a3c35484a526b4b3ea755109e5ef15d17852d44e3351c307fc5e91 SHA512 15b82b7285db97cb27a6fcd57ce9e258fdf8dbdb2f00e22e4331161b8557c8244342546c4143e84c72730759e0276770396b6ca5bb7cf87310cca8e175423006 -DIST Python-3.6.14.tar.xz.asc 833 BLAKE2B 81c79dca5728b21b8c2badcaa1242836f1cf13984bb755463cfe9e4fd96a02ebf31f1a9239759a937c6d6a04c18bfc682a82cb0ab2e5a473de153423a7248c9c SHA512 600bf504f2c0d3ce7d1e8e953b4f27a7a7c996b7b9cd70efb876178fa5424130bff5414d5ac7deb8b45103ed417fd40d830613db39750d35a0c967c8fdfea50d -DIST Python-3.7.11.tar.xz 17393380 BLAKE2B 6394d69935950366da7c4cecd4816d76254170d5313adeb4de9edddae13bda7dea373308517c2abe00cb7eeea8eb428619124feed8df858f9bb904bd423e96d6 SHA512 b8d8c6958444ee9bdd59f0804f7e61d9657c0805c7c58c3352d1c1efb33ba2be8d3485cd2656a2b2b99618a439879687a918f57dfdd125e989af637043600a59 -DIST Python-3.7.11.tar.xz.asc 833 BLAKE2B 8af6b3e58b607a34c91f57af2fbe9c3f3c7cb6fa5e435e963edd7edcf7649e70c3a76bd346ff8ef1b3c890d8a92d3b2fed27ee01b512c579ff8ce80be61274fb SHA512 f19db95e88c9269174a2b4ac4d8c68fa7ed666b6698af26d2da202e30d145686e8679be763eecba9f8a0c34a207639724094463cffce659c3855ed4b133b0a59 -DIST Python-3.8.11.tar.xz 18437648 BLAKE2B 957c553ced3387d19c1d1baf2eea7d41e9abfbf398c4514f475eadae29336dc02dbd2cdf7b90ab5fee1e49c083a366c113dcd73149445b663fcdf81a3b2b04f6 SHA512 c8c17491b05d83a9f8940474019034780a6b1ff4148654cd62c8f708c539718a0312cf0665efa2b8c42ed773f4306080bd105701a211ed56e6cab40837d5b2df -DIST Python-3.8.11.tar.xz.asc 833 BLAKE2B 52239149331a6529351714db10b5f6b2a37e9a9ce13470e0ab8ae4bf439544878df095995bdc28a534d55039a539c400f532aec8fb7d9b9ce7132167f0e39529 SHA512 40381e83a1bef996333d5044a361ce441c4631725457f8382588e9a86f586a9539ee139b8398aff3d988a317041fa87476f29cf6fcd2b31fe0e9b4cd21ede68a -DIST Python-3.9.6.tar.xz 19051972 BLAKE2B 0d8586b2935088eeab7138cf2210c1a74f1bf7359359d25750af5f69de55eb39c92f518b887a8b749c772ed7d33e85b912928ae6d878514eb58d85ef210f54f0 SHA512 01c529e3207738d8771caeb5ed6217e10745c21aa39832fe3185e1c87fdb6aedead97ce38dbb11e02d873654028bd8071c3f345c18452769520723284efe9dc1 -DIST Python-3.9.6.tar.xz.asc 833 BLAKE2B 41901bfb80a901f2f14e86769e6d08ded8f75656d347201345183162e180e61442da871a1067572a54da579551166a19bf5436e51581bb10cb78afc4d28773fc SHA512 0673c8833f302c829bfde97453c52744f6aa99b4a72520f4cc384d4aa9d6ffd28a1407ceafb0a1ec4462b3aa74b656bf39c67872c4e6a131429ea58c47ad0ecc -DIST python-gentoo-patches-2.7.18_p11.tar.xz 31340 BLAKE2B bdc097b971ab8ec0b60f944002af34f3fff6b681c43515a4fec2fcac1a2c731bf4fcfae2178463103911e2f8cd6bc84d3b56cd0ad61da5c8276278ec9b85a242 SHA512 2a2388c4543267bfb0167f963a22f5141442c9347d9a8806ad6917843e6958d47c8f1933244651c870101b21408c920408fe056efb7a148117c24ab391151d88 -DIST python-gentoo-patches-3.10.0b3.tar.xz 8112 BLAKE2B c6a0517323c5c0d8af998915ccb675a51df19893b9252f9ad195b62f8988fa65ca73894fc8089c37a44f22976f57c49c24c0bf9469b1edb6c3422c4a7be832d8 SHA512 fbc770430259ff482c0a4b89859e2a747fde0f34037829f9cc5a2972345d0b073612db7ef84f382248902e0f9e203f8d8dc07165942356b01f48b23dd4412f64 -DIST python-gentoo-patches-3.6.14.tar.xz 14744 BLAKE2B b9482f9d2b7ada60eff9a5672ed21556c00b473a7cfdb543dce8253fb0ff1539e635a35569478c496012ecde4eef78a257da28f7a80bff99da10249708262229 SHA512 246f83911c8e52ea83a9bf453faa0bc0ea0c29bbf3b666a938e3790c6147f71e617ff9cb27501c5f0b89172eb9e7819e3f2ef0a5bae271cc938d2c0c2b93f7ae -DIST python-gentoo-patches-3.7.11.tar.xz 16708 BLAKE2B 4f74b38f400c20b4112f080447021e7140704b282d6369a1479886740d12a17e7818b52a382a4b115238847bb08df0260b092b6ead491623b869c3d3a56f4cc2 SHA512 b96d7af8c9f7fb4b246a8b66e6440336a7d123678d990dd259d7ffb87d79ce74295ff350e220fee38d1b12f1ca94533899c2d2ce700391b3eac907722a79bba6 -DIST python-gentoo-patches-3.8.11.tar.xz 16932 BLAKE2B aaa1df33997f4077916fb7cca2ec3a2b2ac1c0ead3db7c638a5152a82cfaaf5fc2768a10ac7235c417e25b2b735c53628ec096878f08eef0d211b03f4747103c SHA512 d2639b95c5a32f7145f92e52a94aec7c63f3ed4a66036ff73f052ff6836742d1e1dd7180f8634b65b4a44a10bf336092695bcc2230a7fd8be35bae870ed64b08 -DIST python-gentoo-patches-3.9.6.tar.xz 12432 BLAKE2B f63f39b4667eeb214312aa22142c728a1123e88f49c6de09d15e88434e9d630c5e0e588112d77c5cf1f5f25d0224e4fbf0c370488a908e9015f168d9f85e9eb5 SHA512 3e842fcd8574a7f026e401d725febb2815b2b7ac0a89b952a340c7974b911e81286b542d3de56fe5750296f2ab680415b54b8c35f219975af10354cddb1f257a diff --git a/dev-lang/python/files/clearlinux-pkgs/python-3.7.5-0001-test_socket.py-remove-testPeek-test.test_socket.RDST.patch b/dev-lang/python/files/clearlinux-pkgs/python-3.7.5-0001-test_socket.py-remove-testPeek-test.test_socket.RDST.patch deleted file mode 100644 index 6a038ae5..00000000 --- a/dev-lang/python/files/clearlinux-pkgs/python-3.7.5-0001-test_socket.py-remove-testPeek-test.test_socket.RDST.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 4ccbba674472dcca104fe660c0cd3dd23b6dd66d Mon Sep 17 00:00:00 2001 -From: Juro Bystricky -Date: Thu, 3 Oct 2019 10:46:00 -0700 -Subject: [PATCH] test_socket.py: remove testPeek (test.test_socket.RDSTest) - -This test suffers from a race condition and hangs frequently. -https://bugs.python.org/issue35247 - -Signed-off-by: Juro Bystricky ---- - Lib/test/test_socket.py | 10 ---------- - 1 file changed, 10 deletions(-) - -diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py -index 43929b355e..bcf8be854b 100644 ---- a/Lib/test/test_socket.py -+++ b/Lib/test/test_socket.py -@@ -2011,16 +2011,6 @@ class RDSTest(ThreadedRDSSocketTest): - self.data = b'spam' - self.cli.sendto(self.data, 0, (HOST, self.port)) - -- def testPeek(self): -- data, addr = self.serv.recvfrom(self.bufsize, socket.MSG_PEEK) -- self.assertEqual(self.data, data) -- data, addr = self.serv.recvfrom(self.bufsize) -- self.assertEqual(self.data, data) -- -- def _testPeek(self): -- self.data = b'spam' -- self.cli.sendto(self.data, 0, (HOST, self.port)) -- - @requireAttrs(socket.socket, 'recvmsg') - def testSendAndRecvMsg(self): - data, ancdata, msg_flags, addr = self.serv.recvmsg(self.bufsize) --- -2.23.0 - diff --git a/dev-lang/python/files/clearlinux-pkgs/python-3.7.5-fix-regrtest-hang.patch b/dev-lang/python/files/clearlinux-pkgs/python-3.7.5-fix-regrtest-hang.patch deleted file mode 100644 index 0344a245..00000000 --- a/dev-lang/python/files/clearlinux-pkgs/python-3.7.5-fix-regrtest-hang.patch +++ /dev/null @@ -1,174 +0,0 @@ -Patch pulled from the `3.7` branch, which will be incorporated into a -future 3.7.6 release: -https://github.com/python/cpython/commit/598bfa4d45 - -An equivalent change already landed for 3.8.0, so drop it when moving to -the 3.8 series. -https://github.com/python/cpython/commit/359a1975cb - - -From 598bfa4d457d61431142ad99ecbb9bd10cf314e6 Mon Sep 17 00:00:00 2001 -From: "Miss Islington (bot)" - <31488909+miss-islington@users.noreply.github.com> -Date: Wed, 9 Oct 2019 06:52:34 -0700 -Subject: [PATCH] bpo-37531: regrtest ignores output on timeout (GH-16659) - -bpo-37531, bpo-38207: On timeout, regrtest no longer attempts to call -`popen.communicate() again: it can hang until all child processes -using stdout and stderr pipes completes. Kill the worker process and -ignores its output. - -Reenable test_regrtest.test_multiprocessing_timeout(). - -bpo-37531: Change also the faulthandler timeout of the main process -from 1 minute to 5 minutes, for Python slowest buildbots. -(cherry picked from commit 0ec618af98ac250a91ee9c91f8569e6df6772758) - -Co-authored-by: Victor Stinner ---- - Lib/test/libregrtest/runtest_mp.py | 64 +++++++++++-------- - .../2019-10-08-16-42-05.bpo-37531.7v-_Ca.rst | 5 ++ - 2 files changed, 42 insertions(+), 27 deletions(-) - create mode 100644 Misc/NEWS.d/next/Tests/2019-10-08-16-42-05.bpo-37531.7v-_Ca.rst - -diff --git a/Lib/test/libregrtest/runtest_mp.py b/Lib/test/libregrtest/runtest_mp.py -index 9d5a699852b9c..2770cf93bd7d8 100644 ---- a/Lib/test/libregrtest/runtest_mp.py -+++ b/Lib/test/libregrtest/runtest_mp.py -@@ -22,6 +22,12 @@ - PROGRESS_UPDATE = 30.0 # seconds - assert PROGRESS_UPDATE >= PROGRESS_MIN_TIME - -+# Kill the main process after 5 minutes. It is supposed to write an update -+# every PROGRESS_UPDATE seconds. Tolerate 5 minutes for Python slowest -+# buildbot workers. -+MAIN_PROCESS_TIMEOUT = 5 * 60.0 -+assert MAIN_PROCESS_TIMEOUT >= PROGRESS_UPDATE -+ - # Time to wait until a worker completes: should be immediate - JOIN_TIMEOUT = 30.0 # seconds - -@@ -159,20 +165,6 @@ def mp_result_error(self, test_name, error_type, stdout='', stderr='', - result = TestResult(test_name, error_type, test_time, None) - return MultiprocessResult(result, stdout, stderr, err_msg) - -- def _timedout(self, test_name): -- self._kill() -- -- stdout = stderr = '' -- popen = self._popen -- try: -- stdout, stderr = popen.communicate(timeout=JOIN_TIMEOUT) -- except (subprocess.TimeoutExpired, OSError) as exc: -- print_warning(f"Failed to read {self} output " -- f"(timeout={format_duration(JOIN_TIMEOUT)}): " -- f"{exc!r}") -- -- return self.mp_result_error(test_name, TIMEOUT, stdout, stderr) -- - def _run_process(self, test_name): - self.start_time = time.monotonic() - -@@ -195,23 +187,32 @@ def _run_process(self, test_name): - - try: - stdout, stderr = popen.communicate(timeout=self.timeout) -+ retcode = popen.returncode -+ assert retcode is not None - except subprocess.TimeoutExpired: - if self._stopped: - # kill() has been called: communicate() fails - # on reading closed stdout/stderr - raise ExitThread - -- return self._timedout(test_name) -+ # On timeout, kill the process -+ self._kill() -+ -+ # None means TIMEOUT for the caller -+ retcode = None -+ # bpo-38207: Don't attempt to call communicate() again: on it -+ # can hang until all child processes using stdout and stderr -+ # pipes completes. -+ stdout = stderr = '' - except OSError: - if self._stopped: - # kill() has been called: communicate() fails - # on reading closed stdout/stderr - raise ExitThread - raise -- -- retcode = popen.returncode -- stdout = stdout.strip() -- stderr = stderr.rstrip() -+ else: -+ stdout = stdout.strip() -+ stderr = stderr.rstrip() - - return (retcode, stdout, stderr) - except: -@@ -223,13 +224,10 @@ def _run_process(self, test_name): - self.current_test_name = None - - def _runtest(self, test_name): -- result = self._run_process(test_name) -- -- if isinstance(result, MultiprocessResult): -- # _timedout() case -- return result -+ retcode, stdout, stderr = self._run_process(test_name) - -- retcode, stdout, stderr = result -+ if retcode is None: -+ return self.mp_result_error(test_name, TIMEOUT, stdout, stderr) - - err_msg = None - if retcode != 0: -@@ -248,7 +246,8 @@ def _runtest(self, test_name): - err_msg = "Failed to parse worker JSON: %s" % exc - - if err_msg is not None: -- return self.mp_result_error(test_name, CHILD_ERROR, stdout, stderr, err_msg) -+ return self.mp_result_error(test_name, CHILD_ERROR, -+ stdout, stderr, err_msg) - - return MultiprocessResult(result, stdout, stderr, err_msg) - -@@ -287,6 +286,16 @@ def _wait_completed(self): - f"{exc!r}") - - def wait_stopped(self, start_time): -+ # bpo-38207: MultiprocessTestRunner.stop_workers() called self.stop() -+ # which killed the process. Sometimes, killing the process from the -+ # main thread does not interrupt popen.communicate() in -+ # TestWorkerProcess thread. This loop with a timeout is a workaround -+ # for that. -+ # -+ # Moreover, if this method fails to join the thread, it is likely -+ # that Python will hang at exit while calling threading._shutdown() -+ # which tries again to join the blocked thread. Regrtest.main() -+ # uses EXIT_TIMEOUT to workaround this second bug. - while True: - # Write a message every second - self.join(1.0) -@@ -353,7 +362,8 @@ def _get_result(self): - timeout = PROGRESS_UPDATE - while True: - if use_faulthandler: -- faulthandler.dump_traceback_later(timeout * 2.0, exit=True) -+ faulthandler.dump_traceback_later(MAIN_PROCESS_TIMEOUT, -+ exit=True) - - # wait for a thread - try: -diff --git a/Misc/NEWS.d/next/Tests/2019-10-08-16-42-05.bpo-37531.7v-_Ca.rst b/Misc/NEWS.d/next/Tests/2019-10-08-16-42-05.bpo-37531.7v-_Ca.rst -new file mode 100644 -index 0000000000000..78ab636516514 ---- /dev/null -+++ b/Misc/NEWS.d/next/Tests/2019-10-08-16-42-05.bpo-37531.7v-_Ca.rst -@@ -0,0 +1,5 @@ -+On timeout, regrtest no longer attempts to call ``popen.communicate()`` -+again: it can hang until all child processes using stdout and stderr pipes -+completes. Kill the worker process and ignores its output. Change also the -+faulthandler timeout of the main process from 1 minute to 5 minutes, for Python -+slowest buildbots. diff --git a/dev-lang/python/files/pydoc.conf b/dev-lang/python/files/pydoc.conf deleted file mode 100644 index 3c6920cc..00000000 --- a/dev-lang/python/files/pydoc.conf +++ /dev/null @@ -1,6 +0,0 @@ -# /etc/init.d/pydoc.conf - -# This file contains the configuration for pydoc's internal webserver. - -# Default port for Python's pydoc server. -@PYDOC_PORT_VARIABLE@="7464" diff --git a/dev-lang/python/files/pydoc.init b/dev-lang/python/files/pydoc.init deleted file mode 100644 index f8e05636..00000000 --- a/dev-lang/python/files/pydoc.init +++ /dev/null @@ -1,24 +0,0 @@ -#!/sbin/openrc-run -# Copyright 1999-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public Licence v2 - -start() { - local pydoc_port="${@PYDOC_PORT_VARIABLE@-${PYDOC_PORT}}" - - if [ -z "${pydoc_port}" ]; then - eerror "Port not set" - return 1 - fi - - ebegin "Starting pydoc server on port ${pydoc_port}" - start-stop-daemon --start --background --make-pidfile \ - --pidfile /var/run/@PYDOC@.pid \ - --exec /usr/bin/@PYDOC@ -- -p "${pydoc_port}" - eend $? -} - -stop() { - ebegin "Stopping pydoc server" - start-stop-daemon --stop --quiet --pidfile /var/run/@PYDOC@.pid - eend $? -} diff --git a/dev-lang/python/files/python-2.7.15-PGO-r1.patch b/dev-lang/python/files/python-2.7.15-PGO-r1.patch deleted file mode 100644 index f2e476e1..00000000 --- a/dev-lang/python/files/python-2.7.15-PGO-r1.patch +++ /dev/null @@ -1,78 +0,0 @@ -diff -ur Python-2.7.16.orig/Lib/distutils/ccompiler.py Python-2.7.16/Lib/distutils/ccompiler.py ---- Python-2.7.16.orig/Lib/distutils/ccompiler.py 2019-03-02 19:17:42.000000000 +0100 -+++ Python-2.7.16/Lib/distutils/ccompiler.py 2019-03-09 16:30:09.036803900 +0100 -@@ -14,7 +14,7 @@ - from distutils.spawn import spawn - from distutils.file_util import move_file - from distutils.dir_util import mkpath --from distutils.dep_util import newer_group -+from distutils.dep_util import newer_group, newer - from distutils.util import split_quoted, execute - from distutils import log - # following import is for backward compatibility -@@ -571,7 +571,9 @@ - src, ext = build[obj] - except KeyError: - continue -- self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) -+ if newer(src, obj): -+ # some extensions share source files so we need to avoid compiling the same source multiple times -+ self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) - - # Return *all* object filenames, not just the ones we just built. - return objects -diff -ur Python-2.7.16.orig/Lib/distutils/dep_util.py Python-2.7.16/Lib/distutils/dep_util.py ---- Python-2.7.16.orig/Lib/distutils/dep_util.py 2019-03-02 19:17:42.000000000 +0100 -+++ Python-2.7.16/Lib/distutils/dep_util.py 2019-03-09 16:30:09.036803900 +0100 -@@ -11,7 +11,7 @@ - from distutils.errors import DistutilsFileError - - def newer(source, target): -- """Tells if the target is newer than the source. -+ """Tells if the source is newer than the target. - - Return true if 'source' exists and is more recently modified than - 'target', or if 'source' exists and 'target' doesn't. -diff -ur Python-2.7.16.orig/Makefile.pre.in Python-2.7.16/Makefile.pre.in ---- Python-2.7.16.orig/Makefile.pre.in 2019-03-09 16:29:29.004188933 +0100 -+++ Python-2.7.16/Makefile.pre.in 2019-03-09 16:33:30.788823762 +0100 -@@ -209,9 +209,9 @@ - TCLTK_LIBS= @TCLTK_LIBS@ - - # The task to run while instrument when building the profile-opt target --# We exclude unittests with -x that take a rediculious amount of time to --# run in the instrumented training build or do not provide much value. --PROFILE_TASK=-m test.regrtest --pgo -x test_asyncore test_gdb test_multiprocessing test_subprocess -+# We exclude unittests with -x that take a ridiculous amount of time to -+# run in the instrumented training build or do not provide much value -+PROFILE_TASK=-m test.regrtest --pgo $(EXTRATESTOPTS) -x test_asyncore test_gdb test_multiprocessing test_subprocess test_xpickle - - # report files for gcov / lcov coverage report - COVERAGE_INFO= $(abs_builddir)/coverage.info -@@ -437,7 +437,7 @@ - - run_profile_task: - : # FIXME: can't run for a cross build -- $(LLVM_PROF_FILE) $(RUNSHARED) ./$(BUILDPYTHON) $(PROFILE_TASK) || true -+ $(LLVM_PROF_FILE) _PYTHONNOSITEPACKAGES=1 $(RUNSHARED) ./$(BUILDPYTHON) -E $(PROFILE_TASK) || true # allow failures here - - build_all_merge_profile: - $(LLVM_PROF_MERGER) -diff -ur Python-2.7.16.orig/setup.py Python-2.7.16/setup.py ---- Python-2.7.16.orig/setup.py 2019-03-09 16:29:29.028188103 +0100 -+++ Python-2.7.16/setup.py 2019-03-09 16:30:09.037803866 +0100 -@@ -269,11 +269,13 @@ - # those environment variables passed into the setup.py phase. Here's - # a small set of useful ones. - compiler = os.environ.get('CC') -+ # it's important to get CFLAGS from the environment for proper extension PGO support -+ cflags = os.environ.get('CFLAGS', sysconfig.get_config_vars('CFLAGS')[0]) - args = {} - # unfortunately, distutils doesn't let us provide separate C and C++ - # compilers - if compiler is not None: -- (ccshared,cflags) = sysconfig.get_config_vars('CCSHARED','CFLAGS') -+ (ccshared,) = sysconfig.get_config_vars('CCSHARED') - args['compiler_so'] = compiler + ' ' + ccshared + ' ' + cflags - self.compiler.set_executables(**args) - diff --git a/dev-lang/python/metadata.xml b/dev-lang/python/metadata.xml deleted file mode 100644 index 5625dcaf..00000000 --- a/dev-lang/python/metadata.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - python@gentoo.org - Python - - - Build with link-time optimizations (LTO) - Build with profile guided optimizations (PGO) - Enable threading support. (DON'T DISABLE THIS UNLESS YOU KNOW WHAT YOU'RE DOING) - Enable wide Unicode implementation which uses 4-byte Unicode characters. Switching of this USE flag changes ABI of Python and requires reinstallation of many Python modules. (DON'T DISABLE THIS UNLESS YOU KNOW WHAT YOU'RE DOING) - Install Windows executables required to create an executable installer for MS Windows. - - diff --git a/dev-lang/python/profile.patch b/dev-lang/python/profile.patch deleted file mode 100644 index e379e165..00000000 --- a/dev-lang/python/profile.patch +++ /dev/null @@ -1,39 +0,0 @@ -diff --git a/dev-lang/python/python-2.7.14.ebuild b/dev-lang/python/python-2.7.14.ebuild -index f44a2137ff3..a1270aeb55b 100644 ---- a/dev-lang/python/python-2.7.14.ebuild -+++ b/dev-lang/python/python-2.7.14.ebuild -@@ -213,7 +213,7 @@ src_compile() { - touch Include/graminit.h Python/graminit.c - - cd "${BUILD_DIR}" || die -- emake -+ emake profile-opt PROFILE_TASK="-m test.regrtest -w -uall,-audio -x test_gdb test_multiprocessing" - - # Work around bug 329499. See also bug 413751 and 457194. - if has_version dev-libs/libffi[pax_kernel]; then -diff --git a/dev-lang/python/python-3.5.4.ebuild b/dev-lang/python/python-3.5.4.ebuild -index f4ff5b8cc75..a3dca3b6e86 100644 ---- a/dev-lang/python/python-3.5.4.ebuild -+++ b/dev-lang/python/python-3.5.4.ebuild -@@ -175,7 +175,7 @@ src_compile() { - - cd "${BUILD_DIR}" || die - -- emake CPPFLAGS= CFLAGS= LDFLAGS= -+ emake profile-opt PROFILE_TASK="-m test.regrtest -w -uall,-audio -x test_gdb test_multiprocessing test_subprocess test_tokenize test_signal test_faulthandler" - - # Work around bug 329499. See also bug 413751 and 457194. - if has_version dev-libs/libffi[pax_kernel]; then -diff --git a/dev-lang/python/python-3.6.3.ebuild b/dev-lang/python/python-3.6.3.ebuild -index 4cf258819ee..4ae90dcf92c 100644 ---- a/dev-lang/python/python-3.6.3.ebuild -+++ b/dev-lang/python/python-3.6.3.ebuild -@@ -159,7 +159,7 @@ src_compile() { - # https://bugs.gentoo.org/594768 - local -x LC_ALL=C - -- emake CPPFLAGS= CFLAGS= LDFLAGS= -+ emake profile-opt PROFILE_TASK="-m test.regrtest -w -uall,-audio -x test_gdb test_multiprocessing test_subprocess test_tokenize test_signal test_faulthandler" - - # Work around bug 329499. See also bug 413751 and 457194. - if has_version dev-libs/libffi[pax_kernel]; then diff --git a/dev-lang/python/python-2.7.18_p11-r100.ebuild b/dev-lang/python/python-2.7.18_p11-r100.ebuild deleted file mode 100644 index b1101d6b..00000000 --- a/dev-lang/python/python-2.7.18_p11-r100.ebuild +++ /dev/null @@ -1,374 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="7" -WANT_LIBTOOL="none" - -inherit autotools flag-o-matic pax-utils \ - python-utils-r1 toolchain-funcs verify-sig - -MY_P="Python-${PV%_p*}" -PYVER=$(ver_cut 1-2) -PATCHSET="python-gentoo-patches-${PV}" - -DESCRIPTION="An interpreted, interactive, object-oriented programming language" -HOMEPAGE="https://www.python.org/" -SRC_URI="https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz - https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz - verify-sig? ( - https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz.asc - )" -S="${WORKDIR}/${MY_P}" - -LICENSE="PSF-2" -SLOT="${PYVER}" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86" -IUSE="berkdb bluetooth build elibc_uclibc examples gdbm hardened ipv6 +lto +ncurses +pgo +readline +sqlite +ssl +threads tk +wide-unicode wininst +xml" - -# Do not add a dependency on dev-lang/python to this ebuild. -# If you need to apply a patch which requires python for bootstrapping, please -# run the bootstrap code on your dev box and include the results in the -# patchset. See bug 447752. - -RDEPEND="app-arch/bzip2:= - dev-libs/libffi:= - >=sys-libs/zlib-1.1.3:= - virtual/libcrypt:= - virtual/libintl - berkdb? ( || ( - sys-libs/db:5.3 - sys-libs/db:5.1 - sys-libs/db:4.8 - sys-libs/db:4.7 - sys-libs/db:4.6 - sys-libs/db:4.5 - sys-libs/db:4.4 - sys-libs/db:4.3 - sys-libs/db:4.2 - ) ) - gdbm? ( sys-libs/gdbm:=[berkdb] ) - ncurses? ( >=sys-libs/ncurses-5.2:= ) - readline? ( >=sys-libs/readline-4.1:= ) - sqlite? ( >=dev-db/sqlite-3.3.8:3= ) - ssl? ( dev-libs/openssl:= ) - tk? ( - >=dev-lang/tcl-8.0:= - >=dev-lang/tk-8.0:= - dev-tcltk/blt:= - dev-tcltk/tix - ) - xml? ( >=dev-libs/expat-2.1:= )" -# bluetooth requires headers from bluez -DEPEND="${RDEPEND} - bluetooth? ( net-wireless/bluez )" -BDEPEND=" - virtual/pkgconfig - verify-sig? ( app-crypt/openpgp-keys-python ) - !sys-devel/gcc[libffi(-)]" -PDEPEND="app-eselect/eselect-python" -RDEPEND+=" - !build? ( app-misc/mime-types ) - !<=dev-lang/python-exec-2.4.6-r1" - -VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/python.org.asc - -pkg_setup() { - if use berkdb; then - ewarn "'bsddb' module is out-of-date and no longer maintained inside" - ewarn "dev-lang/python. 'bsddb' and 'dbhash' modules have been additionally" - ewarn "removed in Python 3. A maintained alternative of 'bsddb3' module" - ewarn "is provided by dev-python/bsddb3." - else - if has_version "=${CATEGORY}/${PN}-${PV%%.*}*[berkdb]"; then - ewarn "You are migrating from =${CATEGORY}/${PN}-${PV%%.*}*[berkdb]" - ewarn "to =${CATEGORY}/${PN}-${PV%%.*}*[-berkdb]." - ewarn "You might need to migrate your databases." - fi - fi -} - -src_unpack() { - if use verify-sig; then - verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc} - fi - default -} - -src_prepare() { - # Ensure that internal copies of expat, libffi and zlib are not used. - rm -fr Modules/expat || die - rm -fr Modules/_ctypes/libffi* || die - rm -fr Modules/zlib || die - - local PATCHES=( - "${WORKDIR}/${PATCHSET}" - ) - - default - - sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ - Lib/distutils/command/install.py \ - Lib/distutils/sysconfig.py \ - Lib/site.py \ - Lib/sysconfig.py \ - Lib/test/test_site.py \ - Makefile.pre.in \ - Modules/Setup.dist \ - Modules/getpath.c \ - setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" - - sed -i 's/test_subprocess$/test_subprocess test_distutils/' Makefile.pre.in || die - - eautoreconf -} - -src_configure() { - # dbm module can be linked against berkdb or gdbm. - # Defaults to gdbm when both are enabled, #204343. - local disable - use berkdb || use gdbm || disable+=" dbm" - use berkdb || disable+=" _bsddb" - # disable automagic bluetooth headers detection - use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no - use gdbm || disable+=" gdbm" - use ncurses || disable+=" _curses _curses_panel" - use readline || disable+=" readline" - use sqlite || disable+=" _sqlite3" - use ssl || export PYTHON_DISABLE_SSL="1" - use tk || disable+=" _tkinter" - use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. - export PYTHON_DISABLE_MODULES="${disable}" - - if ! use xml; then - ewarn "You have configured Python without XML support." - ewarn "This is NOT a recommended configuration as you" - ewarn "may face problems parsing any XML documents." - fi - - if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then - einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" - fi - - if [[ "$(gcc-major-version)" -ge 4 ]]; then - append-flags -fwrapv - fi - - filter-flags -malign-double - - # https://bugs.gentoo.org/show_bug.cgi?id=50309 - if is-flagq -O3; then - is-flagq -fstack-protector-all && replace-flags -O3 -O2 - use hardened && replace-flags -O3 -O2 - fi - - if tc-is-cross-compiler; then - # Force some tests that try to poke fs paths. - export ac_cv_file__dev_ptc=no - export ac_cv_file__dev_ptmx=yes - fi - - # Export CXX so it ends up in /usr/lib/python2.X/config/Makefile. - tc-export CXX - # The configure script fails to use pkg-config correctly. - # http://bugs.python.org/issue15506 - export ac_cv_path_PKG_CONFIG=$(tc-getPKG_CONFIG) - - local dbmliborder - if use gdbm; then - dbmliborder+="${dbmliborder:+:}gdbm" - fi - if use berkdb; then - dbmliborder+="${dbmliborder:+:}bdb" - fi - - local myeconfargs=( - # The check is broken on clang, and gives false positive: - # https://bugs.gentoo.org/596798 - # (upstream dropped this flag in 3.2a4 anyway) - ac_cv_opt_olimit_ok=no - # glibc-2.30 removes it; since we can't cleanly force-rebuild - # Python on glibc upgrade, remove it proactively to give - # a chance for users rebuilding python before glibc - ac_cv_header_stropts_h=no - - --with-fpectl - --enable-shared - $(use_enable ipv6) - $(use_with threads) - $(use wide-unicode && echo "--enable-unicode=ucs4" || echo "--enable-unicode=ucs2") - $(use_enable pgo optimizations) - $(use_with lto) - --infodir='${prefix}/share/info' - --mandir='${prefix}/share/man' - --with-computed-gotos - --with-dbmliborder="${dbmliborder}" - --with-libc= - --enable-loadable-sqlite-extensions - --with-system-expat - --with-system-ffi - --without-ensurepip - ) - - OPT="" econf "${myeconfargs[@]}" - - if use threads && grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then - eerror "configure has detected that the sem_open function is broken." - eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." - die "Broken sem_open function (bug 496328)" - fi -} - -src_compile() { - # Ensure sed works as expected - # https://bugs.gentoo.org/594768 - local -x LC_ALL=C - - if use pgo; then - # disable distcc and ccache - export DISTCC_HOSTS="" - export CCACHE_DISABLE=1 - fi - - # Avoid invoking pgen for cross-compiles. - touch Include/graminit.h Python/graminit.c - - # extract the number of parallel jobs in MAKEOPTS - echo ${MAKEOPTS} | egrep -o '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' > /dev/null - if [ $? -eq 0 ]; then - par_arg="-j$(echo ${MAKEOPTS} | egrep -o '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' | tail -n1 | egrep -o '[[:digit:]]+')" - else - par_arg="" - fi - export par_arg - - emake EXTRATESTOPTS="${par_arg} -uall,-audio -x test_distutils" - - # Work around bug 329499. See also bug 413751 and 457194. - if has_version dev-libs/libffi[pax_kernel]; then - pax-mark E python - else - pax-mark m python - fi -} - -src_test() { - # Tests will not work when cross compiling. - if tc-is-cross-compiler; then - elog "Disabling tests due to crosscompiling." - return - fi - - # Skip failing tests. - local skipped_tests="distutils gdb curses xpickle bdb runpy test_support" - - for test in ${skipped_tests}; do - mv "${S}"/Lib/test/test_${test}.py "${T}" - done - - # bug 660358 - local -x COLUMNS=80 - - # Daylight saving time problem - # https://bugs.python.org/issue22067 - # https://bugs.gentoo.org/610628 - local -x TZ=UTC - - # Rerun failed tests in verbose mode (regrtest -w). - emake test EXTRATESTOPTS="-w -uall,-audio ${par_arg}" < /dev/tty - local result="$?" - - for test in ${skipped_tests}; do - mv "${T}/test_${test}.py" "${S}"/Lib/test - done - - elog "The following tests have been skipped:" - for test in ${skipped_tests}; do - elog "test_${test}.py" - done - - elog "If you would like to run them, you may:" - elog "cd '${EPREFIX}/usr/$(get_libdir)/python${PYVER}/test'" - elog "and run the tests separately." - - if [[ ${result} -ne 0 ]]; then - die "emake test failed" - fi -} - -src_install() { - local libdir=${ED}/usr/$(get_libdir)/python${PYVER} - - emake DESTDIR="${D}" altinstall - - sed -e "s/\(LDFLAGS=\).*/\1/" -i "${libdir}/config/Makefile" || die - - # Fix collisions between different slots of Python. - mv "${ED}/usr/bin/2to3" "${ED}/usr/bin/2to3-${PYVER}" || die - mv "${ED}/usr/bin/pydoc" "${ED}/usr/bin/pydoc${PYVER}" || die - mv "${ED}/usr/bin/idle" "${ED}/usr/bin/idle${PYVER}" || die - rm "${ED}/usr/bin/smtpd.py" || die - - use berkdb || rm -r "${libdir}/"{bsddb,dbhash.py*,test/test_bsddb*} || die - use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die - use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,lib-tk} || die - use elibc_uclibc && rm -fr "${libdir}/"{bsddb/test,test} - - use threads || rm -r "${libdir}/multiprocessing" || die - use wininst || rm "${libdir}/distutils/command/"wininst-*.exe || die - - dodoc Misc/{ACKS,HISTORY,NEWS} - - if use examples; then - docinto examples - dodoc -r Tools - fi - insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 - local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ - emake --no-print-directory -s -f - 2>/dev/null) - newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py - - newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} - newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} - sed \ - -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ - -e "s:@PYDOC@:pydoc${PYVER}:" \ - -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ - "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" - - local -x EPYTHON=python${PYVER} - # if not using a cross-compiler, use the fresh binary - if ! tc-is-cross-compiler; then - local -x PYTHON=./python - local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD} - else - local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON} - fi - - echo "EPYTHON='${EPYTHON}'" > epython.py || die - python_domodule epython.py - - # python-exec wrapping support - local scriptdir=${D}$(python_get_scriptdir) - mkdir -p "${scriptdir}" || die - # python - ln -s "../../../bin/python${PYVER}" \ - "${scriptdir}/python" || die - # python-config - ln -s "../../../bin/python${PYVER}-config" \ - "${scriptdir}/python-config" || die - # 2to3, pydoc, pyvenv - ln -s "../../../bin/2to3-${PYVER}" \ - "${scriptdir}/2to3" || die - ln -s "../../../bin/pydoc${PYVER}" \ - "${scriptdir}/pydoc" || die - # idle - if use tk; then - ln -s "../../../bin/idle${PYVER}" \ - "${scriptdir}/idle" || die - fi - - # python2* is no longer wrapped, so just symlink it - local pymajor=${PYVER%.*} - dosym "python${PYVER}" "/usr/bin/python${pymajor}" - dosym "python${PYVER}-config" "/usr/bin/python${pymajor}-config" -} diff --git a/dev-lang/python/python-3.10.0_beta3-r1.ebuild b/dev-lang/python/python-3.10.0_beta3-r1.ebuild deleted file mode 100644 index 5fa40a4d..00000000 --- a/dev-lang/python/python-3.10.0_beta3-r1.ebuild +++ /dev/null @@ -1,362 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="7" -WANT_LIBTOOL="none" - -inherit autotools check-reqs flag-o-matic multiprocessing pax-utils \ - python-utils-r1 toolchain-funcs verify-sig - -MY_PV=${PV/_beta/b} -MY_P="Python-${MY_PV%_p*}" -PYVER=$(ver_cut 1-2) -PATCHSET="python-gentoo-patches-${MY_PV}" - -DESCRIPTION="An interpreted, interactive, object-oriented programming language" -HOMEPAGE="https://www.python.org/" -SRC_URI="https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz - https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz - verify-sig? ( - https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz.asc - )" -S="${WORKDIR}/${MY_P}" - -LICENSE="PSF-2" -SLOT="${PYVER}" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" -IUSE="bluetooth build examples gdbm hardened ipv6 +ncurses +readline +sqlite +ssl test tk wininst +xml pgo" -RESTRICT="!test? ( test )" - -# Do not add a dependency on dev-lang/python to this ebuild. -# If you need to apply a patch which requires python for bootstrapping, please -# run the bootstrap code on your dev box and include the results in the -# patchset. See bug 447752. - -RDEPEND="app-arch/bzip2:= - app-arch/xz-utils:= - dev-libs/libffi:= - sys-apps/util-linux:= - >=sys-libs/zlib-1.1.3:= - virtual/libcrypt:= - virtual/libintl - gdbm? ( sys-libs/gdbm:=[berkdb] ) - ncurses? ( >=sys-libs/ncurses-5.2:= ) - readline? ( >=sys-libs/readline-4.1:= ) - sqlite? ( >=dev-db/sqlite-3.3.8:3= ) - ssl? ( dev-libs/openssl:= ) - tk? ( - >=dev-lang/tcl-8.0:= - >=dev-lang/tk-8.0:= - dev-tcltk/blt:= - dev-tcltk/tix - ) - xml? ( >=dev-libs/expat-2.1:= ) - !! /dev/null - if [ $? -eq 0 ]; then - par_arg="-j$(echo ${MAKEOPTS} | egrep -o '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' | tail -n1 | egrep -o '[[:digit:]]+')" - else - par_arg="" - fi - export par_arg - - if use pgo; then - emake profile-opt PROFILE_TASK="-m test -x test_gdb test_compileall test_ctypes test_distutils -j $(nproc) --pgo-extended" - else - emake CPPFLAGS= CFLAGS= LDFLAGS= - fi - - # Work around bug 329499. See also bug 413751 and 457194. - if has_version dev-libs/libffi[pax_kernel]; then - pax-mark E python - else - pax-mark m python - fi -} - -src_test() { - # Tests will not work when cross compiling. - if tc-is-cross-compiler; then - elog "Disabling tests due to crosscompiling." - return - fi - - # Skip failing tests. - local skipped_tests="gdb" - - for test in ${skipped_tests}; do - mv "${S}"/Lib/test/test_${test}.py "${T}" - done - - # bug 660358 - local -x COLUMNS=80 - local -x PYTHONDONTWRITEBYTECODE= - # workaround https://bugs.gentoo.org/775416 - addwrite /usr/lib/python3.10/site-packages - - local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") - - emake test EXTRATESTOPTS="-u-network -j${jobs}" \ - CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty - local result=$? - - for test in ${skipped_tests}; do - mv "${T}/test_${test}.py" "${S}"/Lib/test - done - - elog "The following tests have been skipped:" - for test in ${skipped_tests}; do - elog "test_${test}.py" - done - - elog "If you would like to run them, you may:" - elog "cd '${EPREFIX}/usr/lib/python${PYVER}/test'" - elog "and run the tests separately." - - if [[ ${result} -ne 0 ]]; then - die "emake test failed" - fi -} - -src_install() { - local libdir=${ED}/usr/lib/python${PYVER} - - emake DESTDIR="${D}" altinstall - - sed \ - -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \ - -e "s/\(PY_LDFLAGS=\).*/\1/" \ - -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed" - - # Fix collisions between different slots of Python. - rm "${ED}/usr/$(get_libdir)/libpython3.so" || die - - # Cheap hack to get version with ABIFLAGS - local abiver=$(cd "${ED}/usr/include"; echo python*) - if [[ ${abiver} != python${PYVER} ]]; then - # Replace python3.X with a symlink to python3.Xm - rm "${ED}/usr/bin/python${PYVER}" || die - dosym "${abiver}" "/usr/bin/python${PYVER}" - # Create python3.X-config symlink - dosym "${abiver}-config" "/usr/bin/python${PYVER}-config" - # Create python-3.5m.pc symlink - dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc" - fi - - # python seems to get rebuilt in src_install (bug 569908) - # Work around it for now. - if has_version dev-libs/libffi[pax_kernel]; then - pax-mark E "${ED}/usr/bin/${abiver}" - else - pax-mark m "${ED}/usr/bin/${abiver}" - fi - - use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die - use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die - - dodoc Misc/{ACKS,HISTORY,NEWS} - - if use examples; then - docinto examples - find Tools -name __pycache__ -exec rm -fr {} + || die - dodoc -r Tools - fi - insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 - local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ - emake --no-print-directory -s -f - 2>/dev/null) - newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py - - newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} - newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} - sed \ - -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ - -e "s:@PYDOC@:pydoc${PYVER}:" \ - -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ - "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" - - local -x EPYTHON=python${PYVER} - # if not using a cross-compiler, use the fresh binary - if ! tc-is-cross-compiler; then - local -x PYTHON=./python - local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD} - else - local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON} - fi - - echo "EPYTHON='${EPYTHON}'" > epython.py || die - python_domodule epython.py - - # python-exec wrapping support - local pymajor=${PYVER%.*} - local scriptdir=${D}$(python_get_scriptdir) - mkdir -p "${scriptdir}" || die - # python and pythonX - ln -s "../../../bin/${abiver}" \ - "${scriptdir}/python${pymajor}" || die - ln -s "python${pymajor}" "${scriptdir}/python" || die - # python-config and pythonX-config - # note: we need to create a wrapper rather than symlinking it due - # to some random dirname(argv[0]) magic performed by python-config - cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die - #!/bin/sh - exec "${abiver}-config" "\${@}" - EOF - chmod +x "${scriptdir}/python${pymajor}-config" || die - ln -s "python${pymajor}-config" \ - "${scriptdir}/python-config" || die - # 2to3, pydoc - ln -s "../../../bin/2to3-${PYVER}" \ - "${scriptdir}/2to3" || die - ln -s "../../../bin/pydoc${PYVER}" \ - "${scriptdir}/pydoc" || die - # idle - if use tk; then - ln -s "../../../bin/idle${PYVER}" \ - "${scriptdir}/idle" || die - fi -} diff --git a/dev-lang/python/python-3.6.14-r1.ebuild b/dev-lang/python/python-3.6.14-r1.ebuild deleted file mode 100644 index a2c66ad3..00000000 --- a/dev-lang/python/python-3.6.14-r1.ebuild +++ /dev/null @@ -1,353 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="7" -WANT_LIBTOOL="none" - -inherit autotools flag-o-matic multiprocessing pax-utils \ - python-utils-r1 toolchain-funcs verify-sig - -MY_P="Python-${PV%_p*}" -PYVER=$(ver_cut 1-2) -PATCHSET="python-gentoo-patches-${PV}" - -DESCRIPTION="An interpreted, interactive, object-oriented programming language" -HOMEPAGE="https://www.python.org/" -SRC_URI="https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz - https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz - verify-sig? ( - https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz.asc - )" -S="${WORKDIR}/${MY_P}" - -LICENSE="PSF-2" -SLOT="${PYVER}/${PYVER}m" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86" -IUSE="bluetooth build examples gdbm hardened ipv6 +ncurses +readline +sqlite +ssl test +threads tk wininst +xml pgo" -RESTRICT="!test? ( test )" - -# Do not add a dependency on dev-lang/python to this ebuild. -# If you need to apply a patch which requires python for bootstrapping, please -# run the bootstrap code on your dev box and include the results in the -# patchset. See bug 447752. - -RDEPEND="app-arch/bzip2:= - app-arch/xz-utils:= - dev-libs/libffi:= - >=sys-libs/zlib-1.1.3:= - virtual/libcrypt:= - virtual/libintl - gdbm? ( sys-libs/gdbm:=[berkdb] ) - ncurses? ( >=sys-libs/ncurses-5.2:= ) - readline? ( >=sys-libs/readline-4.1:= ) - sqlite? ( >=dev-db/sqlite-3.3.8:3= ) - ssl? ( dev-libs/openssl:= ) - tk? ( - >=dev-lang/tcl-8.0:= - >=dev-lang/tk-8.0:= - dev-tcltk/blt:= - dev-tcltk/tix - ) - xml? ( >=dev-libs/expat-2.1:= )" -# bluetooth requires headers from bluez -DEPEND="${RDEPEND} - bluetooth? ( net-wireless/bluez ) - test? ( app-arch/xz-utils[extra-filters(+)] )" -BDEPEND=" - virtual/pkgconfig - verify-sig? ( app-crypt/openpgp-keys-python ) - !sys-devel/gcc[libffi(-)]" -PDEPEND="app-eselect/eselect-python" -RDEPEND+=" !build? ( app-misc/mime-types )" - -VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/python.org.asc - -src_unpack() { - if use verify-sig; then - verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc} - fi - default -} - -src_prepare() { - # Ensure that internal copies of expat, libffi and zlib are not used. - rm -fr Modules/expat || die - rm -fr Modules/_ctypes/libffi* || die - rm -fr Modules/zlib || die - - local PATCHES=( - "${WORKDIR}/${PATCHSET}" - ) - - default - - sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ - Lib/distutils/command/install.py \ - Lib/distutils/sysconfig.py \ - Lib/site.py \ - Lib/sysconfig.py \ - Lib/test/test_site.py \ - Makefile.pre.in \ - Modules/Setup.dist \ - Modules/getpath.c \ - configure.ac \ - setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" - - # force correct number of jobs - # https://bugs.gentoo.org/737660 - local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") - sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die - - eautoreconf -} - -src_configure() { - local disable - # disable automagic bluetooth headers detection - use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no - use gdbm || disable+=" gdbm" - use ncurses || disable+=" _curses _curses_panel" - use readline || disable+=" readline" - use sqlite || disable+=" _sqlite3" - use ssl || export PYTHON_DISABLE_SSL="1" - use tk || disable+=" _tkinter" - use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. - export PYTHON_DISABLE_MODULES="${disable}" - - if ! use xml; then - ewarn "You have configured Python without XML support." - ewarn "This is NOT a recommended configuration as you" - ewarn "may face problems parsing any XML documents." - fi - - if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then - einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" - fi - - if [[ "$(gcc-major-version)" -ge 4 ]]; then - append-flags -fwrapv - fi - - filter-flags -malign-double - - # https://bugs.gentoo.org/show_bug.cgi?id=50309 - if is-flagq -O3; then - is-flagq -fstack-protector-all && replace-flags -O3 -O2 - use hardened && replace-flags -O3 -O2 - fi - - # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. - tc-export CXX - - local dbmliborder - if use gdbm; then - dbmliborder+="${dbmliborder:+:}gdbm" - fi - - local myeconfargs=( - # glibc-2.30 removes it; since we can't cleanly force-rebuild - # Python on glibc upgrade, remove it proactively to give - # a chance for users rebuilding python before glibc - ac_cv_header_stropts_h=no - - --with-fpectl - --enable-shared - $(use_enable ipv6) - $(use_with threads) - --infodir='${prefix}/share/info' - --mandir='${prefix}/share/man' - --with-computed-gotos - --with-dbmliborder="${dbmliborder}" - --with-libc= - --enable-loadable-sqlite-extensions - --without-ensurepip - --with-system-expat - --with-system-ffi - ) - - OPT="" econf "${myeconfargs[@]}" - - if use threads && grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then - eerror "configure has detected that the sem_open function is broken." - eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." - die "Broken sem_open function (bug 496328)" - fi -} - -src_compile() { - # Ensure sed works as expected - # https://bugs.gentoo.org/594768 - local -x LC_ALL=C - - #The following code borrowed from https://github.com/stefantalpalaru/gentoo-overlay - - # extract the number of parallel jobs in MAKEOPTS - echo ${MAKEOPTS} | egrep -o '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' > /dev/null - if [ $? -eq 0 ]; then - par_arg="-j$(echo ${MAKEOPTS} | egrep -o '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' | tail -n1 | egrep -o '[[:digit:]]+')" - else - par_arg="" - fi - export par_arg - - if use pgo; then - emake profile-opt PROFILE_TASK="-m test.regrtest ${par_arg} -w -uall,-audio -x test_distutils test_gdb test_multiprocessing test_subprocess test_tokenize test_signal test_faulthandler test_asyncio test_ctypes test_compileall test_pyexpat test_runpy test_support test_threaded_import test_xmlrpc_net" - else - emake CPPFLAGS= CFLAGS= LDFLAGS= - fi - - # Work around bug 329499. See also bug 413751 and 457194. - if has_version dev-libs/libffi[pax_kernel]; then - pax-mark E python - else - pax-mark m python - fi -} - -src_test() { - # Tests will not work when cross compiling. - if tc-is-cross-compiler; then - elog "Disabling tests due to crosscompiling." - return - fi - - # Skip failing tests. - local skipped_tests="gdb faulthandler" - - for test in ${skipped_tests}; do - mv "${S}"/Lib/test/test_${test}.py "${T}" - done - - # bug 660358 - local -x COLUMNS=80 - local -x PYTHONDONTWRITEBYTECODE= - - local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") - - emake test EXTRATESTOPTS="-u-network -j${jobs}" \ - CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty - local result=$? - - for test in ${skipped_tests}; do - mv "${T}/test_${test}.py" "${S}"/Lib/test - done - - elog "The following tests have been skipped:" - for test in ${skipped_tests}; do - elog "test_${test}.py" - done - - elog "If you would like to run them, you may:" - elog "cd '${EPREFIX}/usr/$(get_libdir)/python${PYVER}/test'" - elog "and run the tests separately." - - if [[ ${result} -ne 0 ]]; then - die "emake test failed" - fi -} - -src_install() { - local libdir=${ED}/usr/$(get_libdir)/python${PYVER} - - emake DESTDIR="${D}" altinstall - - # Remove static library - rm "${ED}"/usr/$(get_libdir)/libpython*.a || die - - sed \ - -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \ - -e "s/\(PY_LDFLAGS=\).*/\1/" \ - -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed" - - # Fix collisions between different slots of Python. - rm "${ED}/usr/$(get_libdir)/libpython3.so" || die - - # Cheap hack to get version with ABIFLAGS - local abiver=$(cd "${ED}/usr/include"; echo python*) - if [[ ${abiver} != python${PYVER} ]]; then - # Replace python3.X with a symlink to python3.Xm - rm "${ED}/usr/bin/python${PYVER}" || die - dosym "${abiver}" "/usr/bin/python${PYVER}" - # Create python3.X-config symlink - dosym "${abiver}-config" "/usr/bin/python${PYVER}-config" - # Create python-3.5m.pc symlink - dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc" - fi - - # python seems to get rebuilt in src_install (bug 569908) - # Work around it for now. - if has_version dev-libs/libffi[pax_kernel]; then - pax-mark E "${ED}/usr/bin/${abiver}" - else - pax-mark m "${ED}/usr/bin/${abiver}" - fi - - use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die - use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die - - use threads || rm -r "${libdir}/multiprocessing" || die - use wininst || rm "${libdir}/distutils/command/"wininst-*.exe || die - - dodoc Misc/{ACKS,HISTORY,NEWS} - - if use examples; then - docinto examples - find Tools -name __pycache__ -exec rm -fr {} + || die - dodoc -r Tools - fi - insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 - local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ - emake --no-print-directory -s -f - 2>/dev/null) - newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py - - newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} - newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} - sed \ - -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ - -e "s:@PYDOC@:pydoc${PYVER}:" \ - -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ - "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" - - local -x EPYTHON=python${PYVER} - # if not using a cross-compiler, use the fresh binary - if ! tc-is-cross-compiler; then - local -x PYTHON=./python - local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD} - else - local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON} - fi - - echo "EPYTHON='${EPYTHON}'" > epython.py || die - python_domodule epython.py - - # python-exec wrapping support - local pymajor=${PYVER%.*} - local scriptdir=${D}$(python_get_scriptdir) - mkdir -p "${scriptdir}" || die - # python and pythonX - ln -s "../../../bin/${abiver}" \ - "${scriptdir}/python${pymajor}" || die - ln -s "python${pymajor}" "${scriptdir}/python" || die - # python-config and pythonX-config - # note: we need to create a wrapper rather than symlinking it due - # to some random dirname(argv[0]) magic performed by python-config - cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die - #!/bin/sh - exec "${abiver}-config" "\${@}" - EOF - chmod +x "${scriptdir}/python${pymajor}-config" || die - ln -s "python${pymajor}-config" \ - "${scriptdir}/python-config" || die - # 2to3, pydoc, pyvenv - ln -s "../../../bin/2to3-${PYVER}" \ - "${scriptdir}/2to3" || die - ln -s "../../../bin/pydoc${PYVER}" \ - "${scriptdir}/pydoc" || die - ln -s "../../../bin/pyvenv-${PYVER}" \ - "${scriptdir}/pyvenv" || die - # idle - if use tk; then - ln -s "../../../bin/idle${PYVER}" \ - "${scriptdir}/idle" || die - fi -} diff --git a/dev-lang/python/python-3.7.11-r1.ebuild b/dev-lang/python/python-3.7.11-r1.ebuild deleted file mode 100644 index 55c7f807..00000000 --- a/dev-lang/python/python-3.7.11-r1.ebuild +++ /dev/null @@ -1,346 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="7" -WANT_LIBTOOL="none" - -inherit autotools flag-o-matic multiprocessing pax-utils \ - python-utils-r1 toolchain-funcs verify-sig - -MY_P="Python-${PV%_p*}" -PYVER=$(ver_cut 1-2) -PATCHSET="python-gentoo-patches-${PV}" - -DESCRIPTION="An interpreted, interactive, object-oriented programming language" -HOMEPAGE="https://www.python.org/" -SRC_URI="https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz - https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz - verify-sig? ( - https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz.asc - )" -S="${WORKDIR}/${MY_P}" - -LICENSE="PSF-2" -SLOT="${PYVER}/${PYVER}m" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" -IUSE="bluetooth build examples gdbm hardened ipv6 +ncurses +readline +sqlite +ssl test tk wininst +xml pgo" -RESTRICT="!test? ( test )" - -# Do not add a dependency on dev-lang/python to this ebuild. -# If you need to apply a patch which requires python for bootstrapping, please -# run the bootstrap code on your dev box and include the results in the -# patchset. See bug 447752. - -RDEPEND="app-arch/bzip2:= - app-arch/xz-utils:= - dev-libs/libffi:= - sys-apps/util-linux:= - >=sys-libs/zlib-1.1.3:= - virtual/libcrypt:= - virtual/libintl - gdbm? ( sys-libs/gdbm:=[berkdb] ) - ncurses? ( >=sys-libs/ncurses-5.2:= ) - readline? ( >=sys-libs/readline-4.1:= ) - sqlite? ( >=dev-db/sqlite-3.3.8:3= ) - ssl? ( dev-libs/openssl:= ) - tk? ( - >=dev-lang/tcl-8.0:= - >=dev-lang/tk-8.0:= - dev-tcltk/blt:= - dev-tcltk/tix - ) - xml? ( >=dev-libs/expat-2.1:= )" -# bluetooth requires headers from bluez -DEPEND="${RDEPEND} - bluetooth? ( net-wireless/bluez ) - test? ( app-arch/xz-utils[extra-filters(+)] )" -BDEPEND=" - virtual/pkgconfig - verify-sig? ( app-crypt/openpgp-keys-python ) - !sys-devel/gcc[libffi(-)]" -PDEPEND="app-eselect/eselect-python" -RDEPEND+=" !build? ( app-misc/mime-types )" - -VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/python.org.asc - -src_unpack() { - if use verify-sig; then - verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc} - fi - default -} - -src_prepare() { - # Ensure that internal copies of expat, libffi and zlib are not used. - rm -fr Modules/expat || die - rm -fr Modules/_ctypes/libffi* || die - rm -fr Modules/zlib || die - - local PATCHES=( - "${WORKDIR}/${PATCHSET}" - ) - - default - - sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ - setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" - - # force correct number of jobs - # https://bugs.gentoo.org/737660 - local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") - sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die - - eautoreconf -} - -src_configure() { - local disable - # disable automagic bluetooth headers detection - use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no - use gdbm || disable+=" gdbm" - use ncurses || disable+=" _curses _curses_panel" - use readline || disable+=" readline" - use sqlite || disable+=" _sqlite3" - use ssl || export PYTHON_DISABLE_SSL="1" - use tk || disable+=" _tkinter" - use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. - export PYTHON_DISABLE_MODULES="${disable}" - - if ! use xml; then - ewarn "You have configured Python without XML support." - ewarn "This is NOT a recommended configuration as you" - ewarn "may face problems parsing any XML documents." - fi - - if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then - einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" - fi - - if [[ "$(gcc-major-version)" -ge 4 ]]; then - append-flags -fwrapv - fi - - filter-flags -malign-double - - # https://bugs.gentoo.org/show_bug.cgi?id=50309 - if is-flagq -O3; then - is-flagq -fstack-protector-all && replace-flags -O3 -O2 - use hardened && replace-flags -O3 -O2 - fi - - # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. - tc-export CXX - - # Fix implicit declarations on cross and prefix builds. Bug #674070. - use ncurses && append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw - - local dbmliborder - if use gdbm; then - dbmliborder+="${dbmliborder:+:}gdbm" - fi - - local myeconfargs=( - # glibc-2.30 removes it; since we can't cleanly force-rebuild - # Python on glibc upgrade, remove it proactively to give - # a chance for users rebuilding python before glibc - ac_cv_header_stropts_h=no - - --enable-shared - $(use_enable ipv6) - --infodir='${prefix}/share/info' - --mandir='${prefix}/share/man' - --with-computed-gotos - --with-dbmliborder="${dbmliborder}" - --with-libc= - --enable-loadable-sqlite-extensions - --without-ensurepip - --with-system-expat - --with-system-ffi - ) - - OPT="" econf "${myeconfargs[@]}" - - if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then - eerror "configure has detected that the sem_open function is broken." - eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." - die "Broken sem_open function (bug 496328)" - fi -} - -src_compile() { - # Ensure sed works as expected - # https://bugs.gentoo.org/594768 - local -x LC_ALL=C - - #The following code borrowed from https://github.com/stefantalpalaru/gentoo-overlay - - # extract the number of parallel jobs in MAKEOPTS - echo ${MAKEOPTS} | egrep -o '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' > /dev/null - if [ $? -eq 0 ]; then - par_arg="-j$(echo ${MAKEOPTS} | egrep -o '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' | tail -n1 | egrep -o '[[:digit:]]+')" - else - par_arg="" - fi - export par_arg - - if use pgo; then - emake profile-opt PROFILE_TASK="-m test -x test_gdb test_compileall test_distutils test_multiprocessing_spawn - test_regrtest -j $(nproc) --pgo-extended" - else - emake CPPFLAGS= CFLAGS= LDFLAGS= - fi - - # Work around bug 329499. See also bug 413751 and 457194. - if has_version dev-libs/libffi[pax_kernel]; then - pax-mark E python - else - pax-mark m python - fi -} - -src_test() { - # Tests will not work when cross compiling. - if tc-is-cross-compiler; then - elog "Disabling tests due to crosscompiling." - return - fi - - # Skip failing tests. - local skipped_tests="gdb" - - for test in ${skipped_tests}; do - mv "${S}"/Lib/test/test_${test}.py "${T}" - done - - # bug 660358 - local -x COLUMNS=80 - local -x PYTHONDONTWRITEBYTECODE= - - local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") - - emake test EXTRATESTOPTS="-u-network -j${jobs}" \ - CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty - local result=$? - - for test in ${skipped_tests}; do - mv "${T}/test_${test}.py" "${S}"/Lib/test - done - - elog "The following tests have been skipped:" - for test in ${skipped_tests}; do - elog "test_${test}.py" - done - - elog "If you would like to run them, you may:" - elog "cd '${EPREFIX}/usr/lib/python${PYVER}/test'" - elog "and run the tests separately." - - if [[ ${result} -ne 0 ]]; then - die "emake test failed" - fi -} - -src_install() { - local libdir=${ED}/usr/lib/python${PYVER} - - emake DESTDIR="${D}" altinstall - - # Remove static library - rm "${ED}"/usr/$(get_libdir)/libpython*.a || die - - sed \ - -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \ - -e "s/\(PY_LDFLAGS=\).*/\1/" \ - -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed" - - # Fix collisions between different slots of Python. - rm "${ED}/usr/$(get_libdir)/libpython3.so" || die - - # Cheap hack to get version with ABIFLAGS - local abiver=$(cd "${ED}/usr/include"; echo python*) - if [[ ${abiver} != python${PYVER} ]]; then - # Replace python3.X with a symlink to python3.Xm - rm "${ED}/usr/bin/python${PYVER}" || die - dosym "${abiver}" "/usr/bin/python${PYVER}" - # Create python3.X-config symlink - dosym "${abiver}-config" "/usr/bin/python${PYVER}-config" - # Create python-3.5m.pc symlink - dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc" - fi - - # python seems to get rebuilt in src_install (bug 569908) - # Work around it for now. - if has_version dev-libs/libffi[pax_kernel]; then - pax-mark E "${ED}/usr/bin/${abiver}" - else - pax-mark m "${ED}/usr/bin/${abiver}" - fi - - use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die - use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die - - use wininst || rm "${libdir}/distutils/command/"wininst-*.exe || die - - dodoc Misc/{ACKS,HISTORY,NEWS} - - if use examples; then - docinto examples - find Tools -name __pycache__ -exec rm -fr {} + || die - dodoc -r Tools - fi - insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 - local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ - emake --no-print-directory -s -f - 2>/dev/null) - newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py - - newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} - newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} - sed \ - -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ - -e "s:@PYDOC@:pydoc${PYVER}:" \ - -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ - "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" - - local -x EPYTHON=python${PYVER} - # if not using a cross-compiler, use the fresh binary - if ! tc-is-cross-compiler; then - local -x PYTHON=./python - local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD} - else - local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON} - fi - - echo "EPYTHON='${EPYTHON}'" > epython.py || die - python_domodule epython.py - - # python-exec wrapping support - local pymajor=${PYVER%.*} - local scriptdir=${D}$(python_get_scriptdir) - mkdir -p "${scriptdir}" || die - # python and pythonX - ln -s "../../../bin/${abiver}" \ - "${scriptdir}/python${pymajor}" || die - ln -s "python${pymajor}" "${scriptdir}/python" || die - # python-config and pythonX-config - # note: we need to create a wrapper rather than symlinking it due - # to some random dirname(argv[0]) magic performed by python-config - cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die - #!/bin/sh - exec "${abiver}-config" "\${@}" - EOF - chmod +x "${scriptdir}/python${pymajor}-config" || die - ln -s "python${pymajor}-config" \ - "${scriptdir}/python-config" || die - # 2to3, pydoc, pyvenv - ln -s "../../../bin/2to3-${PYVER}" \ - "${scriptdir}/2to3" || die - ln -s "../../../bin/pydoc${PYVER}" \ - "${scriptdir}/pydoc" || die - ln -s "../../../bin/pyvenv-${PYVER}" \ - "${scriptdir}/pyvenv" || die - # idle - if use tk; then - ln -s "../../../bin/idle${PYVER}" \ - "${scriptdir}/idle" || die - fi -} diff --git a/dev-lang/python/python-3.8.11-r1.ebuild b/dev-lang/python/python-3.8.11-r1.ebuild deleted file mode 100644 index ab04ae58..00000000 --- a/dev-lang/python/python-3.8.11-r1.ebuild +++ /dev/null @@ -1,351 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="7" -WANT_LIBTOOL="none" - -inherit autotools flag-o-matic multiprocessing pax-utils \ - python-utils-r1 toolchain-funcs verify-sig - -MY_PV=${PV/_rc/rc} -MY_P="Python-${MY_PV%_p*}" -PYVER=$(ver_cut 1-2) -PATCHSET="python-gentoo-patches-${MY_PV}" - -DESCRIPTION="An interpreted, interactive, object-oriented programming language" -HOMEPAGE="https://www.python.org/" -SRC_URI="https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz - https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz - verify-sig? ( - https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz.asc - )" -S="${WORKDIR}/${MY_P}" - -LICENSE="PSF-2" -SLOT="${PYVER}" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" -IUSE="bluetooth build examples gdbm hardened ipv6 +ncurses +readline +sqlite +ssl test tk wininst +xml pgo" -RESTRICT="!test? ( test )" - -# Do not add a dependency on dev-lang/python to this ebuild. -# If you need to apply a patch which requires python for bootstrapping, please -# run the bootstrap code on your dev box and include the results in the -# patchset. See bug 447752. - -RDEPEND="app-arch/bzip2:= - app-arch/xz-utils:= - dev-libs/libffi:= - sys-apps/util-linux:= - >=sys-libs/zlib-1.1.3:= - virtual/libcrypt:= - virtual/libintl - gdbm? ( sys-libs/gdbm:=[berkdb] ) - ncurses? ( >=sys-libs/ncurses-5.2:= ) - readline? ( >=sys-libs/readline-4.1:= ) - sqlite? ( >=dev-db/sqlite-3.3.8:3= ) - ssl? ( dev-libs/openssl:= ) - tk? ( - >=dev-lang/tcl-8.0:= - >=dev-lang/tk-8.0:= - dev-tcltk/blt:= - dev-tcltk/tix - ) - xml? ( >=dev-libs/expat-2.1:= )" -# bluetooth requires headers from bluez -DEPEND="${RDEPEND} - bluetooth? ( net-wireless/bluez ) - test? ( app-arch/xz-utils[extra-filters(+)] )" -BDEPEND=" - virtual/pkgconfig - sys-devel/autoconf-archive - verify-sig? ( app-crypt/openpgp-keys-python ) - !sys-devel/gcc[libffi(-)]" -PDEPEND="app-eselect/eselect-python" -RDEPEND+=" !build? ( app-misc/mime-types )" - -VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/python.org.asc - -src_unpack() { - if use verify-sig; then - verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc} - fi - default -} - -src_prepare() { - # Ensure that internal copies of expat, libffi and zlib are not used. - rm -fr Modules/expat || die - rm -fr Modules/_ctypes/libffi* || die - rm -fr Modules/zlib || die - - local PATCHES=( - "${WORKDIR}/${PATCHSET}" - ) - - default - - sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ - setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" - - # force correct number of jobs - # https://bugs.gentoo.org/737660 - local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") - sed -i -e "s:-j0:-j${jobs}:" Makefile.pre.in || die - sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die - - eautoreconf -} - -src_configure() { - local disable - # disable automagic bluetooth headers detection - use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no - use gdbm || disable+=" gdbm" - use ncurses || disable+=" _curses _curses_panel" - use readline || disable+=" readline" - use sqlite || disable+=" _sqlite3" - use ssl || export PYTHON_DISABLE_SSL="1" - use tk || disable+=" _tkinter" - use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. - export PYTHON_DISABLE_MODULES="${disable}" - - if ! use xml; then - ewarn "You have configured Python without XML support." - ewarn "This is NOT a recommended configuration as you" - ewarn "may face problems parsing any XML documents." - fi - - if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then - einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" - fi - - if [[ "$(gcc-major-version)" -ge 4 ]]; then - append-flags -fwrapv - fi - - filter-flags -malign-double - - # https://bugs.gentoo.org/show_bug.cgi?id=50309 - if is-flagq -O3; then - is-flagq -fstack-protector-all && replace-flags -O3 -O2 - use hardened && replace-flags -O3 -O2 - fi - - # https://bugs.gentoo.org/700012 - if is-flagq -flto || is-flagq '-flto=*'; then - append-cflags $(test-flags-CC -ffat-lto-objects) - fi - - # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. - tc-export CXX - - # Fix implicit declarations on cross and prefix builds. Bug #674070. - use ncurses && append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw - - local dbmliborder - if use gdbm; then - dbmliborder+="${dbmliborder:+:}gdbm" - fi - - local myeconfargs=( - # glibc-2.30 removes it; since we can't cleanly force-rebuild - # Python on glibc upgrade, remove it proactively to give - # a chance for users rebuilding python before glibc - ac_cv_header_stropts_h=no - - --enable-shared - $(use_enable ipv6) - --infodir='${prefix}/share/info' - --mandir='${prefix}/share/man' - --with-computed-gotos - --with-dbmliborder="${dbmliborder}" - --with-libc= - --enable-loadable-sqlite-extensions - --without-ensurepip - --with-system-expat - --with-system-ffi - ) - - OPT="" econf "${myeconfargs[@]}" - - if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then - eerror "configure has detected that the sem_open function is broken." - eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." - die "Broken sem_open function (bug 496328)" - fi -} - -src_compile() { - # Ensure sed works as expected - # https://bugs.gentoo.org/594768 - local -x LC_ALL=C - - #The following code borrowed from https://github.com/stefantalpalaru/gentoo-overlay - - # extract the number of parallel jobs in MAKEOPTS - echo ${MAKEOPTS} | egrep -o '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' > /dev/null - if [ $? -eq 0 ]; then - par_arg="-j$(echo ${MAKEOPTS} | egrep -o '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' | tail -n1 | egrep -o '[[:digit:]]+')" - else - par_arg="" - fi - export par_arg - - if use pgo; then - emake profile-opt PROFILE_TASK="-m test -x test_gdb test_compileall test_distutils -j $(nproc) --pgo-extended" - else - emake CPPFLAGS= CFLAGS= LDFLAGS= - fi - - # Work around bug 329499. See also bug 413751 and 457194. - if has_version dev-libs/libffi[pax_kernel]; then - pax-mark E python - else - pax-mark m python - fi -} - -src_test() { - # Tests will not work when cross compiling. - if tc-is-cross-compiler; then - elog "Disabling tests due to crosscompiling." - return - fi - - # Skip failing tests. - local skipped_tests="gdb" - - for test in ${skipped_tests}; do - mv "${S}"/Lib/test/test_${test}.py "${T}" - done - - # bug 660358 - local -x COLUMNS=80 - local -x PYTHONDONTWRITEBYTECODE= - - local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") - - emake test EXTRATESTOPTS="-u-network -j${jobs}" \ - CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty - local result=$? - - for test in ${skipped_tests}; do - mv "${T}/test_${test}.py" "${S}"/Lib/test - done - - elog "The following tests have been skipped:" - for test in ${skipped_tests}; do - elog "test_${test}.py" - done - - elog "If you would like to run them, you may:" - elog "cd '${EPREFIX}/usr/lib/python${PYVER}/test'" - elog "and run the tests separately." - - if [[ ${result} -ne 0 ]]; then - die "emake test failed" - fi -} - -src_install() { - local libdir=${ED}/usr/lib/python${PYVER} - - emake DESTDIR="${D}" altinstall - - # Remove static library - rm "${ED}"/usr/$(get_libdir)/libpython*.a || die - - sed \ - -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \ - -e "s/\(PY_LDFLAGS=\).*/\1/" \ - -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed" - - # Fix collisions between different slots of Python. - rm "${ED}/usr/$(get_libdir)/libpython3.so" || die - - # Cheap hack to get version with ABIFLAGS - local abiver=$(cd "${ED}/usr/include"; echo python*) - if [[ ${abiver} != python${PYVER} ]]; then - # Replace python3.X with a symlink to python3.Xm - rm "${ED}/usr/bin/python${PYVER}" || die - dosym "${abiver}" "/usr/bin/python${PYVER}" - # Create python3.X-config symlink - dosym "${abiver}-config" "/usr/bin/python${PYVER}-config" - # Create python-3.5m.pc symlink - dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc" - fi - - # python seems to get rebuilt in src_install (bug 569908) - # Work around it for now. - if has_version dev-libs/libffi[pax_kernel]; then - pax-mark E "${ED}/usr/bin/${abiver}" - else - pax-mark m "${ED}/usr/bin/${abiver}" - fi - - use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die - use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die - - use wininst || rm "${libdir}/distutils/command/"wininst-*.exe || die - - dodoc Misc/{ACKS,HISTORY,NEWS} - - if use examples; then - docinto examples - find Tools -name __pycache__ -exec rm -fr {} + || die - dodoc -r Tools - fi - insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 - local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ - emake --no-print-directory -s -f - 2>/dev/null) - newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py - - newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} - newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} - sed \ - -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ - -e "s:@PYDOC@:pydoc${PYVER}:" \ - -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ - "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" - - local -x EPYTHON=python${PYVER} - # if not using a cross-compiler, use the fresh binary - if ! tc-is-cross-compiler; then - local -x PYTHON=./python - local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD} - else - local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON} - fi - - echo "EPYTHON='${EPYTHON}'" > epython.py || die - python_domodule epython.py - - # python-exec wrapping support - local pymajor=${PYVER%.*} - local scriptdir=${D}$(python_get_scriptdir) - mkdir -p "${scriptdir}" || die - # python and pythonX - ln -s "../../../bin/${abiver}" \ - "${scriptdir}/python${pymajor}" || die - ln -s "python${pymajor}" "${scriptdir}/python" || die - # python-config and pythonX-config - # note: we need to create a wrapper rather than symlinking it due - # to some random dirname(argv[0]) magic performed by python-config - cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die - #!/bin/sh - exec "${abiver}-config" "\${@}" - EOF - chmod +x "${scriptdir}/python${pymajor}-config" || die - ln -s "python${pymajor}-config" \ - "${scriptdir}/python-config" || die - # 2to3, pydoc - ln -s "../../../bin/2to3-${PYVER}" \ - "${scriptdir}/2to3" || die - ln -s "../../../bin/pydoc${PYVER}" \ - "${scriptdir}/pydoc" || die - # idle - if use tk; then - ln -s "../../../bin/idle${PYVER}" \ - "${scriptdir}/idle" || die - fi -} diff --git a/dev-lang/python/python-3.9.6-r1.ebuild b/dev-lang/python/python-3.9.6-r1.ebuild deleted file mode 100644 index da5eb094..00000000 --- a/dev-lang/python/python-3.9.6-r1.ebuild +++ /dev/null @@ -1,360 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="7" -WANT_LIBTOOL="none" - -inherit autotools check-reqs flag-o-matic multiprocessing pax-utils \ - python-utils-r1 toolchain-funcs verify-sig - -MY_PV=${PV/_rc/rc} -MY_P="Python-${MY_PV%_p*}" -PYVER=$(ver_cut 1-2) -PATCHSET="python-gentoo-patches-${MY_PV}" - -DESCRIPTION="An interpreted, interactive, object-oriented programming language" -HOMEPAGE="https://www.python.org/" -SRC_URI="https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz - https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz - verify-sig? ( - https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz.asc - )" -S="${WORKDIR}/${MY_P}" - -LICENSE="PSF-2" -SLOT="${PYVER}" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" -IUSE="bluetooth build examples gdbm hardened ipv6 +ncurses +readline +sqlite +ssl test tk wininst +xml pgo" -RESTRICT="!test? ( test )" - -# Do not add a dependency on dev-lang/python to this ebuild. -# If you need to apply a patch which requires python for bootstrapping, please -# run the bootstrap code on your dev box and include the results in the -# patchset. See bug 447752. - -RDEPEND="app-arch/bzip2:= - app-arch/xz-utils:= - dev-libs/libffi:= - sys-apps/util-linux:= - >=sys-libs/zlib-1.1.3:= - virtual/libcrypt:= - virtual/libintl - gdbm? ( sys-libs/gdbm:=[berkdb] ) - ncurses? ( >=sys-libs/ncurses-5.2:= ) - readline? ( >=sys-libs/readline-4.1:= ) - sqlite? ( >=dev-db/sqlite-3.3.8:3= ) - ssl? ( dev-libs/openssl:= ) - tk? ( - >=dev-lang/tcl-8.0:= - >=dev-lang/tk-8.0:= - dev-tcltk/blt:= - dev-tcltk/tix - ) - xml? ( >=dev-libs/expat-2.1:= )" -# bluetooth requires headers from bluez -DEPEND="${RDEPEND} - bluetooth? ( net-wireless/bluez ) - test? ( app-arch/xz-utils[extra-filters(+)] )" -BDEPEND=" - virtual/pkgconfig - sys-devel/autoconf-archive - verify-sig? ( app-crypt/openpgp-keys-python ) - !sys-devel/gcc[libffi(-)]" -RDEPEND+=" !build? ( app-misc/mime-types )" -PDEPEND="app-eselect/eselect-python" - -VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/python.org.asc - -# large file tests involve a 2.5G file being copied (duplicated) -CHECKREQS_DISK_BUILD=5500M - -pkg_pretend() { - use test && check-reqs_pkg_pretend -} - -pkg_setup() { - use test && check-reqs_pkg_setup -} - -src_unpack() { - if use verify-sig; then - verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc} - fi - default -} - -src_prepare() { - # Ensure that internal copies of expat, libffi and zlib are not used. - rm -fr Modules/expat || die - rm -fr Modules/_ctypes/libffi* || die - rm -fr Modules/zlib || die - - local PATCHES=( - "${WORKDIR}/${PATCHSET}" - ) - - default - - sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ - setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" - - # force correct number of jobs - # https://bugs.gentoo.org/737660 - local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") - sed -i -e "s:-j0:-j${jobs}:" Makefile.pre.in || die - sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die - - eautoreconf -} - -src_configure() { - local disable - # disable automagic bluetooth headers detection - use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no - use gdbm || disable+=" gdbm" - use ncurses || disable+=" _curses _curses_panel" - use readline || disable+=" readline" - use sqlite || disable+=" _sqlite3" - use ssl || export PYTHON_DISABLE_SSL="1" - use tk || disable+=" _tkinter" - use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. - export PYTHON_DISABLE_MODULES="${disable}" - - if ! use xml; then - ewarn "You have configured Python without XML support." - ewarn "This is NOT a recommended configuration as you" - ewarn "may face problems parsing any XML documents." - fi - - if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then - einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" - fi - - if [[ "$(gcc-major-version)" -ge 4 ]]; then - append-flags -fwrapv - fi - - filter-flags -malign-double - - # https://bugs.gentoo.org/show_bug.cgi?id=50309 - if is-flagq -O3; then - is-flagq -fstack-protector-all && replace-flags -O3 -O2 - use hardened && replace-flags -O3 -O2 - fi - - # https://bugs.gentoo.org/700012 - if is-flagq -flto || is-flagq '-flto=*'; then - append-cflags $(test-flags-CC -ffat-lto-objects) - fi - - # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. - tc-export CXX - - # Fix implicit declarations on cross and prefix builds. Bug #674070. - use ncurses && append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw - - local dbmliborder - if use gdbm; then - dbmliborder+="${dbmliborder:+:}gdbm" - fi - - local myeconfargs=( - # glibc-2.30 removes it; since we can't cleanly force-rebuild - # Python on glibc upgrade, remove it proactively to give - # a chance for users rebuilding python before glibc - ac_cv_header_stropts_h=no - - --enable-shared - $(use_enable ipv6) - --infodir='${prefix}/share/info' - --mandir='${prefix}/share/man' - --with-computed-gotos - --with-dbmliborder="${dbmliborder}" - --with-libc= - --enable-loadable-sqlite-extensions - --without-ensurepip - --with-system-expat - --with-system-ffi - ) - - OPT="" econf "${myeconfargs[@]}" - - if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then - eerror "configure has detected that the sem_open function is broken." - eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." - die "Broken sem_open function (bug 496328)" - fi -} - -src_compile() { - # Ensure sed works as expected - # https://bugs.gentoo.org/594768 - local -x LC_ALL=C - - #The following code borrowed from https://github.com/stefantalpalaru/gentoo-overlay - - # extract the number of parallel jobs in MAKEOPTS - echo ${MAKEOPTS} | egrep -o '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' > /dev/null - if [ $? -eq 0 ]; then - par_arg="-j$(echo ${MAKEOPTS} | egrep -o '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' | tail -n1 | egrep -o '[[:digit:]]+')" - else - par_arg="" - fi - export par_arg - - if use pgo; then - emake profile-opt PROFILE_TASK="-m test -x test_gdb test_compileall test_distutils -j $(nproc) --pgo-extended" - else - emake CPPFLAGS= CFLAGS= LDFLAGS= - fi - - # Work around bug 329499. See also bug 413751 and 457194. - if has_version dev-libs/libffi[pax_kernel]; then - pax-mark E python - else - pax-mark m python - fi -} - -src_test() { - # Tests will not work when cross compiling. - if tc-is-cross-compiler; then - elog "Disabling tests due to crosscompiling." - return - fi - - # Skip failing tests. - local skipped_tests="gdb" - - for test in ${skipped_tests}; do - mv "${S}"/Lib/test/test_${test}.py "${T}" - done - - # bug 660358 - local -x COLUMNS=80 - local -x PYTHONDONTWRITEBYTECODE= - - local jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") - - emake test EXTRATESTOPTS="-u-network -j${jobs}" \ - CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty - local result=$? - - for test in ${skipped_tests}; do - mv "${T}/test_${test}.py" "${S}"/Lib/test - done - - elog "The following tests have been skipped:" - for test in ${skipped_tests}; do - elog "test_${test}.py" - done - - elog "If you would like to run them, you may:" - elog "cd '${EPREFIX}/usr/lib/python${PYVER}/test'" - elog "and run the tests separately." - - if [[ ${result} -ne 0 ]]; then - die "emake test failed" - fi -} - -src_install() { - local libdir=${ED}/usr/lib/python${PYVER} - - emake DESTDIR="${D}" altinstall - - # Remove static library - rm "${ED}"/usr/$(get_libdir)/libpython*.a || die - - sed \ - -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \ - -e "s/\(PY_LDFLAGS=\).*/\1/" \ - -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed" - - # Fix collisions between different slots of Python. - rm "${ED}/usr/$(get_libdir)/libpython3.so" || die - - # Cheap hack to get version with ABIFLAGS - local abiver=$(cd "${ED}/usr/include"; echo python*) - if [[ ${abiver} != python${PYVER} ]]; then - # Replace python3.X with a symlink to python3.Xm - rm "${ED}/usr/bin/python${PYVER}" || die - dosym "${abiver}" "/usr/bin/python${PYVER}" - # Create python3.X-config symlink - dosym "${abiver}-config" "/usr/bin/python${PYVER}-config" - # Create python-3.5m.pc symlink - dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc" - fi - - # python seems to get rebuilt in src_install (bug 569908) - # Work around it for now. - if has_version dev-libs/libffi[pax_kernel]; then - pax-mark E "${ED}/usr/bin/${abiver}" - else - pax-mark m "${ED}/usr/bin/${abiver}" - fi - - use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die - use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die - - dodoc Misc/{ACKS,HISTORY,NEWS} - - if use examples; then - docinto examples - find Tools -name __pycache__ -exec rm -fr {} + || die - dodoc -r Tools - fi - insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 - local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ - emake --no-print-directory -s -f - 2>/dev/null) - newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py - - newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} - newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} - sed \ - -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ - -e "s:@PYDOC@:pydoc${PYVER}:" \ - -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ - "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" - - local -x EPYTHON=python${PYVER} - # if not using a cross-compiler, use the fresh binary - if ! tc-is-cross-compiler; then - local -x PYTHON=./python - local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD} - else - local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON} - fi - - echo "EPYTHON='${EPYTHON}'" > epython.py || die - python_domodule epython.py - - # python-exec wrapping support - local pymajor=${PYVER%.*} - local scriptdir=${D}$(python_get_scriptdir) - mkdir -p "${scriptdir}" || die - # python and pythonX - ln -s "../../../bin/${abiver}" \ - "${scriptdir}/python${pymajor}" || die - ln -s "python${pymajor}" "${scriptdir}/python" || die - # python-config and pythonX-config - # note: we need to create a wrapper rather than symlinking it due - # to some random dirname(argv[0]) magic performed by python-config - cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die - #!/bin/sh - exec "${abiver}-config" "\${@}" - EOF - chmod +x "${scriptdir}/python${pymajor}-config" || die - ln -s "python${pymajor}-config" \ - "${scriptdir}/python-config" || die - # 2to3, pydoc - ln -s "../../../bin/2to3-${PYVER}" \ - "${scriptdir}/2to3" || die - ln -s "../../../bin/pydoc${PYVER}" \ - "${scriptdir}/pydoc" || die - # idle - if use tk; then - ln -s "../../../bin/idle${PYVER}" \ - "${scriptdir}/idle" || die - fi -} diff --git a/metadata/pkg_desc_index b/metadata/pkg_desc_index index 0425a275..ac49f38b 100644 --- a/metadata/pkg_desc_index +++ b/metadata/pkg_desc_index @@ -1,4 +1,3 @@ -dev-lang/python 2.7.15-r1 3.4.8-r2 3.5.5-r2 3.6.6-r1 3.7.0-r1: An interpreted, interactive, object-oriented programming language media-libs/x264 0.0.20170701-r1: A free library for encoding X264/AVC streams media-video/x264-encoder 0.0.20170701-r1: A free commandline encoder for X264/AVC streams sys-config/ltoize 0.8.1 0.8.2 0.9.0: A configuration for portage to make building with LTO easy. diff --git a/sys-config/ltoize/files/bashrc.d/43-lto-no-common.sh b/sys-config/ltoize/files/bashrc.d/43-lto-no-common.sh deleted file mode 100644 index 203af9eb..00000000 --- a/sys-config/ltoize/files/bashrc.d/43-lto-no-common.sh +++ /dev/null @@ -1,16 +0,0 @@ -#From #484, contributed by nivedita76 and pchome, needed for some packages that have a weird libtool setup. -#Essentially, these two variables don't get set properly when `-flto` and `-fno-common` are used together. -#This is a hack to set them ourselves. Define NOCOMMON_OVERRIDE_LIBTOOL=yes to activate it per-package or globally -#via make.conf. - -nocommon_configure() { - if [[ "${NOCOMMON_OVERRIDE_LIBTOOL}" == "yes" ]]; then - ewarn "lto-overlay: libtool global_symbol_pipe and global_symbol_to_cdecl OVERRIDDEN" - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p' | sed '/ __gnu_lto/d'" - export lt_cv_sys_global_symbol_pipe - lt_cv_sys_global_symbol_to_cdecl="" - export lt_cv_sys_global_symbol_to_cdecl - fi -} - -BashrcdPhase configure nocommon_configure diff --git a/sys-config/ltoize/files/make.conf.lto b/sys-config/ltoize/files/make.conf.lto index 9bb6e106..dd1d0b45 100644 --- a/sys-config/ltoize/files/make.conf.lto +++ b/sys-config/ltoize/files/make.conf.lto @@ -75,4 +75,6 @@ source /etc/portage/make.conf.lto.defines #Thanks to issue #49, no action necessary for preventing stripping of static libraries -CFLAGS="-O3 ${GRAPHITE} ${DEVIRTLTO} ${IPAPTA} ${SEMINTERPOS} ${FLTO} -fuse-linker-plugin" +USE="lto pgo" +LTO_ENABLE_FLAGOMATIC=yes +CFLAGS="-O3 ${GRAPHITE} ${DEVIRTLTO} ${IPAPTA} ${SEMINTERPOS} ${FLTO} ${LTO_WARNING_FLAGS} -fuse-linker-plugin" diff --git a/sys-config/ltoize/files/make.conf.lto.defines b/sys-config/ltoize/files/make.conf.lto.defines index 5b7193ef..a33fe45c 100644 --- a/sys-config/ltoize/files/make.conf.lto.defines +++ b/sys-config/ltoize/files/make.conf.lto.defines @@ -42,12 +42,6 @@ SEMINTERPOS="-fno-semantic-interposition" #Similarly if interposition happens for variables, the constructor of the variable will be the same. #The flag has no effect for functions explicitly declared inline (where it is never allowed for interposition to change semantics) and for symbols explicitly declared weak. -NOCOMMON="-fno-common" - -# This option only affects C code. Only non-conformant C code needs -fcommon, which is enabled by default. Clear Linux leaves this flag off by default. -# This is enabled by default with GCC 10 and is kept here only for documentation purposes. Use `-fcommon` to restore -# GCC 9.x behaviour and below. - SAFEST_FAST_MATH="-fno-math-errno -fno-trapping-math" SAFER_UNSAFE_MATH_OPTS="-fno-signed-zeros -fno-trapping-math -fassociative-math -freciprocal-math" SAFER_FAST_MATH="${SAFER_UNSAFE_MATH_OPTS} -fno-math-errno -ffinite-math-only -fno-rounding-math -fno-signaling-nans -fcx-limited-range -fexcess-precision=fast" @@ -61,8 +55,8 @@ DEVIRTLTO="-fdevirtualize-at-ltrans" #This allows GCC to perform devirtualization across object file boundaries using LTO. -NOPLT="-fno-plt" +LTO_WARNING_FLAGS="-Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing" -#This option omits the PLT from the executable, making calls go through the GOT directly. -#It inhibits lazy binding, so this is not enabled by default. If you use prelink, this is -#strictly better than lazy binding. +# These warnings indicate likely runtime problems with LTO, so promote them +# to errors. If a package fails to build with these, LTO should not be used there. +# See here for more: https://wiki.gentoo.org/wiki/LTO diff --git a/sys-config/ltoize/files/package.cflags/clang.conf b/sys-config/ltoize/files/package.cflags/clang.conf index 7cc8bec4..ba4b804c 100644 --- a/sys-config/ltoize/files/package.cflags/clang.conf +++ b/sys-config/ltoize/files/package.cflags/clang.conf @@ -1,16 +1,8 @@ # BEGIN: Workarounds for LTO with Clang -dev-lang/python *FLAGS-=-flto* # https://bugs.gentoo.org/700012 : No -ffat-lto-objects on clang -dev-libs/libffi *FLAGS-=-flto* # error: changed section flags for .eh_frame https://github.com/libffi/libffi/issues/626 (abi_x86_32) -dev-util/colm *FLAGS-=-flto* # ld: libcolm.a: error adding symbols: file format not recognized -media-libs/dav1d *FLAGS-=-flto* # general protection fault https://code.videolan.org/videolan/dav1d/-/issues/362 ->=app-office/libreoffice-7.1.2.2 "has clang ${IUSE//+} && use clang && NOLDADD=1" "has clang ${IUSE//+} && use clang && has custom-cflags ${IUSE//+} && use custom-cflags && FlagSubAllFlags ${GRAPHITE} ${DEVIRTLTO} ${IPAPTA} ${FLTO} -fuse-linker-plugin" # fails to configure, see issue #734 # END: Workarounds for LTO with Clang # BEGIN: Packages which require Full LTO -media-libs/libglvnd LTO_FULL=1 # ld.lld: error: undefined symbol: entrypointFunctions # END: Packages which require Full LTO # BEGIN: Packages which require libstdc++ -media-libs/exempi CXXFLAGS+=-stdlib=libstdc++ # fatal error: 'tr1/memory' file not found -net-libs/webkit-gtk CXXFLAGS+=-stdlib=libstdc++ # error: use of undeclared identifier 'LC_ALL' # END: Packages which require libstdc++ diff --git a/sys-config/ltoize/files/package.cflags/cmake-makefile.conf b/sys-config/ltoize/files/package.cflags/cmake-makefile.conf index 911945b0..2237e4fa 100644 --- a/sys-config/ltoize/files/package.cflags/cmake-makefile.conf +++ b/sys-config/ltoize/files/package.cflags/cmake-makefile.conf @@ -1,7 +1,2 @@ # BEGIN: Will not build with ninja -app-doc/doxygen CMAKE_MAKEFILE_GENERATOR=emake -dev-lang/swi-prolog CMAKE_MAKEFILE_GENERATOR=emake -games-arcade/supertux CMAKE_MAKEFILE_GENERATOR=emake -media-libs/musicbrainz CMAKE_MAKEFILE_GENERATOR=emake -x11-misc/polybar CMAKE_MAKEFILE_GENERATOR=emake # END: Will not build with ninja diff --git a/sys-config/ltoize/files/package.cflags/devirtualize-at-ltrans.conf b/sys-config/ltoize/files/package.cflags/devirtualize-at-ltrans.conf index c024089c..cd1ff35f 100644 --- a/sys-config/ltoize/files/package.cflags/devirtualize-at-ltrans.conf +++ b/sys-config/ltoize/files/package.cflags/devirtualize-at-ltrans.conf @@ -1,3 +1,3 @@ # BEGIN: -fdevirtualize-at-ltrans workarounds -app-text/lcdf-typetools *FLAGS-="-fdevirtualize-at-ltrans" # ICE on static-var pass +sys-devel/binutils *FLAGS-="${DEVIRTLTO}" # tests fail when present # END: -fdevirtualize-at-ltrans workarounds diff --git a/sys-config/ltoize/files/package.cflags/flag-o-matic.conf b/sys-config/ltoize/files/package.cflags/flag-o-matic.conf index a16daf1a..de336b89 100644 --- a/sys-config/ltoize/files/package.cflags/flag-o-matic.conf +++ b/sys-config/ltoize/files/package.cflags/flag-o-matic.conf @@ -1,34 +1,3 @@ # BEGIN: override-flagomatic workarounds -app-crypt/johntheripper-jumbo LTO_ENABLE_FLAGOMATIC=yes -app-crypt/johntheripper LTO_ENABLE_FLAGOMATIC=yes -app-emulation/hercules LTO_ENABLE_FLAGOMATIC=yes -app-emulation/wine-any LTO_ENABLE_FLAGOMATIC=yes -app-emulation/wine-d3d9 LTO_ENABLE_FLAGOMATIC=yes -app-emulation/wine-staging LTO_ENABLE_FLAGOMATIC=yes -app-emulation/wine-vanilla LTO_ENABLE_FLAGOMATIC=yes -app-emulation/xen LTO_ENABLE_FLAGOMATIC=yes -app-emulation/xen-pvgrub LTO_ENABLE_FLAGOMATIC=yes -app-emulation/xen-tools LTO_ENABLE_FLAGOMATIC=yes -dev-lang/ghc LTO_ENABLE_FLAGOMATIC=yes -dev-lang/gnat-gpl LTO_ENABLE_FLAGOMATIC=yes -dev-libs/klibc LTO_ENABLE_FLAGOMATIC=yes -dev-libs/openssl LTO_ENABLE_FLAGOMATIC=yes -dev-util/electron LTO_ENABLE_FLAGOMATIC=yes -games-emulation/zsnes LTO_ENABLE_FLAGOMATIC=yes -media-libs/libsdl LTO_ENABLE_FLAGOMATIC=yes -media-video/libav LTO_ENABLE_FLAGOMATIC=yes -media-video/x264-encoder LTO_ENABLE_FLAGOMATIC=yes -sci-biology/shrimp LTO_ENABLE_FLAGOMATIC=yes -sci-biology/unafold LTO_ENABLE_FLAGOMATIC=yes -sci-chemistry/tm-align LTO_ENABLE_FLAGOMATIC=yes -sys-boot/refind LTO_ENABLE_FLAGOMATIC=yes # USE='custom-cflags' currently masked by profile -sys-boot/syslinux LTO_ENABLE_FLAGOMATIC=yes -sys-boot/tboot LTO_ENABLE_FLAGOMATIC=yes -sys-devel/gcc LTO_ENABLE_FLAGOMATIC=yes # Build system requires special attention, use BOOT_CFLAGS to inject flags. Do not inject -flto, use the USE flag to do this. -sys-fs/zfs-kmod LTO_ENABLE_FLAGOMATIC=yes -sys-fs/zfs LTO_ENABLE_FLAGOMATIC=yes -sys-kernel/spl LTO_ENABLE_FLAGOMATIC=yes -www-client/chromium LTO_ENABLE_FLAGOMATIC=yes -www-client/firefox LTO_ENABLE_FLAGOMATIC=yes # The ebuild does respect your CFLAGS, it just does some messing around for enabling -flto and -O3. -www-client/torbrowser LTO_ENABLE_FLAGOMATIC=yes +sys-devel/binutils LTO_ENABLE_FLAGOMATIC=no # needed to enable graphite and ipa-pta # END: override-flagomatic workarounds diff --git a/sys-config/ltoize/files/package.cflags/graphite.conf b/sys-config/ltoize/files/package.cflags/graphite.conf index e7f570c8..0e9f4b66 100644 --- a/sys-config/ltoize/files/package.cflags/graphite.conf +++ b/sys-config/ltoize/files/package.cflags/graphite.conf @@ -1,4 +1,7 @@ # BEGIN: Graphite ICE (Internal Compiler Error) # Report them to the GCC team -sci-visualization/paraview *FLAGS-="${GRAPHITE}" # Removing Graphite optimizations allows build to complete with sane memory usage for --jobs > 1 # END: Graphite ICE (Internal Compiler Error) + +# BEGIN: Graphite Test failures +media-libs/openh264 *FLAGS-="${GRAPHITE}" +# END: Graphite Test failures diff --git a/sys-config/ltoize/files/package.cflags/ipa-pta.conf b/sys-config/ltoize/files/package.cflags/ipa-pta.conf index 19bf6bb3..f82d7bab 100644 --- a/sys-config/ltoize/files/package.cflags/ipa-pta.conf +++ b/sys-config/ltoize/files/package.cflags/ipa-pta.conf @@ -1,29 +1,5 @@ # BEGIN: -fipa-pta workarounds -www-client/firefox *FLAGS-="${IPAPTA}" #ICE on -fipa-pta -www-client/torbrowser *FLAGS-="${IPAPTA}" #ICE on -fipa-pta -=sys-apps/gawk-4.1.4 *FLAGS-="${IPAPTA}" # during IPA pass: pta lto1: internal compiler error: Segmentation fault -dev-qt/qtwebkit *FLAGS-="${IPAPTA}" -dev-lang/R *FLAGS-="${IPAPTA}" # during IPA pass: pta lto1: internal compiler error: Segmentation fault -sys-devel/gcc *FLAGS-="${IPAPTA}" -dev-lang/duktape *FLAGS-="${IPAPTA}" # fixes polkit from musl overlay not starting -dev-lang/gnat-gpl *FLAGS-="${IPAPTA}" -dev-lang/php *FLAGS-="${IPAPTA}" # Segfaults when compiled with -fipa-pta -dev-lisp/sbcl *FLAGS-="${IPAPTA}" #ICE on -fipa-pta -x11-wm/bspwm *FLAGS-="${IPAPTA}" # needed for version 0.9.7 on 17.0 profile running the testing branch everywhere with GCC 8.3.0 -media-libs/libwebp *FLAGS-="${IPAPTA}" # no compilation issues, but -fipa-pta causes webp images to be displayed incorrectly -dev-qt/qtgui *FLAGS-="${IPAPTA}" # Same problem as above -dev-db/mongodb *FLAGS-="${IPAPTA}" # ICE with -fipa-pta -dev-lang/ocaml *FLAGS-="${IPAPTA}" # ICE during IPA pass: pta in lto1: Segmentation fault -app-emulation/libvirt *FLAGS-="${IPAPTA}" # Segmentation fault when starting libvirtd -dev-python/libvirt-python *FLAGS-="${IPAPTA}" # Test failure -dev-db/postgresql *FLAGS-="${IPAPTA}" # Test failure -dev-libs/protobuf *FLAGS-="${IPAPTA}" # Test failure -media-video/ffmpeg *FLAGS-="${IPAPTA}" # Test failure -sys-devel/clang *FLAGS-="${IPAPTA}" # Test failure -net-p2p/monero *FLAGS-="${IPAPTA}" # ICE with -fipa-pta -mail-client/thunderbird *FLAGS-="${IPAPTA}" # ICE with GCC 10.2.0 (seen with thunderbird 68.12.0) ->=dev-lang/spidermonkey-78.3.1 *FLAGS-="${IPAPTA}" # Segfault during build with GCC 10.2.0 ->=media-libs/mesa-21.1.0 *FLAGS-="${IPAPTA}" # Segfault with vulkan -x11-base/xwayland *FLAGS-="${IPAPTA}" # SIGABRT when querying for GLX information ->=dev-vcs/git-2.32.0 *FLAGS-="${IPAPTA}" # Segfault in git fetch with GCC < 11.3.0 +dev-cpp/abseil-cpp *FLAGS-="${IPAPTA}" # builds hang (or are very slow) when this is enabled +sys-devel/llvm *FLAGS-="${IPAPTA}" # llvm tests fail when this is enabled +x11-base/xorg-server *FLAGS-="${IPAPTA}" # causes downstream tests to fail # END: -fipa-pta workarounds diff --git a/sys-config/ltoize/files/package.cflags/lto.conf b/sys-config/ltoize/files/package.cflags/lto.conf index 10bdf0e0..add40190 100644 --- a/sys-config/ltoize/files/package.cflags/lto.conf +++ b/sys-config/ltoize/files/package.cflags/lto.conf @@ -1,180 +1,46 @@ # BEGIN: lto # Packages which cannot be built with LTO at all -app-admin/keepassxc *FLAGS-=-flto* # segfaults on start since Qt 5.15.1 -app-emulation/dosemu *FLAGS-=-flto* # Issue #163 -app-emulation/libguestfs *FLAGS-=-flto* -app-emulation/libpod *FLAGS-=-flto* -app-emulation/qemu *FLAGS-=-flto* *FLAGS+=-fno-strict-aliasing # required to compile qemu -app-emulation/virtualbox-extpack-oracle *FLAGS-=-flto* -app-emulation/virtualbox *FLAGS-=-flto* -app-emulation/wine* *FLAGS-=-flto* -app-office/gnucash *FLAGS-=-flto* # error: type ‘struct _iterate’ violates the C++ One Definition Rule [-Werror=odr] -app-office/libreoffice "has firebird ${IUSE//+} && use firebird && FlagSubAllFlags -flto*" -app-office/scribus *FLAGS-=-flto* # Scribus crashes on startup if compiled with LTO -=dev-lang/php-7.2.0 *FLAGS-=-flto* # lto-wrapper link failure / https://github.com/InBetweenNames/gentooLTO/issues/135 -dev-lang/rust *FLAGS-=-flto* -dev-lang/spidermonkey *FLAGS-=-flto* -dev-libs/elfutils *FLAGS-=-flto* -dev-libs/intel-neo *FLAGS-=-flto* # error: violates the C++ One Definition Rule [-Werror=odr] -dev-libs/libbpf *FLAGS-=-flto* # lto-wrapper link failure -dev-libs/libsigsegv *FLAGS-=-flto* # Issue #189 -dev-libs/weston *FLAGS-=-flto* -dev-python/libvirt-python *FLAGS-=-flto* # ICE with GCC 10.2.0 -dev-qt/qtwebkit *FLAGS-=-flto* -dev-scheme/guile *FLAGS-=-flto* # Issue #193 -dev-scheme/racket *FLAGS-=-flto* *FLAGS-="${IPAPTA}" # Undefined references and multiple segfaults / violations during build. -dev-tex/chktex "use pcre && FlagSubAllFlags -flto*" # Segmentation faults as libpcre doesn't get linked-in properly -dev-util/github-cli *FLAGS-=-flto* -dev-util/perf *FLAGS-=-flto* -dev-util/radare2 *FLAGS-=-flto* # ICE in IPA pass -dev-util/valgrind *FLAGS-=-flto* -dev-vcs/cvs *FLAGS-=-flto* # Undefined references -games-action/extreme-tuxracer *FLAGS-=-flto* -games-emulation/mupen64plus-libretro *FLAGS-=-flto* -games-emulation/parallel-n64-libretro *FLAGS-=-flto* -gnome-base/gnome-keyring *FLAGS-=-flto* -gnustep-base/gnustep-make *FLAGS-=-flto* # Issue #581, tools to build gnustep-base/gnustep-base, if built with LTO doesn't build gnustep code -kde-apps/kdenlive *FLAGS-=-flto* -kde-frameworks/kjs *FLAGS-=-flto* # Issue #181 -mail-filter/procmail *FLAGS-=-flto* # Causes compile to hang indefinitely -media-gfx/shotwell *FLAGS-=-flto* #Library search error with LTO enabled -media-libs/alsa-lib *FLAGS-=-flto* -media-libs/dav1d *FLAGS-=-flto* # Starting with GCC 11.1.0, various undefined reference errors during linking -media-libs/mlt *FLAGS-=-flto* -media-sound/pulseaudio *FLAGS-=-flto* -media-video/ffmpeg *FLAGS-=-flto* #NOTE: Depending on your CPUFLAGS this may work with LTO. The SSE intrinsics seem to cause problems in some cases. Only x86 requires workaround -media-video/mplayer *FLAGS-=-flto* -net-analyzer/wireshark *FLAGS-=-flto* # Segfaults trying to load GUI on QT5, see issue 746 -net-libs/nodejs *FLAGS-=-flto* # LTO is controlled by a USE flag; currently won't build with LTO and GCC 11 -net-libs/webkit-gtk:3 *FLAGS-=-flto* -net-libs/webkit-gtk:4 *FLAGS-=-flto* -net-misc/autossh *FLAGS-=-flto* # Undefined references -net-misc/dhcp "has server ${IUSE//+} && use server && FlagSubAllFlags -flto*" # Cannot be built with LTO by default, but can if "server" USE is disabled -net-misc/lksctp-tools *FLAGS-=-flto* # function `main': :(.text.startup+0x16de): undefined reference to `sctp_connectx' -net-misc/nextcloud-client *FLAGS-="-flto"* # Segfaults at start with libQt5Core.so -net-misc/nx *FLAGS-=-flto* # ODR violation during compilation -net-news/newsboat *FLAGS-=-flto* # Fails to build with LTO -net-p2p/cpuminer-opt *FLAGS-=-flto* -net-p2p/retroshare *FLAGS-=-flto* # Issue #129, ICE on amd64 -net-wireless/aircrack-ng *FLAGS-=-flto* -sci-electronics/kicad *FLAGS-=-flto* # Issue #168 -sci-libs/arrayfire *FLAGS-=-flto* -sci-libs/scipy *FLAGS-=-flto* -sys-apps/acl *FLAGS-=-flto* # Issue #209, builds fine but we cannot set any acl value using the program. -sys-apps/fakechroot *FLAGS-=-flto* # "Cgraph edge statement index out of range" error when linking with LTO enabled -sys-apps/fwupd *FLAGS-=-flto* # Issue #225, LTO causes runtime failures -sys-apps/man-db *FLAGS-=-flto* # Issue #403, LTO causes runtime failures -sys-apps/nix *FLAGS-=-flto* # Issue #222, LTO causes runtime failures -sys-cluster/ceph *FLAGS-=-flto* # linking error during compilation -sys-cluster/glusterfs *FLAGS-=-flto* # undefined reference to `glfs_subvol_done' -sys-devel/clang *FLAGS-=-flto* # Issue #619 Same as above -sys-devel/gdb *FLAGS-=-flto* -sys-devel/llvm *FLAGS-=-flto* # Issue #619 temporarily disabled for now due to build errors -sys-fabric/libibverbs *FLAGS-=-flto* # Issue #506, Undefined references -sys-fs/fuse-common *FLAGS-=-flto* -sys-fs/fuse *FLAGS-=-flto* # Issue #139 and #142, it appears the symbol __fuse_read_cmd goes missing if LTO is enabled, causing linking problems on some systems. Using gold seems to help. -sys-libs/glibc *FLAGS-=-flto* #Alternative: *FLAGS+=-ffat-lto-objects *FLAGS-="${IPAPTA}" Fails in configure stage with LTO enabled, checking for builtin redirect. With -ffat-lto-objects, and no -fipa-pta, we get further, but get multiple definition errors Forcing past that yields undefined symbol errors. -sys-libs/libcxxabi *FLAGS-=-flto* # /var/tmp/portage/sys-libs/libcxxabi-4.0.1/temp/ccXYODmk.ltrans0.ltrans.o::DW.ref.__gcc_personality_v0: error: undefined reference to '__gcc_personality_v0' -sys-libs/libomp *FLAGS-=-flto* # Issue #619 libomp-11.0.0_rc4 fails to build with LTO -sys-libs/libselinux *FLAGS-=-flto* -sys-libs/libsemanage *FLAGS-=-flto* -sys-libs/libsepol *FLAGS-=-flto* -sys-libs/musl *FLAGS-=-flto* -sys-process/criu *FLAGS-=-pipe* *FLAGS-=-flto* *FLAGS-="-fuse-linker-plugin" LDFLAGS-="-Wl,--hash-style=gnu" *FLAGS-="${GRAPHITE}" # Fewer settings may be possible. Needs testing. (Dependency of LXC.) -sys-process/numactl *FLAGS-=-flto* # Undefined references -www-apps/hugo *FLAGS-=-flto* -www-misc/shellinabox *FLAGS-=-flto* -x11-base/xorg-server *FLAGS-=-flto* # linking error during compilation -x11-drivers/xf86-video-intel *FLAGS-=-flto* +app-text/texlive-core *FLAGS-="-flto*" # fails to compile due to lto-type-mismatch error +dev-build/autoconf *FLAGS-="-flto*" # AC_DECL_YYTEXT test fails when LTO is enabled +dev-cpp/abseil-cpp *FLAGS-="-flto*" # fails to compile with lto +dev-libs/libev *FLAGS-="-flto*" # fails to compile due to strict-aliasing error +dev-python/numpy *FLAGS-="-flto*" # fails to compile due to lto-type-mismatch error +dev-scheme/guile *FLAGS-="-flto*" # tests fail if built with LTO +dev-util/colm *FLAGS-="-flto*" # fails to compile due to lto-type-mismatch error +dev-util/gperf *FLAGS-="-flto*" # fails to compile due to strict-aliasing error +media-gfx/graphite2 *FLAGS-="-flto*" # fails to compile due to odr error +media-video/ffmpeg *FLAGS-="-flto*" # fails to compile due to lto-type-mismatch error +net-misc/networkmanager *FLAGS-="-flto*" # test failure in a linker script +net-wireless/bluez *FLAGS-="-flto*" # test fail when LTO is enabled +sci-libs/lapack *FLAGS-="-flto*" # fails to compile due to lto-type-mismatch error +sys-libs/gpm *FLAGS-="-flto*" # fails to compile due to lto-type-mismatch error +sys-libs/slang *FLAGS-="-flto*" # fails to compile due to strict-aliasing error # END: lto # BEGIN: ffat-lto-objects # Packages which require fat LTO objects in order to build (TESTING: STRIP_MASK) or which others depend on non-LTO symbols -app-crypt/efitools *FLAGS+=-ffat-lto-objects # textrel? -app-editors/vim "has perl ${IUSE//+} && use perl && FlagAddAllFlags -ffat-lto-objects" # required for perl USE flag -dev-haskell/* *FLAGS+=-ffat-lto-objects #This is so non-portage GHC compilations work, as GHC is oblivious to LTO. portage builds are fine. -dev-lang/moarvm *FLAGS+=-ffat-lto-objects # required for perl6 (i.e., dev-lang/nqp and dev-lang/rakudo to build) -dev-util/cargo *FLAGS+=-ffat-lto-objects # fails to link against git2 functions without -dev-util/cargo-c *FLAGS+=-ffat-lto-objects # fails to link against ssh functions without -dev-util/sccache *FLAGS+=-ffat-lto-objects # fails to link -media-libs/libvpx *FLAGS+=-ffat-lto-objects # Test failure -net-libs/quiche *FLAGS+=-ffat-lto-objects # relocation R_X86_64_PC32 against undefined hidden symbol `GFp_ia32cap_P' can not be used when making a shared object -sci-libs/mpir *FLAGS+=-ffat-lto-objects # compilation error without fat LTO (not linking error) -sys-apps/bat *FLAGS+=-ffat-lto-objects # fails to link against git2 functions -sys-apps/exa *FLAGS+=-ffat-lto-objects # fails to link against git2 functions -sys-boot/syslinux *FLAGS+=-ffat-lto-objects #Requires ld.bfd -sys-libs/libosinfo *FLAGS+=-ffat-lto-objects # Causes virt-manager to segfault when opening VM window. May be related to GCC 11. Seen with 1.9.0 -sys-power/nut *FLAGS+=-ffat-lto-objects # fails during configure otherwise -x11-terms/alacritty *FLAGS+=-ffat-lto-objects +dev-build/libtool *FLAGS+=-ffat-lto-objects # Used by fedora # END: ffat-lto-objects -# BEGIN: -flto-partition=none workarounds -=sys-libs/efivar-37 *FLAGS+="-flto-partition=none" -# END: -flto-partition=none workarounds - # BEGIN: LTO not recommended # Packages which can be built with LTO but leads to problems/crashes/segfaults -app-cdr/cdrtools *FLAGS-=-flto* # SCSI buffer size 0 when attempting to burn disc, reports "Unknown error 64512" -app-crypt/gcr *FLAGS-=-flto* # Test failure -dev-lang/ruby *FLAGS-=-flto* # Test failure -dev-libs/folks *FLAGS-=-flto* # Programs which depend on folks fail to launch, https://gitlab.gnome.org/GNOME/folks/-/issues/123 ->=dev-libs/gjs-1.66.1 *FLAGS-=-flto* # generates general protection fault when starting up gnome -dev-libs/libaio *FLAGS-=-flto* # Issue #314, missing symbols in LTO build compared to non-LTO build, leads to problems with sys-fs/lvm2 -dev-libs/libbsd *FLAGS-=-flto* # Undefined symbol error when building mail-client/mailx -dev-libs/libpcre *FLAGS-=-flto* # Test failure -dev-libs/protobuf *FLAGS-=-flto* #Upstream bug https://github.com/protocolbuffers/protobuf/issues/4958 -dev-libs/rocr-runtime *FLAGS-=-flto* # Causes crashes in multiple OpenCL tools -dev-qt/qtscript *FLAGS-=-flto* #LTO patch exists, but crashes on newer Qt versions. Needs to be updated. -dev-scheme/gambit *FLAGS-=-flto* # Runtime errors when gsc when built with LTO on > GCC 8 -media-libs/mesa "has video_cards_i965 ${IUSE//+} && use video_cards_i965 && FlagSubAllFlags -flto*" -media-sound/jack2 *FLAGS-=-flto* # segfault in libjack.so.0.1.0 when ANY app trying to use it (breaks everithing built w/ JACK support) -net-misc/networkmanager *FLAGS-=-flto* # Test failure -net-misc/openssh *FLAGS-=-flto* # hangs on exit with lto -net-news/rssguard *FLAGS-=-flto* # https://bugreports.qt.io/browse/QTBUG-41301 and https://github.com/martinrotter/rssguard/issues/156 -net-proxy/privoxy *FLAGS-=-flto* #Issue #145, service will not start when built with LTO -sci-libs/tensorflow *FLAGS-=-flto* # Issue #432 tensorflow-estimator fails with missing symbol __cpu_model -sci-misc/boinc *FLAGS-=-flto* # buffer overflow when starting boinc_client -sys-apps/apparmor *FLAGS-=-flto* # Issue #299, ODR violation, still builds and runs on some configurations ->=sys-apps/attr-2.4.48 *FLAGS-=-flto* # Issue #268, causes segfaults all over the system -sys-apps/sandbox *FLAGS-=-flto* # Issue #347, LTO breaks basic sandboxing functionality -sys-fs/cryfs *FLAGS-=-flto* # Test failure -sys-libs/libapparmor *FLAGS-=-flto* # Undefined symbol error when trying to compile sys-apps/apparmor -sys-libs/libxcrypt *FLAGS-=-flto* # Undefined symbols in library files cause dependencies like net-misc/whois to fail to build -app-misc/openrgb *FLAGS-=-flto* # Segmentation fault on launch # END: LTO not recommended # BEGIN: Build Workarounds # Packages which require build workarounds to be built with LTO that can be resolved directly in *FLAGS -dev-lisp/clisp *FLAGS+=-falign-functions # Issue #128. Function alignment problem. -kde-apps/dolphin *FLAGS-="-Wl,--as-needed" # ( https://github.com/InBetweenNames/gentooLTO/issues/50 ) -media-libs/ilmbase *FLAGS+=-lrt # needed for linker to build media-libs/openexr with LTO -media-video/aegisub NOLDADD=1 C*FLAGS-="-Wl,*" # does not build when -Wl linker flags are passed to the compiler through C*FLAGS -net-mail/mailutils "has ldap ${IUSE//+} && use ldap && FlagAdd LDFLAGS -llber" #With LTO, this dependency must be linked in explicitly to resolve undefined reference errors "ber_memvfree" and so on -sys-devel/gettext *FLAGS+=-lm # needed for linker to resolve libm's log10 -- only needed for LTO -sys-libs/ncurses-compat *FLAGS-=-Wl,--as-needed *FLAGS+=-ldl # checking whether able to link to dl*() functions... configure: error: Cannot link test program for libdl (#111) -sys-libs/ncurses *FLAGS-=-Wl,--as-needed *FLAGS+=-ldl # checking whether able to link to dl*() functions... configure: error: Cannot link test program for libdl (#111) -sys-power/thermald *FLAGS+=-Wl,--no-fatal-warnings *FLAGS+=-Wno-error -x11-libs/wxGTK NOLDADD=1 C*FLAGS-="-Wl,*" # Issue #40, does not build when -Wl linker flags are passed to the compiler through C*FLAGS +sys-devel/binutils *FLAGS-="-flto*" # package handles its own LTO and setting it here breaks that # END: Build Workarounds +# BEGIN: LTO_WARNING_FLAGS workarounds +app-text/texlive-core *FLAGS-="-Werror=strict-aliasing" # fails to compile due to strict-aliasing error +dev-build/libtool *FLAGS-=-Werror=lto-type-mismatch # test fail if this flag is left enabled +dev-db/sqlite *FLAGS-="-Werror=lto-type-mismatch" # Tests fail with this flag but the package compiles fine +dev-libs/icu *FLAGS-="-Werror=odr" # Tests fail with this flag but the package compiles fine +dev-libs/libev *FLAGS-="-Werror=strict-aliasing" # fails to compile due to strict-aliasing error +dev-libs/nspr *FLAGS-="-Werror=strict-aliasing" # Tests fail with this flag but the package compiles fine +dev-util/gperf *FLAGS-="-Werror=strict-aliasing" # fails to compile due to strict-aliasing error +sys-libs/slang *FLAGS-="-Werror=strict-aliasing" # fails to compile due to strict-aliasing error +# END: LTO_WARNING_FLAGS workarounds + # BEGIN: Misc Workarounds -dev-lang/ruby *FLAGS+=-fno-strict-aliasing # No build or runtime failures, but recommended by the package to avoid incorrect optimizations -sys-libs/compiler-rt-sanitizers *FLAGS+=-Wno-unused-command-line-argument # Test failure # END: Misc Workarounds diff --git a/sys-config/ltoize/files/package.cflags/no-common-libtool.conf b/sys-config/ltoize/files/package.cflags/no-common-libtool.conf deleted file mode 100644 index 4753fd26..00000000 --- a/sys-config/ltoize/files/package.cflags/no-common-libtool.conf +++ /dev/null @@ -1,50 +0,0 @@ -# BEGIN: -fno-common libtool hack workarounds (#484) -app-crypt/libsecret NOCOMMON_OVERRIDE_LIBTOOL=yes -app-crypt/p11-kit NOCOMMON_OVERRIDE_LIBTOOL=yes -app-text/enchant NOCOMMON_OVERRIDE_LIBTOOL=yes -app-text/evince NOCOMMON_OVERRIDE_LIBTOOL=yes -dev-libs/dbus-glib NOCOMMON_OVERRIDE_LIBTOOL=yes -dev-libs/ffcall NOCOMMON_OVERRIDE_LIBTOOL=yes -dev-libs/fribidi NOCOMMON_OVERRIDE_LIBTOOL=yes -dev-libs/jansson NOCOMMON_OVERRIDE_LIBTOOL=yes -dev-libs/libappindicator NOCOMMON_OVERRIDE_LIBTOOL=yes -dev-libs/libatasmart NOCOMMON_OVERRIDE_LIBTOOL=yes -dev-libs/libdbusmenu NOCOMMON_OVERRIDE_LIBTOOL=yes -dev-libs/libindicator NOCOMMON_OVERRIDE_LIBTOOL=yes -dev-libs/libmspack NOCOMMON_OVERRIDE_LIBTOOL=yes -dev-libs/libpipeline NOCOMMON_OVERRIDE_LIBTOOL=yes -dev-python/dbus-python NOCOMMON_OVERRIDE_LIBTOOL=yes -dev-python/notify-python NOCOMMON_OVERRIDE_LIBTOOL=yes -dev-util/umockdev NOCOMMON_OVERRIDE_LIBTOOL=yes -gnome-base/gconf NOCOMMON_OVERRIDE_LIBTOOL=yes -gnome-base/libglade NOCOMMON_OVERRIDE_LIBTOOL=yes -gnome-base/libgnome-keyring NOCOMMON_OVERRIDE_LIBTOOL=yes -gnome-base/librsvg NOCOMMON_OVERRIDE_LIBTOOL=yes -lxde-base/menu-cache NOCOMMON_OVERRIDE_LIBTOOL=yes -media-gfx/imagemagick NOCOMMON_OVERRIDE_LIBTOOL=yes -media-gfx/ttfautohint NOCOMMON_OVERRIDE_LIBTOOL=yes -media-libs/glu NOCOMMON_OVERRIDE_LIBTOOL=yes -media-libs/libdvdnav NOCOMMON_OVERRIDE_LIBTOOL=yes -media-libs/libdvdread NOCOMMON_OVERRIDE_LIBTOOL=yes -media-plugins/gst-plugins-libav NOCOMMON_OVERRIDE_LIBTOOL=yes -media-plugins/gst-plugins-vaapi NOCOMMON_OVERRIDE_LIBTOOL=yes -media-sound/mpg123 NOCOMMON_OVERRIDE_LIBTOOL=yes -media-sound/sox NOCOMMON_OVERRIDE_LIBTOOL=yes -media-sound/wavpack NOCOMMON_OVERRIDE_LIBTOOL=yes -media-video/vlc NOCOMMON_OVERRIDE_LIBTOOL=yes -net-libs/libmbim NOCOMMON_OVERRIDE_LIBTOOL=yes -net-misc/curl NOCOMMON_OVERRIDE_LIBTOOL=yes -net-misc/modemmanager NOCOMMON_OVERRIDE_LIBTOOL=yes -sys-apps/accountsservice NOCOMMON_OVERRIDE_LIBTOOL=yes -sys-apps/usbredir NOCOMMON_OVERRIDE_LIBTOOL=yes -sys-auth/polkit NOCOMMON_OVERRIDE_LIBTOOL=yes -sys-boot/plymouth NOCOMMON_OVERRIDE_LIBTOOL=yes -sys-devel/gettext NOCOMMON_OVERRIDE_LIBTOOL=yes -sys-fs/udisks NOCOMMON_OVERRIDE_LIBTOOL=yes -sys-power/upower NOCOMMON_OVERRIDE_LIBTOOL=yes -x11-libs/libfm NOCOMMON_OVERRIDE_LIBTOOL=yes -x11-libs/libfm-extra NOCOMMON_OVERRIDE_LIBTOOL=yes -x11-libs/pango NOCOMMON_OVERRIDE_LIBTOOL=yes -x11-libs/xcb-util-cursor NOCOMMON_OVERRIDE_LIBTOOL=yes -x11-libs/xcb-util-xrm NOCOMMON_OVERRIDE_LIBTOOL=yes -# END: -fno-common libtool hack workarounds (#484) NOCOMMON_OVERRIDE_LIBTOOL=yes diff --git a/sys-config/ltoize/files/package.cflags/no-common.conf b/sys-config/ltoize/files/package.cflags/no-common.conf deleted file mode 100644 index ed056a8c..00000000 --- a/sys-config/ltoize/files/package.cflags/no-common.conf +++ /dev/null @@ -1,101 +0,0 @@ -# These workarounds apply to GCC 9.x and below. `-fno-common` is default on GCC 10 now -# and many ebuilds have already been patched, with Gentoo upstream leading the charge. -# If you are having trouble with a package in this list, try explicitly setting it to -fcommon. -# If that works, please file an issue at the GentooLTO GitHub. - -# BEGIN: -fno-common workarounds -app-accessibility/at-spi2-atk *FLAGS-="${NOCOMMON}" -app-admin/logrotate *FLAGS-="${NOCOMMON}" -app-admin/syslog-ng *FLAGS-="${NOCOMMON}" -app-arch/cpio *FLAGS-="${NOCOMMON}" -app-arch/file-roller *FLAGS-="${NOCOMMON}" -app-crypt/gnupg *FLAGS-="${NOCOMMON}" -app-crypt/p11-kit *FLAGS-="${NOCOMMON}" -app-crypt/staticgpg *FLAGS-="${NOCOMMON}" -app-editors/neovim *FLAGS-="${NOCOMMON}" -app-text/mupdf *FLAGS-="${NOCOMMON}" -app-text/texlive-core *FLAGS-="${NOCOMMON}" -app-text/ttf2pk2 *FLAGS-="${NOCOMMON}" -dev-db/redis *FLAGS-="${NOCOMMON}" -dev-java/icedtea *FLAGS-="${NOCOMMON}" -dev-lang/erlang *FLAGS-="${NOCOMMON}" -dev-lang/orc *FLAGS-="${NOCOMMON}" -dev-lang/R *FLAGS-="${NOCOMMON}" -dev-libs/bemenu *FLAGS-="${NOCOMMON}" -dev-libs/dbus-glib *FLAGS-="${NOCOMMON}" -dev-libs/ffcall *FLAGS-="${NOCOMMON}" -dev-libs/fribidi *FLAGS-="${NOCOMMON}" -dev-libs/gobject-introspection *FLAGS-="${NOCOMMON}" -dev-libs/libltdl *FLAGS-="${NOCOMMON}" # builds but causes symbol lookup errors -dev-libs/libmspack *FLAGS-="${NOCOMMON}" -dev-libs/libpipeline *FLAGS-="${NOCOMMON}" -dev-libs/libx86emu *FLAGS-="${NOCOMMON}" -dev-python/dbus-python *FLAGS-="${NOCOMMON}" -dev-python/nautilus-python *FLAGS-="${NOCOMMON}" -dev-util/android-tools *FLAGS-="${NOCOMMON}" -dev-util/pkgconf *FLAGS-="${NOCOMMON}" -gnome-base/gnome-control-center *FLAGS-="${NOCOMMON}" -gnome-base/librsvg *FLAGS-="${NOCOMMON}" -gui-apps/wl-clipboard *FLAGS-="${NOCOMMON}" -gui-libs/wlroots *FLAGS-="${NOCOMMON}" -gui-wm/sway *FLAGS-="${NOCOMMON}" -media-gfx/imagemagick *FLAGS-="${NOCOMMON}" -media-libs/freeglut *FLAGS-="${NOCOMMON}" -media-libs/gegl *FLAGS-="${NOCOMMON}" -media-libs/glu *FLAGS-="${NOCOMMON}" -media-libs/gstreamer *FLAGS-="${NOCOMMON}" -media-libs/libv4l *FLAGS-="${NOCOMMON}" -media-libs/mesa *FLAGS-="${NOCOMMON}" -media-libs/openal *FLAGS-="${NOCOMMON}" -media-sound/bluez-alsa *FLAGS-="${NOCOMMON}" -media-sound/mpg123 *FLAGS-="${NOCOMMON}" -media-sound/musepack-tools *FLAGS-="${NOCOMMON}" -media-sound/sox *FLAGS-="${NOCOMMON}" -media-sound/wavpack *FLAGS-="${NOCOMMON}" -net-analyzer/iftop *FLAGS-="${NOCOMMON}" -net-analyzer/openvas-manager *FLAGS-="${NOCOMMON}" -net-fs/nfs-utils *FLAGS-="${NOCOMMON}" -net-libs/libmbim *FLAGS-="${NOCOMMON}" -net-libs/libqmi *FLAGS-="${NOCOMMON}" -net-libs/libtirpc *FLAGS-="${NOCOMMON}" -net-misc/curl *FLAGS-="${NOCOMMON}" -net-misc/dhcp *FLAGS-="${NOCOMMON}" -net-misc/iputils *FLAGS-="${NOCOMMON}" -net-misc/modemmanager *FLAGS-="${NOCOMMON}" -net-misc/networkmanager *FLAGS-="${NOCOMMON}" -net-misc/ntpsec *FLAGS-="${NOCOMMON}" -net-misc/socat *FLAGS-="${NOCOMMON}" -net-misc/vinagre *FLAGS-="${NOCOMMON}" -net-print/cups-filters *FLAGS-="${NOCOMMON}" -net-vpn/libreswan *FLAGS-="${NOCOMMON}" -sys-apps/dtc *FLAGS-="${NOCOMMON}" -sys-apps/iproute2 *FLAGS-="${NOCOMMON}" -sys-apps/kbd *FLAGS-="${NOCOMMON}" -sys-apps/memtester *FLAGS-="${NOCOMMON}" -sys-apps/the_silver_searcher *FLAGS-="${NOCOMMON}" -sys-apps/usbredir *FLAGS-="${NOCOMMON}" -sys-boot/syslinux *FLAGS-="${NOCOMMON}" -sys-devel/bmake *FLAGS-="${NOCOMMON}" -sys-devel/distcc *FLAGS-="${NOCOMMON}" -sys-fs/squashfs-tools *FLAGS-="${NOCOMMON}" ->=sys-fs/xfsprogs-5.2.0 *FLAGS-="${NOCOMMON}" -sys-libs/gdbm *FLAGS-="${NOCOMMON}" -sys-libs/gpm *FLAGS-="${NOCOMMON}" -sys-libs/libunwind *FLAGS-="${NOCOMMON}" -sys-power/cpupower *FLAGS-="${NOCOMMON}" -sys-power/iasl *FLAGS-="${NOCOMMON}" -sys-power/upower *FLAGS-="${NOCOMMON}" -sys-process/audit *FLAGS-="${NOCOMMON}" -sys-process/htop *FLAGS-="${NOCOMMON}" -x11-base/xorg-server *FLAGS-="${NOCOMMON}" -x11-drivers/xf86-video-amdgpu *FLAGS-="${NOCOMMON}" -x11-drivers/xf86-video-ati *FLAGS-="${NOCOMMON}" -x11-drivers/xf86-video-intel *FLAGS-="${NOCOMMON}" -=sys-apps/coreutils-8.31 *FLAGS+='-fno-finite-math-only' # causes multiple definition of `minus_zero` error during linking ->=sys-apps/groff-1.22.4 *FLAGS+='-fsigned-zeros' # causes conflicting declaration of `signbit` compilation error ->=sys-devel/llvm-10.0.0 *FLAGS+='-fno-finite-math-only' # compiles fine but causes clang to fail to emerge with ``undefined reference to `__log10_finite'`` ->=sys-libs/glibc-2.30 /-Ofast/'-O3 ${SAFEST_FAST_MATH}' /-ffast-math/'${SAFEST_FAST_MATH}' # preprocessor in the source throws an error if ffast-math is enabled -www-client/firefox /-Ofast/'-O3 ${SAFEST_FAST_MATH}' /-ffast-math/'${SAFEST_FAST_MATH}' # won't build with flags activated by -ffast-math on Clang, requires investigation -x11-misc/redshift *FLAGS+='-fno-finite-math-only' # compiles fine but -ffinite-math-only causes a runtime error where the brightness values are interpreted incorrectly # END: -Ofast workarounds diff --git a/sys-config/ltoize/files/package.cflags/portage-bashrc-mv.conf b/sys-config/ltoize/files/package.cflags/portage-bashrc-mv.conf deleted file mode 100644 index 2f65ea9e..00000000 --- a/sys-config/ltoize/files/package.cflags/portage-bashrc-mv.conf +++ /dev/null @@ -1,3 +0,0 @@ -# BEGIN: portage-bashrc-mv remove-la workarounds -dev-util/colm NOLAFILEREMOVE=true # See issue 690 and https://bugs.gentoo.org/766210 -# END: portage-bashrc-mv remove-la workarounds diff --git a/sys-config/ltoize/files/package.cflags/tls-dialect.conf b/sys-config/ltoize/files/package.cflags/tls-dialect.conf deleted file mode 100644 index db2dd8a5..00000000 --- a/sys-config/ltoize/files/package.cflags/tls-dialect.conf +++ /dev/null @@ -1,14 +0,0 @@ -# BEGIN: TLS dialect workarounds -www-client/firefox *FLAGS-="-mtls-dialect=gnu2" -www-client/torbrowser *FLAGS-="-mtls-dialect=gnu2" -sys-fs/eudev *FLAGS-="-mtls-dialect=gnu2" -sys-libs/glibc *FLAGS-="-mtls-dialect=gnu2" -dev-lang/mono *FLAGS-="-mtls-dialect=gnu2" -dev-lang/python *FLAGS-="-mtls-dialect=gnu2" -dev-util/lldb *FLAGS-="-mtls-dialect=gnu2" -dev-db/firebird *FLAGS-="-mtls-dialect=gnu2" -dev-lang/spidermonkey *FLAGS-="-mtls-dialect=gnu2" -sys-fs/btrfs-progs *FLAGS-="-mtls-dialect=gnu2" -sys-boot/systemd-boot *FLAGS-="-mtls-dialect=gnu2" -net-libs/libtorrent-rasterbar *FLAGS-="-mtls-dialect=gnu2" # causes memory corruption at runtime -# END: TLS dialect workarounds diff --git a/sys-config/ltoize/files/package.cflags/untested-clang.conf b/sys-config/ltoize/files/package.cflags/untested-clang.conf new file mode 100644 index 00000000..d08c8ff8 --- /dev/null +++ b/sys-config/ltoize/files/package.cflags/untested-clang.conf @@ -0,0 +1,18 @@ +# Remaining workarounds to be tested: 8 + +# BEGIN: Untested Workarounds for LTO with Clang +# dev-lang/python *FLAGS-=-flto* # https://bugs.gentoo.org/700012 : No -ffat-lto-objects on clang +# dev-libs/libffi *FLAGS-=-flto* # error: changed section flags for .eh_frame https://github.com/libffi/libffi/issues/626 (abi_x86_32) +# dev-util/colm *FLAGS-=-flto* # ld: libcolm.a: error adding symbols: file format not recognized +# media-libs/dav1d *FLAGS-=-flto* # general protection fault https://code.videolan.org/videolan/dav1d/-/issues/362 +# >=app-office/libreoffice-7.1.2.2 "has clang ${IUSE//+} && use clang && NOLDADD=1" "has clang ${IUSE//+} && use clang && has custom-cflags ${IUSE//+} && use custom-cflags && FlagSubAllFlags ${GRAPHITE} ${DEVIRTLTO} ${IPAPTA} ${FLTO} -fuse-linker-plugin" # fails to configure, see issue #734 +# END: Untested Workarounds for LTO with Clang + +# BEGIN: Untested Packages which require Full LTO +# media-libs/libglvnd LTO_FULL=1 # ld.lld: error: undefined symbol: entrypointFunctions +# END: Untested Packages which require Full LTO + +# BEGIN: Untested Packages which require libstdc++ +# media-libs/exempi CXXFLAGS+=-stdlib=libstdc++ # fatal error: 'tr1/memory' file not found +# net-libs/webkit-gtk CXXFLAGS+=-stdlib=libstdc++ # error: use of undeclared identifier 'LC_ALL' +# END: Untested Packages which require libstdc++ diff --git a/sys-config/ltoize/files/package.cflags/untested-cmake-makefile.conf b/sys-config/ltoize/files/package.cflags/untested-cmake-makefile.conf new file mode 100644 index 00000000..73cde7c2 --- /dev/null +++ b/sys-config/ltoize/files/package.cflags/untested-cmake-makefile.conf @@ -0,0 +1,9 @@ +# Remaining workarounds to be tested: 5 + +# BEGIN: Untested Will not build with ninja +# app-doc/doxygen CMAKE_MAKEFILE_GENERATOR=emake +# dev-lang/swi-prolog CMAKE_MAKEFILE_GENERATOR=emake +# games-arcade/supertux CMAKE_MAKEFILE_GENERATOR=emake +# media-libs/musicbrainz CMAKE_MAKEFILE_GENERATOR=emake +# x11-misc/polybar CMAKE_MAKEFILE_GENERATOR=emake +# END: Untested Will not build with ninja diff --git a/sys-config/ltoize/files/package.cflags/untested-devirtualize-at-ltrans.conf b/sys-config/ltoize/files/package.cflags/untested-devirtualize-at-ltrans.conf new file mode 100644 index 00000000..99f276c6 --- /dev/null +++ b/sys-config/ltoize/files/package.cflags/untested-devirtualize-at-ltrans.conf @@ -0,0 +1,5 @@ +# Remaining workarounds to be tested: 1 + +# BEGIN: Untested -fdevirtualize-at-ltrans workarounds +# app-text/lcdf-typetools *FLAGS-="-fdevirtualize-at-ltrans" # ICE on static-var pass +# END: Untested -fdevirtualize-at-ltrans workarounds diff --git a/sys-config/ltoize/files/package.cflags/untested-flag-o-matic.conf b/sys-config/ltoize/files/package.cflags/untested-flag-o-matic.conf new file mode 100644 index 00000000..5966d9fd --- /dev/null +++ b/sys-config/ltoize/files/package.cflags/untested-flag-o-matic.conf @@ -0,0 +1,27 @@ +# Remaining workarounds to be tested: 23 + +# BEGIN: Untested verride-flagomatic workarounds +# app-crypt/johntheripper-jumbo LTO_ENABLE_FLAGOMATIC=yes +# app-crypt/johntheripper LTO_ENABLE_FLAGOMATIC=yes +# app-emulation/hercules LTO_ENABLE_FLAGOMATIC=yes +# app-emulation/wine-staging LTO_ENABLE_FLAGOMATIC=yes +# app-emulation/wine-vanilla LTO_ENABLE_FLAGOMATIC=yes +# app-emulation/xen LTO_ENABLE_FLAGOMATIC=yes +# app-emulation/xen-tools LTO_ENABLE_FLAGOMATIC=yes +# dev-lang/ghc LTO_ENABLE_FLAGOMATIC=yes +# dev-lang/gnat-gpl LTO_ENABLE_FLAGOMATIC=yes +# dev-libs/openssl LTO_ENABLE_FLAGOMATIC=yes +# games-emulation/zsnes LTO_ENABLE_FLAGOMATIC=yes +# media-libs/libsdl LTO_ENABLE_FLAGOMATIC=yes +# media-video/x264-encoder LTO_ENABLE_FLAGOMATIC=yes +# sci-biology/unafold LTO_ENABLE_FLAGOMATIC=yes +# sci-chemistry/tm-align LTO_ENABLE_FLAGOMATIC=yes +# sys-boot/refind LTO_ENABLE_FLAGOMATIC=yes # USE='custom-cflags' currently masked by profile +# sys-boot/syslinux LTO_ENABLE_FLAGOMATIC=yes +# sys-boot/tboot LTO_ENABLE_FLAGOMATIC=yes +# sys-devel/gcc LTO_ENABLE_FLAGOMATIC=yes # Build system requires special attention, use BOOT_CFLAGS to inject flags. Do not inject -flto, use the USE flag to do this. +# sys-fs/zfs-kmod LTO_ENABLE_FLAGOMATIC=yes +# sys-fs/zfs LTO_ENABLE_FLAGOMATIC=yes +# www-client/chromium LTO_ENABLE_FLAGOMATIC=yes +# www-client/firefox LTO_ENABLE_FLAGOMATIC=yes # The ebuild does respect your CFLAGS, it just does some messing around for enabling -flto and -O3. +# END: Untested override-flagomatic workarounds diff --git a/sys-config/ltoize/files/package.cflags/untested-graphite.conf b/sys-config/ltoize/files/package.cflags/untested-graphite.conf new file mode 100644 index 00000000..3093cfb3 --- /dev/null +++ b/sys-config/ltoize/files/package.cflags/untested-graphite.conf @@ -0,0 +1,6 @@ +# Remaining workarounds to be tested: 1 + +# BEGIN: Untested Graphite ICE (Internal Compiler Error) +# Report them to the GCC team +# sci-visualization/paraview *FLAGS-="${GRAPHITE}" # Removing Graphite optimizations allows build to complete with sane memory usage for --jobs > 1 +# END: Untested Graphite ICE (Internal Compiler Error) diff --git a/sys-config/ltoize/files/package.cflags/untested-ipa-pta.conf b/sys-config/ltoize/files/package.cflags/untested-ipa-pta.conf new file mode 100644 index 00000000..c3e9dc7d --- /dev/null +++ b/sys-config/ltoize/files/package.cflags/untested-ipa-pta.conf @@ -0,0 +1,18 @@ +# Remaining workarounds to be tested: 14 + +# BEGIN: Untested -fipa-pta workarounds +# dev-lang/R *FLAGS-="${IPAPTA}" # during IPA pass: pta lto1: internal compiler error: Segmentation fault +# dev-lang/duktape *FLAGS-="${IPAPTA}" # fixes polkit from musl overlay not starting +# dev-lang/gnat-gpl *FLAGS-="${IPAPTA}" +# dev-lang/php *FLAGS-="${IPAPTA}" # Segfaults when compiled with -fipa-pta +# x11-wm/bspwm *FLAGS-="${IPAPTA}" # needed for version 0.9.7 on 17.0 profile running the testing branch everywhere with GCC 8.3.0 +# media-libs/libwebp *FLAGS-="${IPAPTA}" # no compilation issues, but -fipa-pta causes webp images to be displayed incorrectly +# dev-qt/qtgui *FLAGS-="${IPAPTA}" # Same problem as above +# dev-db/mongodb *FLAGS-="${IPAPTA}" # ICE with -fipa-pta +# app-emulation/libvirt *FLAGS-="${IPAPTA}" # Segmentation fault when starting libvirtd +# dev-python/libvirt-python *FLAGS-="${IPAPTA}" # Test failure +# dev-db/postgresql *FLAGS-="${IPAPTA}" # Test failure +# mail-client/thunderbird *FLAGS-="${IPAPTA}" # ICE with GCC 10.2.0 (seen with thunderbird 68.12.0) +# >=media-libs/mesa-21.1.0 *FLAGS-="${IPAPTA}" # Segfault with vulkan +# x11-base/xwayland *FLAGS-="${IPAPTA}" # SIGABRT when querying for GLX information +# END: Untested -fipa-pta workarounds diff --git a/sys-config/ltoize/files/package.cflags/untested-lto.conf b/sys-config/ltoize/files/package.cflags/untested-lto.conf new file mode 100644 index 00000000..61d612a4 --- /dev/null +++ b/sys-config/ltoize/files/package.cflags/untested-lto.conf @@ -0,0 +1,121 @@ +# Remaining workarounds to be tested: 101 + +# BEGIN: Untested lto +# Packages which cannot be built with LTO at all +# app-admin/keepassxc *FLAGS-=-flto* # segfaults on start since Qt 5.15.1 +# app-emulation/dosemu *FLAGS-=-flto* # Issue #163 +# app-emulation/libguestfs *FLAGS-=-flto* +# app-emulation/virtualbox-extpack-oracle *FLAGS-=-flto* +# app-emulation/virtualbox *FLAGS-=-flto* +# app-emulation/wine* *FLAGS-=-flto* +# app-office/gnucash *FLAGS-=-flto* # error: type ‘struct _iterate’ violates the C++ One Definition Rule [-Werror=odr] +# app-office/libreoffice "has firebird ${IUSE//+} && use firebird && FlagSubAllFlags -flto*" +# app-office/scribus *FLAGS-=-flto* # Scribus crashes on startup if compiled with LTO +# app-text/yodl *FLAGS-=-flto* # Fixes build +# cross-arm-none-eabi/newlib *FLAGS-=-flto* # Causes 'arm-none-eabi-gcc' to segfault +# cross-i686-w64-mingw32/mingw64-runtime *FLAGS-=-flto* # linking errors +# cross-x86_64-w64-mingw32/mingw64-runtime *FLAGS-=-flto* # linking errors +# dev-db/firebird *FLAGS-=-flto* +# dev-db/mariadb *FLAGS-=-flto* +# dev-db/mysql-connector-c *FLAGS-=-flto* # required to compiled mysql-connector-c +# games-fps/gzdoom *FLAGS-=-flto* # Assertion `Class != nullptr' failed. SIGABRT +# dev-java/icedtea *FLAGS-=-flto* +# =dev-lang/php-7.2.0 *FLAGS-=-flto* # lto-wrapper link failure / https://github.com/InBetweenNames/gentooLTO/issues/135 +# dev-libs/libbpf *FLAGS-=-flto* # lto-wrapper link failure +# dev-libs/libsigsegv *FLAGS-=-flto* # Issue #189 +# dev-libs/weston *FLAGS-=-flto* +# dev-python/libvirt-python *FLAGS-=-flto* # ICE with GCC 10.2.0 +# dev-scheme/guile *FLAGS-=-flto* # Issue #193 +# dev-util/github-cli *FLAGS-=-flto* +# dev-util/radare2 *FLAGS-=-flto* # ICE in IPA pass +# dev-vcs/cvs *FLAGS-=-flto* # Undefined references +# games-action/extreme-tuxracer *FLAGS-=-flto* +# gnustep-base/gnustep-make *FLAGS-=-flto* # Issue #581, tools to build gnustep-base/gnustep-base, if built with LTO doesn't build gnustep code +# kde-apps/kdenlive *FLAGS-=-flto* +# kde-frameworks/kjs *FLAGS-=-flto* # Issue #181 +# mail-filter/procmail *FLAGS-=-flto* # Causes compile to hang indefinitely +# media-gfx/shotwell *FLAGS-=-flto* #Library search error with LTO enabled +# media-libs/mlt *FLAGS-=-flto* +# media-sound/pulseaudio *FLAGS-=-flto* +# media-video/mplayer *FLAGS-=-flto* +# net-libs/webkit-gtk:3 *FLAGS-=-flto* +# net-libs/webkit-gtk:4 *FLAGS-=-flto* +# net-misc/autossh *FLAGS-=-flto* # Undefined references +# net-misc/dhcp "has server ${IUSE//+} && use server && FlagSubAllFlags -flto*" # Cannot be built with LTO by default, but can if "server" USE is disabled +# net-misc/lksctp-tools *FLAGS-=-flto* # function `main': :(.text.startup+0x16de): undefined reference to `sctp_connectx' +# net-misc/nextcloud-client *FLAGS-="-flto"* # Segfaults at start with libQt5Core.so +# net-misc/nx *FLAGS-=-flto* # ODR violation during compilation +# net-news/newsboat *FLAGS-=-flto* # Fails to build with LTO +# net-p2p/cpuminer-opt *FLAGS-=-flto* +# net-p2p/retroshare *FLAGS-=-flto* # Issue #129, ICE on amd64 +# net-wireless/aircrack-ng *FLAGS-=-flto* +# sci-electronics/kicad *FLAGS-=-flto* # Issue #168 +# dev-python/scipy *FLAGS-=-flto* +# sys-apps/fakechroot *FLAGS-=-flto* # "Cgraph edge statement index out of range" error when linking with LTO enabled +# sys-apps/fwupd *FLAGS-=-flto* # Issue #225, LTO causes runtime failures +# sys-cluster/ceph *FLAGS-=-flto* # linking error during compilation +# sys-cluster/glusterfs *FLAGS-=-flto* # undefined reference to `glfs_subvol_done' +# >=sys-libs/efivar-38 *FLAGS-="-flto*" # Error when compiling with LTO per PR #823 +# sys-libs/libcxxabi *FLAGS-=-flto* # /var/tmp/portage/sys-libs/libcxxabi-4.0.1/temp/ccXYODmk.ltrans0.ltrans.o::DW.ref.__gcc_personality_v0: error: undefined reference to '__gcc_personality_v0' +# sys-libs/libselinux *FLAGS-=-flto* +# sys-libs/libsemanage *FLAGS-=-flto* +# sys-libs/libsepol *FLAGS-=-flto* +# sys-libs/musl *FLAGS-=-flto* +# sys-process/criu *FLAGS-=-pipe* *FLAGS-=-flto* *FLAGS-="-fuse-linker-plugin" LDFLAGS-="-Wl,--hash-style=gnu" *FLAGS-="${GRAPHITE}" # Fewer settings may be possible. Needs testing. (Dependency of LXC.) +# www-apps/hugo *FLAGS-=-flto* +# x11-drivers/xf86-video-intel *FLAGS-=-flto* +# END: Untested lto + +# BEGIN: Untested ffat-lto-objects +# Packages which require fat LTO objects in order to build (TESTING: STRIP_MASK) or which others depend on non-LTO symbols +# app-crypt/efitools *FLAGS+=-ffat-lto-objects # textrel? +# app-editors/vim "has perl ${IUSE//+} && use perl && FlagAddAllFlags -ffat-lto-objects" # required for perl USE flag +# dev-haskell/* *FLAGS+=-ffat-lto-objects #This is so non-portage GHC compilations work, as GHC is oblivious to LTO. portage builds are fine. +# dev-lang/moarvm *FLAGS+=-ffat-lto-objects # required for perl6 (i.e., dev-lang/nqp and dev-lang/rakudo to build) +# dev-util/cargo-c *FLAGS+=-ffat-lto-objects # fails to link against ssh functions without +# dev-util/sccache *FLAGS+=-ffat-lto-objects # fails to link +# net-libs/quiche *FLAGS+=-ffat-lto-objects # relocation R_X86_64_PC32 against undefined hidden symbol `GFp_ia32cap_P' can not be used when making a shared object +# sci-libs/mpir *FLAGS+=-ffat-lto-objects # compilation error without fat LTO (not linking error) +# sys-apps/bat *FLAGS+=-ffat-lto-objects # fails to link against git2 functions +# sys-boot/syslinux *FLAGS+=-ffat-lto-objects #Requires ld.bfd +# sys-libs/libosinfo *FLAGS+=-ffat-lto-objects # Causes virt-manager to segfault when opening VM window. May be related to GCC 11. Seen with 1.9.0 +# sys-power/nut *FLAGS+=-ffat-lto-objects # fails during configure otherwise +# x11-terms/alacritty *FLAGS+=-ffat-lto-objects +# END: Untested ffat-lto-objects + +# BEGIN: Untested LTO not recommended +# Packages which can be built with LTO but leads to problems/crashes/segfaults +# app-cdr/cdrtools *FLAGS-=-flto* # SCSI buffer size 0 when attempting to burn disc, reports "Unknown error 64512" +# dev-libs/folks *FLAGS-=-flto* # Programs which depend on folks fail to launch, https://gitlab.gnome.org/GNOME/folks/-/issues/123 +# >=dev-libs/gjs-1.66.1 *FLAGS-=-flto* # generates general protection fault when starting up gnome +# dev-libs/rocr-runtime *FLAGS-=-flto* # Causes crashes in multiple OpenCL tools +# dev-qt/qtscript *FLAGS-=-flto* #LTO patch exists, but crashes on newer Qt versions. Needs to be updated. +# dev-scheme/gambit *FLAGS-=-flto* # Runtime errors when gsc when built with LTO on > GCC 8 +# media-sound/jack2 *FLAGS-=-flto* # segfault in libjack.so.0.1.0 when ANY app trying to use it (breaks everithing built w/ JACK support) +# net-misc/networkmanager *FLAGS-=-flto* # Test failure +# net-news/rssguard *FLAGS-=-flto* # https://bugreports.qt.io/browse/QTBUG-41301 and https://github.com/martinrotter/rssguard/issues/156 +# net-proxy/privoxy *FLAGS-=-flto* #Issue #145, service will not start when built with LTO +# sci-libs/tensorflow *FLAGS-=-flto* # Issue #432 tensorflow-estimator fails with missing symbol __cpu_model +# sci-misc/boinc *FLAGS-=-flto* # buffer overflow when starting boinc_client +# sys-apps/apparmor *FLAGS-=-flto* # Issue #299, ODR violation, still builds and runs on some configurations +# sys-fs/cryfs *FLAGS-=-flto* # Test failure +# sys-libs/libapparmor *FLAGS-=-flto* # Undefined symbol error when trying to compile sys-apps/apparmor +# app-misc/openrgb *FLAGS-=-flto* # Segmentation fault on launch +# END: Untested LTO not recommended + +# BEGIN: Untested Build Workarounds +# Packages which require build workarounds to be built with LTO that can be resolved directly in *FLAGS +# dev-lisp/clisp *FLAGS+=-falign-functions # Issue #128. Function alignment problem. +# kde-apps/dolphin *FLAGS-="-Wl,--as-needed" # ( https://github.com/InBetweenNames/gentooLTO/issues/50 ) +# media-video/aegisub NOLDADD=1 C*FLAGS-="-Wl,*" # does not build when -Wl linker flags are passed to the compiler through C*FLAGS +# net-mail/mailutils "has ldap ${IUSE//+} && use ldap && FlagAdd LDFLAGS -llber" #With LTO, this dependency must be linked in explicitly to resolve undefined reference errors "ber_memvfree" and so on +# sys-power/thermald *FLAGS+=-Wl,--no-fatal-warnings *FLAGS+=-Wno-error +# END: Untested Build Workarounds + +# BEGIN: Untested Misc Workarounds +# sys-libs/compiler-rt-sanitizers *FLAGS+=-Wno-unused-command-line-argument # Test failure +# END: Untested Misc Workarounds diff --git a/sys-config/ltoize/files/package.cflags/untested-no-semantic-interposition.conf b/sys-config/ltoize/files/package.cflags/untested-no-semantic-interposition.conf new file mode 100644 index 00000000..e8957d84 --- /dev/null +++ b/sys-config/ltoize/files/package.cflags/untested-no-semantic-interposition.conf @@ -0,0 +1,12 @@ +# Remaining workarounds to be tested: 8 + +# BEGIN: Untested Semantic Interposition workarounds +# app-crypt/tpm2-tss *FLAGS-="${SEMINTERPOS}" # Problem with inlining, see issue #592 +# app-emulation/libvirt *FLAGS-="${SEMINTERPOS}" # Test failure +# app-misc/tracker *FLAGS-="${SEMINTERPOS}" # builds but makes gnome-base/nautilus deadlock +# dev-lang/jimtcl *FLAGS-="${SEMINTERPOS}" # buffer overflow error when running an autosetup script. +# dev-lang/swi-prolog *FLAGS-="${SEMINTERPOS}" # segfaults during build +# media-sound/ardour *FLAGS-="${SEMINTERPOS}" # ICE in record_target_from_binfo during GIMPLE pass +# net-fs/autofs *FLAGS-="${SEMINTERPOS}" # builds but segfault in lookup_file.so +# net-libs/libiscsi *FLAGS-="${SEMINTERPOS}" +# END: Untested Semantic Interposition Workarounds diff --git a/sys-config/ltoize/files/package.cflags/untested-optimizations.conf b/sys-config/ltoize/files/package.cflags/untested-optimizations.conf new file mode 100644 index 00000000..ff5c83e5 --- /dev/null +++ b/sys-config/ltoize/files/package.cflags/untested-optimizations.conf @@ -0,0 +1,24 @@ +# Remaining workarounds to be tested: 17 + +# BEGIN: Untested Deliberate -O3 workarounds +# mail-filter/procmail /-O3/-O2 # Causes compile to hang indefinitely +# media-libs/faad2 *FLAGS+=-fno-tree-loop-vectorize # causes subtly wrong decoding +# net-misc/dhcp /-O3/-O2 # Runtime failure, DHCPDISCOVER doesn't work correctly - introduced with gcc 10? +# sci-libs/scotch /-O3/-O2 # Test failure +# sys-apps/systemd /-O3/-O2 # causes homectl to fail with protocol error +# kde-apps/cantor /-O3/-O2 # Build fails with error +# END: Untested Deliberate -O3 workarounds + +# BEGIN: Untested -Ofast workarounds +# app-editors/emacs *FLAGS+='-fno-finite-math-only' # explicitly required by the ebuild +# dev-lang/R *FLAGS+='-fno-finite-math-only' # R itself compiles fine, but runtime errors cause installation of R library tools to fail during emerge +# dev-qt/qtcore *FLAGS+='-fno-finite-math-only' # compiles fine but causes most forms of scrolling to stop working in okular +# kde-frameworks/kjs /-Ofast/'-O3 ${SAFER_FAST_MATH}' /-ffast-math/'${SAFER_FAST_MATH}' # preprocessor in the source throws an error if ffast-math is enabled +# net-voip/mumble /-Ofast/'-O3 ${SAFER_FAST_MATH}' /-ffast-math/'${SAFER_FAST_MATH}' # preprocessor in the libopus source throws an error if ffast-math is enabled +# media-video/mpv /-Ofast/'-O3 ${SAFEST_FAST_MATH}' /-ffast-math/'${SAFEST_FAST_MATH}' # causes incorrect behavior (black screen) when enabling interpolation or downscaling +# net-analyzer/rrdtool *FLAGS+='-fno-finite-math-only' # configure fails due to non-compliant IEEE arithmetic +# net-libs/nodejs *FLAGS+='-fno-finite-math-only' # compiles fine but `npm` returns error whenever it starts running +# www-client/firefox /-Ofast/'-O3 ${SAFEST_FAST_MATH}' /-ffast-math/'${SAFEST_FAST_MATH}' # won't build with flags activated by -ffast-math on Clang, requires investigation +# x11-misc/gammastep *FLAGS+='-fno-finite-math-only' # compiles fine but -ffinite-math-only causes a runtime error where the brightness values are interpreted incorrectly +# x11-misc/redshift *FLAGS+='-fno-finite-math-only' # compiles fine but -ffinite-math-only causes a runtime error where the brightness values are interpreted incorrectly +# END: Untested -Ofast workarounds diff --git a/sys-config/ltoize/files/package.cflags/use-ld.conf b/sys-config/ltoize/files/package.cflags/use-ld.conf deleted file mode 100644 index cc4c2860..00000000 --- a/sys-config/ltoize/files/package.cflags/use-ld.conf +++ /dev/null @@ -1,7 +0,0 @@ -# BEGIN: GOLD linker workarounds -dev-util/kbuild *FLAGS+="-fuse-ld=bfd" -games-emulation/pcsx2 *FLAGS+="-fuse-ld=bfd" -media-libs/libcaca *FLAGS+="-fuse-ld=bfd" -net-misc/curl *FLAGS+="-fuse-ld=bfd" ->=sys-libs/libcap-2.28 *FLAGS+="-fuse-ld=bfd" # Issue #453 -# END: GOLD linker workarounds diff --git a/sys-config/ltoize/files/patches/dev-build/libtool-2.4.7/lto.patch b/sys-config/ltoize/files/patches/dev-build/libtool-2.4.7/lto.patch new file mode 100644 index 00000000..5e403e91 --- /dev/null +++ b/sys-config/ltoize/files/patches/dev-build/libtool-2.4.7/lto.patch @@ -0,0 +1,53 @@ +Enabling lto will result in failure during test phase, to be precise test 67 will cause it. +Compiler flags for this test (and most likely for rest of them) are inherited from actual build phase. +I'm not sure if this is expected. + +Most distribution disables this test. We try to keep it by stripping lto flags for it. + +Origin for this tests: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=391427 + +--- a/tests/link-order2.at 2015-01-16 19:52:04.000000000 +0100 ++++ b/tests/link-order2_new.at 2021-11-30 02:01:09.574451906 +0100 +@@ -47,6 +47,8 @@ + AT_KEYWORDS([libtool]) + AT_KEYWORDS([interactive])dnl running 'wrong' may cause a popup window. + ++NO_LTO_CFLAGS=${CFLAGS/-flto*-ffat-lto-objects } ++ + eval `$LIBTOOL --config | $EGREP '^(shlibpath_var|allow_undefined_flag)='` + + undefined_setting=-no-undefined +@@ -89,12 +91,12 @@ + EOF + + for file in a0 a1 b; do +- $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c $file.c ++ $LIBTOOL --mode=compile $CC $CPPFLAGS $NO_LTO_CFLAGS -c $file.c + done +-$CC $CPPFLAGS $CFLAGS -c main.c ++$CC $CPPFLAGS $NO_LTO_CFLAGS -c main.c + + # Build an old, installed library. +-$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $static -o liba0.la a0.lo -rpath $deflibdir ++$LIBTOOL --mode=link $CC $NO_LTO_CFLAGS $LDFLAGS $static -o liba0.la a0.lo -rpath $deflibdir + $LIBTOOL --mode=install cp liba0.la $deflibdir/liba0.la + $LIBTOOL --mode=clean rm -f liba0.la + +@@ -118,13 +120,13 @@ + esac + test non-libtool,-static-libtool-libs = "$type_of_depdepl,$static" && + static=-all-static +- $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $static -o liba1.la a1.lo -rpath $libdir +- $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $static -o libb.la b.lo liba1.la -rpath $libdir +- AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $static -o main$EXEEXT main.$OBJEXT libb.la -la0], ++ $LIBTOOL --mode=link $CC $NO_LTO_CFLAGS $LDFLAGS $static -o liba1.la a1.lo -rpath $libdir ++ $LIBTOOL --mode=link $CC $NO_LTO_CFLAGS $LDFLAGS $static -o libb.la b.lo liba1.la -rpath $libdir ++ AT_CHECK([$LIBTOOL --mode=link $CC $NO_LTO_CFLAGS $LDFLAGS $static -o main$EXEEXT main.$OBJEXT libb.la -la0], + [], [ignore], [ignore]) + LT_AT_EXEC_CHECK([./main]) + # Now test that if we reverse the link order, the program fails. +- AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $static -o wrong$EXEEXT main.$OBJEXT -la0 libb.la], ++ AT_CHECK([$LIBTOOL --mode=link $CC $NO_LTO_CFLAGS $LDFLAGS $static -o wrong$EXEEXT main.$OBJEXT -la0 libb.la], + [], [ignore], [ignore]) + if test yes, != "$shared_fails,$static"; then + LT_AT_EXEC_CHECK([./wrong], [1], [], [ignore], [|| (exit 1)]) diff --git a/sys-config/ltoize/files/patches/sys-devel/prelink/experimental-glibc-231.patch b/sys-config/ltoize/files/patches/sys-devel/prelink/experimental-glibc-231.patch deleted file mode 100644 index 984365ea..00000000 --- a/sys-config/ltoize/files/patches/sys-devel/prelink/experimental-glibc-231.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/src/gather.c b/src/gather.c -index 277f1b5..3cdc7fd 100644 ---- a/src/gather.c -+++ b/src/gather.c -@@ -189,6 +189,11 @@ gather_deps (DSO *dso, struct prelink_entry *ent) - if (line[n - 1] == '\n') - line[n - 1] = '\0'; - -+ if (strncmp (line, "lookup", sizeof ("lookup") - 1) == 0) -+ { -+ continue; -+ } -+ - p = strstr (line, " => "); - if (p) - { diff --git a/sys-config/ltoize/files/patches/sys-devel/prelink/noplt.patch b/sys-config/ltoize/files/patches/sys-devel/prelink/noplt.patch deleted file mode 100644 index 64bf0943..00000000 --- a/sys-config/ltoize/files/patches/sys-devel/prelink/noplt.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 2cc1d58caaba994855516b50d5af057854c94fe8 Mon Sep 17 00:00:00 2001 -From: Shane Peelar -Date: Sat, 25 May 2019 08:45:45 -0400 -Subject: [PATCH] arch-x86_64.c: Make assert conditional - -Make the assert in arch_prelink a condition instead of an assert, -keeping things consistent with the other arches. This makes -prelink not bail out on `-fno-plt` executables. - -Signed-off-by: Shane Peelar ---- - src/arch-x86_64.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/src/arch-x86_64.c b/src/arch-x86_64.c -index 2f6c551..aa739e6 100644 ---- a/src/arch-x86_64.c -+++ b/src/arch-x86_64.c -@@ -418,7 +418,8 @@ x86_64_arch_prelink (struct prelink_info *info) - ".plt")) - break; - -- assert (i < dso->ehdr.e_shnum); -+ if (i == dso->ehdr.e_shnum) -+ return 0; - data = dso->shdr[i].sh_addr + 0x16; - write_le64 (dso, dso->info[DT_PLTGOT] + 8, data); - } --- -2.21.0 - diff --git a/sys-config/ltoize/ltoize-0.10.0.ebuild b/sys-config/ltoize/ltoize-0.10.0.ebuild new file mode 100644 index 00000000..b276a960 --- /dev/null +++ b/sys-config/ltoize/ltoize-0.10.0.ebuild @@ -0,0 +1,133 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit toolchain-funcs + +DESCRIPTION="A configuration for portage to make building with LTO easy" +HOMEPAGE="https://github.com/jhatler/gentooLTO" + +#Note: there's nothing preventing this from working on stable, but the dependencies of ltoize aren't keyworded for +#stable, so we only can do testing +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86" + +SRC_URI="" + +LICENSE="GPL-2+" +SLOT="0" +IUSE="clang +override-flagomatic" + +#portage-bashrc-mv can be obtained from mv overlay +DEPEND=" + app-portage/portage-bashrc-mv[cflags] + sys-apps/portage + sys-devel/gcc-config +" +RDEPEND="${DEPEND}" + +#Test binutils and gcc version +pkg_setup() { + + ACTIVE_GCC=$(gcc-fullversion) + + if ver_test "${ACTIVE_GCC}" -lt 10.2.0; then + ewarn "Warning: Active GCC version '$ACTIVE_GCC' is lower then the expected version '10.2.0', it is recommended that you use the newest GCC if you want LTO." + if [ "${I_KNOW_WHAT_I_AM_DOING}" != "y" ]; then + eerror "Aborting LTOize installation due to older GCC version '$ACTIVE_GCC' -- set I_KNOW_WHAT_I_AM_DOING=y if you want to override this behaviour." + die + else + ewarn "I_KNOW_WHAT_I_AM_DOING=y -- continuing anyway" + fi + fi + + if [ -f "${PORTAGE_CONFIGROOT%/}/etc/portage/package.cflags" ]; then + eerror "${PORTAGE_CONFIGROOT%/}/etc/portage/package.cflags is a file not a directory. Please convert package.cflags to a directory with the current contents of package.cflags being moved to a file inside it." + die + fi + +} + +pkg_preinst() { + ACTIVE_GCC=$(gcc-fullversion) + if use override-flagomatic; then + if [ -z "${LTO_OVERLAY_PATH}" ]; then + eerror "It seems you're using the override-flagomatic feature of GentooLTO. You must set LTO_OVERLAY_PATH in your make.conf to point to where lto-overlay lives." + eerror "You can use: 'portageq get_repo_path ${PORTAGE_CONFIGROOT} lto-overlay' to obtain it if you're not sure." + die + fi + fi + + GENTOOLTO_PORTDIR="${LTO_OVERLAY_PATH}" + LTO_PORTAGE_DIR="${GENTOOLTO_PORTDIR}/${CATEGORY}/${PN}/files" + + COMMON_WORKAROUNDS=( + cmake-makefile.conf + devirtualize-at-ltrans.conf + graphite.conf + ipa-pta.conf + lto.conf + no-semantic-interposition.conf + optimizations.conf + untested-cmake-makefile.conf + untested-devirtualize-at-ltrans.conf + untested-graphite.conf + untested-ipa-pta.conf + untested-lto.conf + untested-no-semantic-interposition.conf + untested-optimizations.conf + ) + + #Install make.conf settings + elog "Installing make.conf.lto.defines definitions for optimizations used in this overlay" + dosym "${LTO_PORTAGE_DIR}/make.conf.lto.defines" "${PORTAGE_CONFIGROOT#${EPREFIX}}/etc/portage/make.conf.lto.defines" + + elog "Installing make.conf.lto default full optimization config for make.conf" + dosym "${LTO_PORTAGE_DIR}/make.conf.lto" "${PORTAGE_CONFIGROOT#${EPREFIX}}/etc/portage/make.conf.lto" + + #Install main workarounds files + for i in "${COMMON_WORKAROUNDS[@]}"; do + elog "Installing package.cflags ${i} override" + dosym "${LTO_PORTAGE_DIR}/package.cflags/${i}" "${PORTAGE_CONFIGROOT#${EPREFIX}}/etc/portage/package.cflags/${i}" + done + + # Install Clang LTO workarounds + use clang && dosym "${LTO_PORTAGE_DIR}/package.cflags/untested-clang.conf" \ + "${PORTAGE_CONFIGROOT#${EPREFIX}%/}/etc/portage/package.cflags/untested-clang.conf" + use clang && dosym "${LTO_PORTAGE_DIR}/package.cflags/clang.conf" \ + "${PORTAGE_CONFIGROOT#${EPREFIX}%/}/etc/portage/package.cflags/clang.conf" + + #Install patch framework + elog "Installing bashrc.d hook symlink to apply LTO patches directly from lto-overlay" + dosym "${LTO_PORTAGE_DIR}/bashrc.d/41-lto-patch.sh" "${PORTAGE_CONFIGROOT#${EPREFIX}}/etc/portage/bashrc.d/41-lto-patch.sh" + + #Optional: install flag-o-matic overrides + if use override-flagomatic; then + ewarn "Installing bashrc.d hook to override strip-flags and replace-flags functions in flag-o-matic. This is an experimental feature!" + dosym "${LTO_PORTAGE_DIR}/bashrc.d/42-lto-flag-o-matic.sh" "${PORTAGE_CONFIGROOT#${EPREFIX}}/etc/portage/bashrc.d/42-lto-flag-o-matic.sh" + dosym "${LTO_PORTAGE_DIR}/package.cflags/untested-flag-o-matic.conf" "${PORTAGE_CONFIGROOT#${EPREFIX}}/etc/portage/package.cflags/untested-flag-o-matic.conf" + dosym "${LTO_PORTAGE_DIR}/package.cflags/flag-o-matic.conf" "${PORTAGE_CONFIGROOT#${EPREFIX}}/etc/portage/package.cflags/flag-o-matic.conf" + fi +} + +pkg_postinst() +{ + elog "If you have not done so, you will need to modify your make.conf settings to enable LTO building on your system." + elog "A symlink has been placed in ${PORTAGE_CONFIGROOT%/}/etc/portage/make.conf.lto that can be used as a basis for these modifications." + elog "See README.md for more details." + elog "lto-overlay and ltoize are part of a project to help find undefined behaviour in C and C++ programs through the use of aggressive compiler optimizations." + elog "One of the aims of this project is also to improve the performance of linux distributions through these mechanisms as well." + elog "Occasionally, you will experience breakage due to LTO problems. These are documented in the README.md of this repository." + elog "If you add an override for a particular package, please consider sending a pull request upstream so that other users of this repository can benefit." + ewarn "You will require a complete system rebuild in order to gain the benefits of LTO system-wide." + echo + elog "Please consider reading the README.md at the root of this repository before attempting to rebuild your system to familiarize yourself with the goals of this project and potential pitfalls you could run into." + echo + ewarn "This is an experimental project and should not be used on a stable system in its current state." + + BINUTILS_VER=$(binutils-config ${CHOST} -c | sed -e "s/.*-//") + + if ver_test "${BINUTILS_VER}" -lt 2.34; then + ewarn "Warning: active binutils version < 2.34, it is recommended that you use the newest binutils for LTO." + fi +}