Search Linux Wireless

[PATCH crda] crda: Fix linking of libraries used by libreg

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

 



The math and crypto libraries are called by and need to be linked to
libreg.so, not to the executables.

Signed-off-by: Ben Hutchings <ben@xxxxxxxxxxxxxxx>
---
--- a/Makefile
+++ b/Makefile
@@ -30,7 +30,7 @@ CFLAGS += -std=gnu99 -Wall -Werror -peda
 CFLAGS += -Wall -g
 LDLIBREG += -lreg
 LDLIBS += $(LDLIBREG)
-LDLIBS += -lm
+LIBREGLDLIBS += -lm
 LIBREG += libreg.so
 LDFLAGS += -L ./
 
@@ -40,7 +40,7 @@ all_noverify: $(LIBREG) crda intersect r
 
 ifeq ($(USE_OPENSSL),1)
 CFLAGS += -DUSE_OPENSSL -DPUBKEY_DIR=\"$(RUNTIME_PUBKEY_DIR)\" `pkg-config --cflags openssl`
-LDLIBS += `pkg-config --libs openssl`
+LIBREGLDLIBS += `pkg-config --libs openssl`
 
 ifeq ($(RUNTIME_PUBKEY_ONLY),1)
 CFLAGS += -DRUNTIME_PUBKEY_ONLY
@@ -51,7 +51,7 @@ endif
 
 else
 CFLAGS += -DUSE_GCRYPT
-LDLIBS += -lgcrypt
+LIBREGLDLIBS += -lgcrypt
 
 $(LIBREG): keys-gcrypt.c
 
@@ -121,7 +121,7 @@ keys-%.c: utils/key2pub.py $(wildcard $(
 
 $(LIBREG): regdb.h reglib.h reglib.c
 	$(NQ) '  CC  ' $@
-	$(Q)$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -shared -Wl,-soname,$(LIBREG) $^
+	$(Q)$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -shared -Wl,-soname,$(LIBREG) $^ $(LIBREGLDLIBS)
 
 install-libreg-headers:
 	$(NQ) '  INSTALL  libreg-headers'

-- 
Ben Hutchings
One of the nice things about standards is that there are so many of them.

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


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux