pybind11_lto_mips64el
authorDebian Science Team <debian-science-maintainers@lists.alioth.debian.org>
Wed, 4 Nov 2020 23:05:55 +0000 (23:05 +0000)
committerPeter Michael Green <plugwash@raspbian.org>
Wed, 4 Nov 2020 23:05:55 +0000 (23:05 +0000)
===================================================================

Gbp-Pq: Name pybind11_lto_mips64el.patch

python/setup.py

index 141ec0571a26c08ff3d1f7addb4f6c1ee6397a1c..a279abb64b27386a46ab641ba0dc0beb18ea5296 100644 (file)
@@ -51,6 +51,9 @@ class CMakeBuild(build_ext):
         cmake_args = ['-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=' + extdir,
                       '-DPYTHON_EXECUTABLE=' + sys.executable]
 
+        if platform.machine() == 'mips64':
+            cmake_args += ['-DPYBIND11_LTO_CXX_FLAGS=-fno-lto', '-DPYBIND11_LTO_LINKER_FLAGS=-fno-lto']
+
         cfg = 'Debug' if self.debug else 'Release'
         build_args = ['--config', cfg]