Do not leak -maes -msse4.1 into pkgconfig
authorBruno Pitrus <brunopitrus@hotmail.com>
Mon, 12 May 2025 15:26:59 +0000 (17:26 +0200)
committerTobias Frost <tobi@debian.org>
Mon, 12 May 2025 15:26:59 +0000 (17:26 +0200)
Forwarded: https://github.com/abseil/abseil-cpp/pull/1216
Origin: upstream, https://github.com/abseil/abseil-cpp/commit/09e96049995584c3489e4bd1467313e3e85af99c

Gbp-Pq: Name leaky-pkgconfig-cflags.diff

CMake/AbseilHelpers.cmake

index 6b6613f049215436fb5972d4c334f3d5bc2fc565..0fe2c0a0b353f68199b8aca594e910079ccb0618 100644 (file)
@@ -166,6 +166,8 @@ function(absl_cc_library)
           set(PC_CFLAGS "${PC_CFLAGS} ${cflag}")
         elseif(${cflag} MATCHES "^(-W|/w[1234eo])")
           # Don't impose our warnings on others.
+        elseif(${cflag} MATCHES "^-m")
+          # Don't impose CPU instruction requirements on others, as the code performs feature detection on runtime.
         else()
           set(PC_CFLAGS "${PC_CFLAGS} ${cflag}")
         endif()