tools/make_libdeps.sh: Add needed mangling rules.
authorzrj <rimvydas.jasinskas@gmail.com>
Thu, 24 May 2018 09:21:09 +0000 (12:21 +0300)
committerzrj <zrj@dragonflybsd.org>
Thu, 24 May 2018 10:19:53 +0000 (13:19 +0300)
For tool to work properly:
 * suppess all of the -Wl,--foo (yes, we have those unfortunately);
 * mangle all of pthread references;
 * ignore libstdc++'s ../components/blah/libfoo_pic.a (used as int libs);
 * remangle internallib libelf_pic.a for libexecinfo;
 * mangle all of the privatelibs to get correct lib location.

tools/make_libdeps.sh

index b082f5b..7c79c8a 100644 (file)
@@ -44,6 +44,16 @@ LIBS="
 #
 SED_FILTER="
 sed -E
+    -e's;-Wl,[^ ]+[ ]?;;g'
+    -e's;-lprivate_crypto;-lrecrypto;g'
+    -e's;-lprivate_ncurses;-lncurses;g'
+    -e's;-lprivate_ssh;-lssh;g'
+    -e's;-lprivate_ssl;-lressl;g'
+    -e's;-pthread;-lthread_xu;g'
+    -e's;/[^ ]+/libpthread\.so;-lpthread;g'
+    -e's;/[^ ]+/libelf_pic.a;-lelf;g'
+    -e's;\.\./components/[^ ]+/lib[a-z0-9]+_pic\.a[ ]?;;g'
+    -e's;[ ]$;;g'
     -e's; ;! ;g'
     -e's;$;!;'
     -e's;-l([^!]+)!;lib/lib\1;g'