From patchwork Tue Apr 26 14:52:23 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Roger_Pau_Monn=C3=A9?= X-Patchwork-Id: 8939661 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 564E89F1D3 for ; Tue, 26 Apr 2016 14:55:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 86C56201F2 for ; Tue, 26 Apr 2016 14:55:18 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A6EE2201EF for ; Tue, 26 Apr 2016 14:55:17 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1av4Mc-0007oP-8D; Tue, 26 Apr 2016 14:53:22 +0000 Received: from mail6.bemta6.messagelabs.com ([85.158.143.247]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1av4Mb-0007mO-1G for xen-devel@lists.xenproject.org; Tue, 26 Apr 2016 14:53:21 +0000 Received: from [85.158.143.35] by server-2.bemta-6.messagelabs.com id A9/60-09532-0E08F175; Tue, 26 Apr 2016 14:53:20 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrGIsWRWlGSWpSXmKPExsXitHRDpO79Bvl wg4Y+G4vvWyYzOTB6HP5whSWAMYo1My8pvyKBNWPx7l6mgttcFQvP7WZsYFzD2cXIySEh4C+x a91vdhCbTUBH4uLcnWxdjBwcIgIqErf3GoCEmQWKJb6u6mMFsYUFAiRuty9nBilhEVCVWPtcD CTMK+AqsanzEjPERF2Jk7s3gU3kBIpvXvCKCcQWEnCRWLLpMTtEvaDEyZlPWCDGa0q0boe4gF lAXqJ562xmiHpFif55D9ggZnJL3D49lXkCI/8sJO2zkLTPQtK+gJF5FaN6cWpRWWqRrqFeUlF mekZJbmJmjq6hgZlebmpxcWJ6ak5iUrFecn7uJkZg+DEAwQ7Gnc+dDjFKcjApifJyAsNSiC8p P6UyI7E4I76oNCe1+BCjDAeHkgTvlnqgnGBRanpqRVpmDjASYNISHDxKIrz7QNK8xQWJucWZ6 RCpU4yKUuK8U0ASAiCJjNI8uDZY9F1ilJUS5mUEOkSIpyC1KDezBFX+FaM4B6OSMO85kCk8mX klcNNfAS1mAlp8+ZAsyOKSRISUVAOjXETLq5j0WzzGEZzCvdH7lwivX8KtufP7huM+mxLXb3o SN09jdv427vYmEccfu6JS/T7uu6UhO+d6csb8yZ931nrsi/fesPCuVtl3kajpXK8OqmvqLlr6 o7DsGvtRyS8ekX++pISabuDm84vbYh268bzEU/uzuRPMp53pVHu32Xfm4wNV/ttXK7EUZyQaa jEXFScCAKetgr+5AgAA X-Env-Sender: prvs=917dd492e=roger.pau@citrix.com X-Msg-Ref: server-8.tower-21.messagelabs.com!1461682398!11323488!1 X-Originating-IP: [66.165.176.89] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni44OSA9PiAyMDMwMDc=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 8.34; banners=-,-,- X-VirusChecked: Checked Received: (qmail 58505 invoked from network); 26 Apr 2016 14:53:19 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-8.tower-21.messagelabs.com with RC4-SHA encrypted SMTP; 26 Apr 2016 14:53:19 -0000 X-IronPort-AV: E=Sophos;i="5.24,537,1454976000"; d="scan'208";a="349876792" From: Roger Pau Monne To: Date: Tue, 26 Apr 2016 16:52:23 +0200 Message-ID: <1461682343-20597-15-git-send-email-roger.pau@citrix.com> X-Mailer: git-send-email 2.6.4 (Apple Git-63) In-Reply-To: <1461682343-20597-1-git-send-email-roger.pau@citrix.com> References: <1461682343-20597-1-git-send-email-roger.pau@citrix.com> MIME-Version: 1.0 X-DLP: MIA2 Cc: Wei Liu , Ian Jackson , Roger Pau Monne Subject: [Xen-devel] [PATCH v2 for-4.7 14/14] tools/python: corrently use LDFLAGS and CFLAGS X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP It is incorrect to add the LDFLAGS to the CFLAGS, and some compilers will error out if linker flags are passed when creating object files. Fix this by properly passing CFLAGS and LDFLAGS, instead of putting everything in CFLAGS. Signed-off-by: Roger Pau Monné Reviewed-by: Doug Goldstein Acked-by: Wei Liu --- Cc: Ian Jackson Cc: Wei Liu --- tools/python/Makefile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/python/Makefile b/tools/python/Makefile index 2363537..da08f46 100644 --- a/tools/python/Makefile +++ b/tools/python/Makefile @@ -4,7 +4,8 @@ include $(XEN_ROOT)/tools/Rules.mk .PHONY: all all: build -PY_CFLAGS = $(CFLAGS) $(PY_NOOPT_CFLAGS) $(LDFLAGS) $(APPEND_LDFLAGS) +PY_CFLAGS = $(CFLAGS) $(PY_NOOPT_CFLAGS) +PY_LDFLAGS = $(LDFLAGS) $(APPEND_LDFLAGS) .PHONY: build build: @@ -14,8 +15,9 @@ build: install: $(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN) - CC="$(CC)" CFLAGS="$(PY_CFLAGS)" $(PYTHON) setup.py install \ - $(PYTHON_PREFIX_ARG) --root="$(DESTDIR)" --force + CC="$(CC)" CFLAGS="$(PY_CFLAGS)" LDFLAGS="$(PY_LDFLAGS)" $(PYTHON) \ + setup.py install $(PYTHON_PREFIX_ARG) --root="$(DESTDIR)" \ + --force $(INSTALL_PROG) scripts/convert-legacy-stream $(DESTDIR)$(LIBEXEC_BIN) $(INSTALL_PROG) scripts/verify-stream-v2 $(DESTDIR)$(LIBEXEC_BIN)