Whamcloud - gitweb
Put ELF_OTHER_LIBS in the right place for the linker
authorTheodore Ts'o <tytso@mit.edu>
Sat, 4 Aug 2012 20:56:55 +0000 (16:56 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 6 Aug 2012 16:30:49 +0000 (12:30 -0400)
commitd5aa6a82b37a0e78d8882601e6ad9da9d9dcb4da
treeedf3432122e9c2189746e7bc12a089ff3168b158
parent67b3721dc4de9d6441a00eceba6fd57590aa0004
Put ELF_OTHER_LIBS in the right place for the linker

Commit a7c17431b9 attempted to fix a problem where the system
libraries might get used instead of local libraries for things like
-lcom_err.  It tried to accomplish this by moving $(ELF_OTHER_LIBS) to
before $(LDFLAGS).

Unfortunately, this was the wrong fix; $(ELF_OTHER_LIBS) *MUST* be
after the object files, or the linker might not pull in the necessary
library and not include it into the DT_NEEDED section of the shared
library.  The proper fix is to add a -L$(LIB) before $(LDFLAGS), and
then remove the -L option from all of the ELF_OTHER_LIBS definitions
in the library Makefiles.

Addresses-Sourceforge-Bug: #3554345

Cc: Olivier Blin <olivier.blin@softathome.com>
Reported-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
lib/Makefile.elf-lib
lib/Makefile.solaris-lib
lib/blkid/Makefile.in
lib/ext2fs/Makefile.in
lib/quota/Makefile.in
lib/ss/Makefile.in