From patchwork Sat May 11 18:24:46 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christopher Li X-Patchwork-Id: 2554551 Return-Path: X-Original-To: patchwork-linux-sparse@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 98EB0DF230 for ; Sat, 11 May 2013 18:24:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752467Ab3EKSYy (ORCPT ); Sat, 11 May 2013 14:24:54 -0400 Received: from mail-pb0-f43.google.com ([209.85.160.43]:56121 "EHLO mail-pb0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752209Ab3EKSYx (ORCPT ); Sat, 11 May 2013 14:24:53 -0400 Received: by mail-pb0-f43.google.com with SMTP id md12so3506679pbc.2 for ; Sat, 11 May 2013 11:24:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=SNy1j6iF737H1F9Iqj/DiOm16mzxZU3f+yy1OzJw060=; b=gJYvr/KgosImtcjdKjuamOWClITw0B4CW5ldlypXKbZSVMKWm0mgBPihFUEEtHyyZP SQMbixAzfvhTmgn1jwCAerg2kkLrgCjQ7NLK7uIhW2Vb1vGm3SsXFA1inBG++qz0OazQ CaTwlTm3XZrvZ7SXyNk5PxVaubk+89V+ERnoD9LBwqjUPI/oyKqKOwFYh9KdQvpqdkXi jq4C5iCGBS20WVCbTCsygimbQNrlXsXelDpCMbzvRTbTJXh+fGECSHo2YZGdWQtSs2S6 /Zc5PicAi0pNhba0F0fWdM+wadYwhqD23vht3KCVAyXKQsB3bMI+AxqX+m6soMCs5DQb 4kRg== X-Received: by 10.66.188.137 with SMTP id ga9mr23207465pac.9.1368296693042; Sat, 11 May 2013 11:24:53 -0700 (PDT) Received: from ideapad.lan ([112.96.100.26]) by mx.google.com with ESMTPSA id do4sm7397751pbc.8.2013.05.11.11.24.49 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Sat, 11 May 2013 11:24:52 -0700 (PDT) Message-ID: <518E8CEE.6060001@chrisli.org> Date: Sat, 11 May 2013 11:24:46 -0700 From: Christopher Li User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130402 Thunderbird/17.0.5 MIME-Version: 1.0 To: Xi Wang CC: linux-sparse@vger.kernel.org, Pekka Enberg Subject: Re: [PATCH] sparse, llvm: fix link errors References: <1368219684-4567-1-git-send-email-xi.wang@gmail.com> In-Reply-To: <1368219684-4567-1-git-send-email-xi.wang@gmail.com> Sender: linux-sparse-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sparse@vger.kernel.org On 05/10/2013 02:01 PM, Xi Wang wrote: > This patch fixes the following link errors. > > libLLVMSupport.a(Signals.o): In function `llvm::sys::PrintStackTrace(_IO_FILE*)': > Signals.inc:269: undefined reference to `dladdr' > Signals.inc:281: undefined reference to `dladdr' > -sparse-llvm_EXTRA_OBJS := $(LLVM_LIBS) > +sparse-llvm_EXTRA_OBJS := $(LLVM_LIBS) $(LLVM_LDFLAGS) The EXTRA_OBJS is only mean for real objects. the LDFLAGS should be not belong to here. I can't duplicate the link error myself. It seems that you only want the LLVM_LDFLAGS apply to sparse-llvm only. Can you try this patch? Thanks Chris --- To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/Makefile b/Makefile index 35e3801..549e669 100644 --- a/Makefile +++ b/Makefile @@ -84,7 +84,7 @@ HAVE_LLVM=no else LLVM_PROGS := sparse-llvm $(LLVM_PROGS): LD := g++ -LDFLAGS += $(shell llvm-config --ldflags) +$(LLVM_PROGS): LDFLAGS += $(shell llvm-config --ldflags) LLVM_CFLAGS := $(shell llvm-config --cflags | sed -e "s/-DNDEBUG//g") LLVM_LIBS := $(shell llvm-config --libs) PROGRAMS += $(LLVM_PROGS)