unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
blob 7086a96e86088fc1fb903975117e78fc9bcabfb4 1877 bytes (raw)
name: patches/metabat-fix-compilation.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
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
 
This patch changes metabat so that (1) it is not build statically, (2) it uses
shared libraries rather than static libraries where possible.

diff --git a/SConstruct b/SConstruct
index 69cdc0a..ac99bcb 100644
--- a/SConstruct
+++ b/SConstruct
@@ -26,8 +26,6 @@ debug = ARGUMENTS.get('DEBUG', None)
 build_flags = ['-Wall', '-g', '-std=c++11', '-fopenmp']
 link_flags = ['-lstdc++', '-lm', '-fopenmp']
 
-if platform.platform(True, True).find('Darwin') == -1:
-    link_flags.extend(['-static', '-static-libgcc', '-static-libstdc++'])
 
 if debug is None:
     build_flags.extend(['-O3', '-DNDEBUG', '-Wno-unknown-pragmas', '-Wno-deprecated-declarations', '-Wno-overflow', '-Wno-unused-variable'])
@@ -110,17 +108,17 @@ def findStaticOrShared( lib, testPaths, static_source_list, link_flag_list, stat
     for path in testPaths:
         if not os.path.isdir(path):
             continue
+        for testfile in ('%s/lib%s.so' % (path, lib), '%s/lib%s.dylib' % (path, lib)):
+            if os.path.isfile(testfile):
+                print "Found shared library %s as %s" % (lib, testfile)
+                link_flag_list.extend( ["-L%s" % (path), "-l%s" % (lib) ] )
+                return
         for suffix in staticSuffixes:
             testfile = '%s/lib%s%s' % (path, lib, suffix)
             if os.path.isfile(testfile):
                 static_source_list.append(testfile)
                 print "Found static library %s as %s" % (lib, testfile)
                 return
-        for testfile in ('%s/lib%s.so' % (path, lib), '%s/lib%s.dylib' % (path, lib)):
-            if os.path.isfile(testfile):
-                print "Found shared library %s as %s" % (lib, testfile)
-                link_flag_list.extend( ["-L%s" % (path), "-l%s" % (lib) ] )
-                return
     print "Could not find library for %s!!! Looked in %s" % (lib, testPaths)
     return
 

debug log:

solving 7086a96e86088fc1fb903975117e78fc9bcabfb4 ...
found 7086a96e86088fc1fb903975117e78fc9bcabfb4 in https://git.savannah.gnu.org/cgit/guix.git

(*) 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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).