From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olaf Hering Subject: Re: [PATCH] tools/qemu-xen: remove CFLAGS for qemu build Date: Fri, 2 Mar 2012 12:51:25 +0100 Message-ID: <20120302115125.GA15758@aepfle.de> References: <5bdbdcb03d60a7b58f41.1330015557@probook.site> <20303.46312.444472.874775@mariner.uk.xensource.com> <20120301175325.GA8395@aepfle.de> <20303.48626.173624.191033@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20303.48626.173624.191033@mariner.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Jackson , Roger Pau Monne Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On Thu, Mar 01, Ian Jackson wrote: > Olaf Hering writes ("Re: [Xen-devel] [PATCH] tools/qemu-xen: remove CFLAGS for qemu build"): > > Its a way to pass RPM_OPT_FLAGS to build the tools. This includes things > > like fortify-source (whatever the exact spelling is) and other global > > flags to build a distro. > > What other ways exist to pass that to the buildsystem for the tools? > > This is what EXTRA_CFLAGS and PREPEND_INCLUDES and so forth are for. EXTRA_CFLAGS is only used by ipxe. I think that there should be a way to pass individual external CFLAGS to the tools, ipxe, qemu-traditional, qemu-xen, etc builds. >>From a distro perspective, its required to build libraries and binaries with certain global cflags. Up to the point when qemu-upstream was imported it worked as expected by exporting CFLAGS before 'make tools'. Now qemu-upstream reuses these CFLAGS, but it cant deal with the result. How about something like this: env \ EXTRA_CFLAGS_XEN_TOOLS="$RPM_OPT_FLAGS" \ EXTRA_CFLAGS_QEMU_UPSTREAM="" \ EXTRA_CFLAGS_IPXE="" \ ./configure Then configure can pass these to the various Makefiles. In case of qemu its configure could be invoked like env \ CFLAGS="$(EXTRA_CFLAGS_QEMU_UPSTREAM)" \ $source/configure In case of ipxe it would be "EXTRA_CFLAGS=$(EXTRA_CFLAGS_IPXE)". I think you get the idea. Right now I see the need for external CFLAGS only for tools itself, but if the options are there one can use them also for the other targets if there is a demand for it. Olaf