From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io0-f178.google.com (mail-io0-f178.google.com [209.85.223.178]) by dpdk.org (Postfix) with ESMTP id 04007298F for ; Wed, 24 Feb 2016 17:43:38 +0100 (CET) Received: by mail-io0-f178.google.com with SMTP id z135so51162030iof.0 for ; Wed, 24 Feb 2016 08:43:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=m9gBw/xd9RfPSdHoSJ9phypJW3JpUuF6sOklxY13QU0=; b=E64OT4MBEg0/JxZfTqrNTPVRW0Vd9eLNT3ZhfhN2AA/W8yfQVb13uvdiIa5A5qWB+v Tr4GIdVHpnTWb/cV6uCQif04Be2ebU9ie2hbEKKns59x1lEyCs5xj15QnWLXnV0JmkzE ETk/7FgY2VBY8p5WYY9EcB+E5mp1HzurBzuxI4yvk1Lrm+5G0oLBu2NaYEksQVSQp/aH aPVPdzagfhc+BDR4u4XnIhRdmyIQYe8KsIahqbhAGXDPJUI43YNnmu+VzfG4xQUwHutd OJV1ipfPkpj5Wrtz461QNJR4AW5lb0yyO0I5MaHPXQ/Ueh8kAU9uxhDC+YCbfmeCzBen 7y5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=m9gBw/xd9RfPSdHoSJ9phypJW3JpUuF6sOklxY13QU0=; b=LdMGTYQF2uqlNk6S7dxdJHhcEOxbJfBC4oGPw3KmiGU3CaiJ5SKuCJHCE+Z4A1yJQK ZvKytQsFDthCblDofOMXHkMPVgWr+gsWnVrMYm2DMu9Or7uDhGc5BHujFWPxGs5YEqNf NFWmWNUw0RKcgndCk+dtlqWfj4if6NcUSQan3R+QekgLrBiHJXUvyxfBkOxayqPDNuyu SPWWmeEw3du/KfLCLjfL4z36vKVja2enjpf4UadQi6e2fcbFaVG74HjKK/XRPmbdr4n5 BHEfvWtWOxq9Cj/K7tPPrTnbdS7aQCSTQS94bq8M/VouTj/9YCtONhRz55NzA3VTfXtC c0og== X-Gm-Message-State: AG10YOTyOy6Cze4uWpgpbqYvXRCS/XqDw7GWnSmofEUDv7Hsq0K6xfgBq2oVYNIaZYPQZKk70jao0Xd+ZZtMtQ== MIME-Version: 1.0 X-Received: by 10.107.28.82 with SMTP id c79mr36789020ioc.86.1456332215931; Wed, 24 Feb 2016 08:43:35 -0800 (PST) Received: by 10.36.203.131 with HTTP; Wed, 24 Feb 2016 08:43:35 -0800 (PST) In-Reply-To: <7557103.ADgOLz8lG7@xps13> References: <7557103.ADgOLz8lG7@xps13> Date: Wed, 24 Feb 2016 10:43:35 -0600 Message-ID: From: Stefan Puiu To: Thomas Monjalon Content-Type: text/plain; charset=UTF-8 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] including rte.app.mk from a Makefile.am 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: Wed, 24 Feb 2016 16:43:38 -0000 On Wed, Feb 24, 2016 at 3:26 AM, Thomas Monjalon wrote: > Yes it is prefixed when used instead of assignment. > In 2.2, it is better fixed: > > ifeq ($(LINK_USING_CC),1) > override EXTRA_LDFLAGS := $(call linkerprefix,$(EXTRA_LDFLAGS)) > O_TO_EXE = $(CC) $(CFLAGS) $(LDFLAGS_$(@)) \ > -Wl,-Map=$(@).map,--cref -o $@ $(OBJS-y) $(call linkerprefix,$(LDFLAGS)) \ > $(EXTRA_LDFLAGS) $(call linkerprefix,$(LDLIBS)) > > So everything is properly prefixed. > > Could you please better describe your issue? > Is $(LINK_USING_CC) true in your case? Yes, everything would be perfect if the O_TO_EXE part was used. As far as I can tell, that's not how automake works. You just set bin_programs, _SOURCES, _CFLAGS and then it generates the Makefile code to build your stuff, which is different from the above thing; it also uses LDFLAGS, which it treats as a user variable. In 1.7.1, LDFLAGS is prefixed properly. In 2.2, it's not prefixed, so the build system ends up calling gcc with linker options. I'm not implying this is something that should be fixed in the DPDK; I was just trying to see how others handle this. > > Yes, mk/rte.app.mk is primarily used by internal apps. > If an external app don't want to use the DPDK makefiles, it should be > possible to use pkgconfig on DPDK. I hadn't time yet to write a patch for > pkgconfig support, so any contribution is welcome. I'm not very familiar with pkgconfig, but if it can supply some *FLAGS to build against, then it sounds good. I've worked on a project where we built with scons, so including mk files wasn't much of an option. Thanks, Stefan.