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>
Wed, 20 Sep 2023 07:59:40 +0000 (09:59 +0200)
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 48b438a357ed30caead7baa1a2ebec7f4b32cd57..20f0873ca9a7fa8b5e93e7e1a637ff88acfe6cb6 100644 (file)
@@ -37,7 +37,7 @@ CONFIGURE_ARGS="$*"
 # 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"
@@ -1980,7 +1980,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"