From patchwork Sat Aug 23 19:26:37 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Hutchings X-Patchwork-Id: 4769971 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id BF81FC0338 for ; Sat, 23 Aug 2014 19:26:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2D74A20158 for ; Sat, 23 Aug 2014 19:26:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8585220138 for ; Sat, 23 Aug 2014 19:26:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751419AbaHWT0u (ORCPT ); Sat, 23 Aug 2014 15:26:50 -0400 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:53090 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751143AbaHWT0u (ORCPT ); Sat, 23 Aug 2014 15:26:50 -0400 Received: from [131.252.184.246] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1XLGxc-0001Jx-Oa; Sat, 23 Aug 2014 20:26:48 +0100 Received: from ben by deadeye with local (Exim 4.84_RC2) (envelope-from ) id 1XLGxW-0008PQ-Hz; Sat, 23 Aug 2014 12:26:42 -0700 Message-ID: <1408821997.4672.112.camel@deadeye.wl.decadent.org.uk> Subject: [PATCH crda] crda: Fix linking of libraries used by libreg From: Ben Hutchings To: "Luis R. Rodriguez" Cc: linux-wireless Date: Sat, 23 Aug 2014 12:26:37 -0700 X-Mailer: Evolution 3.12.2-1+b1 Mime-Version: 1.0 X-SA-Exim-Connect-IP: 131.252.184.246 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_TVD_MIME_EPI, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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'