Filter out -f{debug,file}-prefix-map= from ocamlc_cflags and mkexe
authorStéphane Glondu <glondu@debian.org>
Wed, 8 Feb 2023 07:45:00 +0000 (08:45 +0100)
committerStéphane Glondu <glondu@debian.org>
Sun, 12 Feb 2023 10:46:40 +0000 (11:46 +0100)
Bug-Debian: https://bugs.debian.org/1030785
Forwarded: not-needed

Gbp-Pq: Name 0008-Filter-out-f-debug-file-prefix-map-from-ocamlc_cflag.patch

configure.ac

index 9ac019f756cd036e448d5e1b5c535f1bb87ab2e4..a4492466aca2c1272fc6e3c94e068298d47b87fb 100644 (file)
@@ -43,7 +43,7 @@ libraries_man_section=3
 # at the moment they are not taken into account on Windows, because
 # flexlink, which is used to build executables on this platform, can
 # not handle them.
-mkexe="\$(CC) \$(OC_CFLAGS) \$(CFLAGS) \$(OC_LDFLAGS) \$(LDFLAGS)"
+mkexe="\$(CC) \$(OC_CFLAGS) \$(filter-out -fdebug-prefix-map=% -ffile-prefix-map=%,\$(CFLAGS)) \$(OC_LDFLAGS) \$(LDFLAGS)"
 
 # Flags for building executable files with debugging symbols
 mkexedebugflag="-g"
@@ -1952,7 +1952,7 @@ AS_IF([test x"$DEFAULT_STRING" = "xunsafe"],
 
 oc_cflags="$common_cflags $internal_cflags"
 oc_cppflags="$common_cppflags $internal_cppflags"
-ocamlc_cflags="$common_cflags $sharedlib_cflags \$(CFLAGS)"
+ocamlc_cflags="$common_cflags $sharedlib_cflags \$(filter-out -fdebug-prefix-map=% -ffile-prefix-map=%,\$(CFLAGS))"
 ocamlc_cppflags="$common_cppflags \$(CPPFLAGS)"
 cclibs="$cclibs $mathlib"