libminixutil.a orphaned

4 views
Skip to first unread message

AntoineLeca

unread,
Jan 6, 2012, 6:50:32 AM1/6/12
to minix3
Hi,

Just found a problem with the build system, with "gnu" (ELF)
compilers.

In commit 989934b (http://git.minix3.org/?
p=minix.git;a=commitdiff;h=989934b), libutil was renamed to all
effects into libminixutil.
Then in commit 5c00743 (http://git.minix3.org/?
p=minix.git;a=commitdiff;h=5c00743), the NetBSD libutil was
introduced, displacing libminixutil from lib/Makefile; bottom line: /
usr/lib/libminixutil.a is not rebuilt by the ELF compilers, but is
still referenced by Makefiles (cut, find, man, random, inet, lwip.)

Solution a) Using Makefile black magic to select either -lutil or -
lminixutil depending of COMPILER_TYPE; see below patch for the
application of the idea

Solution b) in libminixutil/Makefile LIB=libutil, and undo commit
989934b, so everybody uses -lutil everywhere.

Antoine
--
diff --git a/commands/cut/Makefile b/commands/cut/Makefile
index 100dad1..fd099f2 100644
--- a/commands/cut/Makefile
+++ b/commands/cut/Makefile
@@ -3,7 +3,12 @@

PROG= cut

-LDADD+= -lminixutil
-DPADD+= ${LIBMINIXUTIL}
+.if defined(COMPILER_TYPE) && ${COMPILER_TYPE} == "ack"
+_util= minixutil
+.endif
+_util?= util
+_UTIL?= ${_util:tu}
+LDADD+= -l$(_util)
+DPADD+= ${LIB$(_UTIL)}

.include <bsd.prog.mk>
Reply all
Reply to author
Forward
0 new messages