all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
blob fec0dfbe6920177abbdb54e1b0aa06b0309bedb8 1045 bytes (raw)
name: gnu/packages/patches/mrustc-group-link.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
 
Surround the libraries with --start-group and --end-group to work
around <https://github.com/thepowersgang/mrustc/issues/138>.

diff --git a/src/trans/codegen_c.cpp b/src/trans/codegen_c.cpp
--- a/src/trans/codegen_c.cpp
+++ b/src/trans/codegen_c.cpp
@@ -960,6 +960,7 @@ namespace {
                     {
                         args.push_back("-L"); args.push_back(path);
                     }
+                    args.push_back("-Wl,--start-group");
                     for(const auto& lib : m_crate.m_ext_libs) {
                         ASSERT_BUG(Span(), lib.name != "", "");
                         args.push_back("-l"); args.push_back(lib.name.c_str());
@@ -975,6 +976,7 @@ namespace {
                     {
                         args.push_back("-l"); args.push_back(path.c_str());
                     }
+                    args.push_back("-Wl,--end-group");
                     for( const auto& a : Target_GetCurSpec().m_backend_c.m_linker_opts )
                     {
                         args.push_back( a.c_str() );

debug log:

solving fec0dfbe69 ...
found fec0dfbe69 in https://yhetil.org/guix/87pn3h5nrs.fsf@gmail.com/

applying [1/1] https://yhetil.org/guix/87pn3h5nrs.fsf@gmail.com/
diff --git a/gnu/packages/patches/mrustc-group-link.patch b/gnu/packages/patches/mrustc-group-link.patch
new file mode 100644
index 0000000000..fec0dfbe69

Checking patch gnu/packages/patches/mrustc-group-link.patch...
Applied patch gnu/packages/patches/mrustc-group-link.patch cleanly.

index at:
100644 fec0dfbe6920177abbdb54e1b0aa06b0309bedb8	gnu/packages/patches/mrustc-group-link.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.