Re: [PATCH] libmount/buildsys: move SELINUX_LIBS to LDFLAGS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun 03 Aug 2014 22:23:09 Andreas Henriksson wrote:
> Hello Mike Frysinger!
> 
> On Sun, Aug 03, 2014 at 09:34:25AM -0400, Mike Frysinger wrote:
> [...]
> 
> > please post the full details here.
> 
> I have no more details then those found in
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=721431

well, that thing has barely 6 lines (and even then requires some esoteric 
knowledge from the reader), so you could have just pasted it here :p
------
In libmount/src/Makefile.am

libmount_la_LIBADD = $(ul_libblkid_la) $(SELINUX_LIBS)

libmount_la_DEPENDENCIES = $(libmount_la_LIBADD) libmount.sym libmount.h.in

While $(SELINUX_LIBS) is '-lselinux -lsepol'

They are not files or makefile tag, so cannot build-depends on.
------

the problem is that libmount_la_DEPENDENCIES shows up in the Makefile like:
libmount.la: ... $(libmount_la_DEPENDENCIES) ...

which means make evaluates it like so:
libmount.la: ... -lselinux -lsepol ...

which triggers the builtin library path searching of make itself:
https://www.gnu.org/software/make/manual/make.html#Libraries_002fSearch

which means it'll rewrite -lselinux into /usr/lib/libselinux.so (if it can 
find it) which is bad for multilib and cross-compiling.

the easy answer is to not add LIBADD to DEPENDENCIES.  which has been done 
already -- see dbf7043ea1d090d283cfd36280bb14189d8e35b1.

> > linkage (like -lselinux) are not ldflags.
> 
> Works for me, but likely I got LIBADD/LDFLAGS/LDADD wrong (again).

it often works in the common case, but the edges break down.  we know putting 
-lflags into LDFLAGS is such a scenario :).
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux