diff -Nru meson-1.3.2/debian/changelog meson-1.3.2/debian/changelog --- meson-1.3.2/debian/changelog 2024-02-13 19:38:02.000000000 +0000 +++ meson-1.3.2/debian/changelog 2024-02-15 14:03:52.000000000 +0000 @@ -1,3 +1,10 @@ +meson (1.3.2-1ubuntu1) noble; urgency=medium + + * d/p/lp2049904.patch: Suffix rustc link args with `-Clink-arg=-lc` when + linking against external C ABI libraries (LP: #2049904) + + -- Mate Kukri Thu, 15 Feb 2024 14:03:52 +0000 + meson (1.3.2-1) unstable; urgency=medium * New upstream release. diff -Nru meson-1.3.2/debian/control meson-1.3.2/debian/control --- meson-1.3.2/debian/control 2023-12-11 19:52:05.000000000 +0000 +++ meson-1.3.2/debian/control 2024-02-15 14:03:52.000000000 +0000 @@ -1,5 +1,6 @@ Source: meson -Maintainer: Jussi Pakkanen +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Jussi Pakkanen Section: devel Priority: optional Standards-Version: 4.6.2 diff -Nru meson-1.3.2/debian/patches/lp2049904.patch meson-1.3.2/debian/patches/lp2049904.patch --- meson-1.3.2/debian/patches/lp2049904.patch 1970-01-01 01:00:00.000000000 +0100 +++ meson-1.3.2/debian/patches/lp2049904.patch 2024-02-15 14:03:52.000000000 +0000 @@ -0,0 +1,39 @@ +Description: Suffix rustc link args with `-Clink-arg=-lc` when linking against C ABI libraries +Author: Mate Kukri +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/rustc/+bug/2049904 +Forwarded: no +Last-Update: 2024-02-15 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +Index: meson-1.3.2/mesonbuild/backend/ninjabackend.py +=================================================================== +--- meson-1.3.2.orig/mesonbuild/backend/ninjabackend.py ++++ meson-1.3.2/mesonbuild/backend/ninjabackend.py +@@ -1978,6 +1978,7 @@ class NinjaBackend(backends.Backend): + linkdirs = mesonlib.OrderedSet() + external_deps = target.external_deps.copy() + target_deps = target.get_dependencies() ++ have_c_abi_libs = False + for d in target_deps: + linkdirs.add(d.subdir) + deps.append(self.get_dependency_filename(d)) +@@ -1992,6 +1993,8 @@ class NinjaBackend(backends.Backend): + args += ['--extern', '{}={}'.format(d_name, os.path.join(d.subdir, d.filename))] + project_deps.append(RustDep(d_name, self.rust_crates[d.name].order)) + continue ++ else: ++ have_c_abi_libs = True + + # Link a C ABI library + +@@ -2039,6 +2042,10 @@ class NinjaBackend(backends.Backend): + else: + args.append(f'-Clink-arg={a}') + ++ # LP: #2049904 Link with libc last if we have C ABI libraries ++ if have_c_abi_libs: ++ args.append("-Clink-arg=-lc") ++ + for d in linkdirs: + d = d or '.' + args.append(f'-L{d}') diff -Nru meson-1.3.2/debian/patches/series meson-1.3.2/debian/patches/series --- meson-1.3.2/debian/patches/series 2023-03-28 11:13:25.000000000 +0100 +++ meson-1.3.2/debian/patches/series 2024-02-15 14:03:52.000000000 +0000 @@ -1,2 +1,3 @@ 1-disable-openmpi.patch 2-disable-rootdir-test.patch +lp2049904.patch