From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-we0-f175.google.com (mail-we0-f175.google.com [74.125.82.175]) by dpdk.org (Postfix) with ESMTP id D93DD5919 for ; Fri, 18 Apr 2014 13:23:20 +0200 (CEST) Received: by mail-we0-f175.google.com with SMTP id q58so1454951wes.6 for ; Fri, 18 Apr 2014 04:23:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=tFE4VqNH83QeXWR0bS8xyFuSGpXgAhQjrqYrO2d+AxA=; b=VILRtc0cloZPInnUmNN+gKJTbtQvrbiikgmad+qW2CEoiA9Gk7gP1uQuXhhVOGWK6B 3/+cVccncSs7t5Ij8gfvbbBU95sSYZiVdzOIIaYBWiuSnyTCrChCStko4dP73e9t59C7 ZjB92Ssv1KpAa2VWYmTpfNhbk8QIOLf1ZZ0DKXuvGE0ImaeTx5lzPYxS4MwhWZUYIcj8 7IRNwLVQKlYpZK91nYVLdJHDzRMGdUxSL5xzNhdGd4/3l9EvwqEnnXk/Sc9SKXfEBn/+ 7JmDUnp53ZY6gVuZZZIjGq9EoR/5UbBPwtO6LReHQD3fHNUkltE8vGfG3f7+JlCZEwMx QVyA== X-Gm-Message-State: ALoCoQn3T2T1bjf3FSWtN07v6nu5KY5cXPj2pFgZnVy9OwLd+pwglXC1CQA8g/ZXok9j6E8K7u6Y X-Received: by 10.194.203.2 with SMTP id km2mr270143wjc.72.1397820201596; Fri, 18 Apr 2014 04:23:21 -0700 (PDT) Received: from xps13.localnet (6wind.net2.nerim.net. [213.41.180.237]) by mx.google.com with ESMTPSA id dg7sm43195378wjc.4.2014.04.18.04.23.19 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Apr 2014 04:23:20 -0700 (PDT) From: Thomas Monjalon To: Neil Horman Date: Fri, 18 Apr 2014 13:23:19 +0200 Message-ID: <465940823.XQ0HDUOTVm@xps13> Organization: 6WIND User-Agent: KMail/4.12.4 (Linux/3.14.1-1-ARCH; KDE/4.12.4; x86_64; ; ) In-Reply-To: <1397656304-468-1-git-send-email-nhorman@tuxdriver.com> References: <1397585169-14537-2-git-send-email-nhorman@tuxdriver.com> <1397656304-468-1-git-send-email-nhorman@tuxdriver.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH 01/15 v2] makefiles: Fixed -share command line option error X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Apr 2014 11:23:21 -0000 Hi Neil, 2014-04-16 09:51, Neil Horman: > The shared libraries built with the current makefile set produce static > libraries rather than actual shared objects. This is due to several missing > options that are required to correctly build shared objects using ld, as > well as a mis-specified -share option (which should be -shared). Switching > to the use of CC rather than LD and fixing the -shared option corrects > these problems and builds the DSOs correctly. > > Signed-off-by: Neil Horman [...] > --- a/mk/rte.lib.mk > +++ b/mk/rte.lib.mk [...] > +ifeq ($(LINK_USING_CC),1) > +# Override the definition of LD here, since we're linking with CC > +LD := $(CC) > +endif [...] > -O_TO_S = $(LD) $(CPU_LDFLAGS) -z muldefs -share $(OBJS-y) -o $(LIB) > +O_TO_S = $(LD) $(CPU_LDFLAGS) -z muldefs -shared $(OBJS-y) -o $(LIB) I think that CPU_LDFLAGS should be prefixed with -Wl, in case of CC linking. So blindly assigning CC to LD variable seems a bad idea. Other makefiles have different O_TO_S commands depending of LINK_USING_CC. > --- a/mk/rte.sharelib.mk > +++ b/mk/rte.sharelib.mk [...] > -O_TO_S = $(LD) $(CPU_LDFLAGS) -share $(OBJS) -o $(RTE_OUTPUT)/lib/$(LIB_ONE) > +O_TO_S = $(LD) $(CPU_LDFLAGS) -shared $(OBJS) -o $(RTE_OUTPUT)/lib/$(LIB_ONE) Why not using CC here whether LINK_USING_CC is enabled? Feel free to send a v3 ;) -- Thomas