From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f46.google.com (mail-wm0-f46.google.com [74.125.82.46]) by dpdk.org (Postfix) with ESMTP id 3C4433237 for ; Thu, 14 Jul 2016 10:20:34 +0200 (CEST) Received: by mail-wm0-f46.google.com with SMTP id r190so3150895wmr.0 for ; Thu, 14 Jul 2016 01:20:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:user-agent:in-reply-to :references:mime-version:content-transfer-encoding; bh=uCtykyepqmqYt0wlcKG04OKcAaHk66xIA7guqhC8LQo=; b=aFrCpQac0Sj//llSKL7Zse4A+QV+CGkBJqLOYN8A7O7qlxhMV93/FIR40il09WBkL/ Vwm8CPJ+O9QSyK4YCnDMqtufcw2KKJd8ved/SpsrdY/kY0edlteXOtyFGWgiWvxIffif qefxJL2nw3hxxHiqBWpXYR2fi1Z8soUvnev+QPOfnlfBPWVvL1pTaQ8x+TOWee767kEo nXxs3kSE147ngGKjvXI55tmifM71U9t6uGLod3AYB+fGYLCjkbDaARKSJscPsBdZz379 2swSXGZKJFLXe2pqs98IcN5vPdZzBfuz2RbY2Ajah0FEw49Sx4ficBcMf+pHBk1NufWw sEuA== 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:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=uCtykyepqmqYt0wlcKG04OKcAaHk66xIA7guqhC8LQo=; b=JmgEoYohrnQmbk30SuL4nlqrccREf3LkLi72OgjHLisiAX2MIl5CVq65XznuA6vQk+ cv/TQx+aygFcGCzw/vXQGhjMJVHvgWWyJ+umkkwgnwwzm89apHLv0MomyxuOwSQMsQqe zYJpgXyqNuYhiQrP/iJVAAjLqcX48Gn4QdRNJP7+Igf6wWQOGfI6sUJq1sLwzzft9XGq GNLYmMbgVWMljJ1XthuBgZx8R1Y+0aq4VJ8e4m1ikfdGUxelZ04ws01Qzw/pTCNJW9I/ QFdNkX7+M3kVis2oTOL9+NbmmyL2gP1Y0ajc4h1dLT9W0weW2gHudPWB/HHPc6HrJo6C lYIA== X-Gm-Message-State: ALyK8tKlMBVvaerClirgTXocX4sh4ytHBwnTbxFoX5eKfg6RIslNAuHFzR7qXKSxGa/3WOO5 X-Received: by 10.28.169.203 with SMTP id s194mr14937701wme.95.1468484433996; Thu, 14 Jul 2016 01:20:33 -0700 (PDT) Received: from xps13.localnet (184.203.134.77.rev.sfr.net. [77.134.203.184]) by smtp.gmail.com with ESMTPSA id p83sm1569948wma.18.2016.07.14.01.20.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Jul 2016 01:20:33 -0700 (PDT) From: Thomas Monjalon To: "Damjan Marion (damarion)" Cc: dev@dpdk.org Date: Thu, 14 Jul 2016 10:20:31 +0200 Message-ID: <2746154.p2WhExbrR9@xps13> User-Agent: KMail/4.14.10 (Linux/4.5.4-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Subject: Re: [dpdk-dev] 16.07-rc2 issue with rte_rtm_init(void) constructor 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: Thu, 14 Jul 2016 08:20:34 -0000 2016-07-13 22:58, Damjan Marion: > I have issues with linking application to 16.07-rc2. >=20 > Looks like reason is constructor function in include file, > so our unit test apps are failing to link as they are not linked with= dpdk libs. > (and they should not be as they are not calling any dpdk function). I don't understand: Why are you linking DPDK if you do not use any DPDK function? > static inline void __attribute__((constructor)) > rte_rtm_init(void) > { > rtm_supported =3D rte_cpu_get_flag_enabled(RTE_CPUFLAG_RTM); > } >=20 > linking fails with: > dpdk/include/rte_spinlock.h:103: undefined reference to `rte_cpu_get_= flag_enabled=E2=80=99 >=20 > Is there any chance that this one is moved to some .c file, so it is = loaded > only when it is really needed? Yes it could be moved to lib/librte_eal/common/arch/x86/.