From patchwork Tue Nov 1 18:00:05 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 9407793 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 48EA760234 for ; Tue, 1 Nov 2016 18:03:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3FAC529A8A for ; Tue, 1 Nov 2016 18:03:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3428E29A8F; Tue, 1 Nov 2016 18:03:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 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.wl.linuxfoundation.org (Postfix) with ESMTPS id A2B8829A8A for ; Tue, 1 Nov 2016 18:03:02 +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 1c1dMD-000118-5U; Tue, 01 Nov 2016 18:00:21 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c1dMB-000112-E7 for xen-devel@lists.xenproject.org; Tue, 01 Nov 2016 18:00:19 +0000 Received: from [85.158.139.211] by server-7.bemta-5.messagelabs.com id 27/27-19310-238D8185; Tue, 01 Nov 2016 18:00:18 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrCLMWRWlGSWpSXmKPExsVyhffoU12DGxI RBhsW81h83zKZyYHR4/CHKywBjFGsmXlJ+RUJrBnfH3xnLdjFU9H//C9rA+Mzri5GTg4hgReM EleX+oHYbAJaEj+nTGUBsUUElCTurZrMBGIzC5RJfDy5GMjm4BAWiJH495gRJMwioCrRcOY/M 4jNK2AtMfP8DrByCQF5iQtXT4GN4RRwlJi4q48VYpWDxJnzq1gnMHItYGRYxahRnFpUllqka2 ikl1SUmZ5RkpuYmaNraGCql5taXJyYnpqTmFSsl5yfu4kR6EMGINjB2DfL+RCjJAeTkijvnQM SEUJ8SfkplRmJxRnxRaU5qcWHGGU4OJQkeC9dA8oJFqWmp1akZeYAgwkmLcHBoyTCu/oqUJq3 uCAxtzgzHSJ1ilGX482ulw+YhFjy8vNSpcR5p4LMEAApyijNgxsBC+xLjLJSwryMQEcJ8RSkF uVmlqDKv2IU52BUEua9ATKFJzOvBG7TK6AjmICOME8CO6IkESEl1cBYZRp2VGpN628T7d9Mhs qNs3Qet12Y0FU+s+GqQvRGJ+svPax/hTee6HsrNuuJw/NrBd8zXXTSphl0rY6M3t9lkpP+gGX ts4gLjIrsoZ0flXcZGvg2b3zU/WTLua0S3ZEmbs+81zg/2NSu2XTbYTk/w67pGVHzXuvdnZaZ HWkQ81tqdlSTl74SS3FGoqEWc1FxIgAOejDFZwIAAA== X-Env-Sender: ijackson@chiark.greenend.org.uk X-Msg-Ref: server-14.tower-206.messagelabs.com!1478023216!29135035!1 X-Originating-IP: [212.13.197.229] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.0.13; banners=-,-,- X-VirusChecked: Checked Received: (qmail 34323 invoked from network); 1 Nov 2016 18:00:16 -0000 Received: from chiark.greenend.org.uk (HELO chiark.greenend.org.uk) (212.13.197.229) by server-14.tower-206.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 1 Nov 2016 18:00:16 -0000 Received: from [172.18.45.5] (helo=zealot.relativity.greenend.org.uk) by chiark.greenend.org.uk (Debian Exim 4.84_2 #1) with esmtp (return-path ijackson@chiark.greenend.org.uk) id 1c1dM7-0005X8-Md; Tue, 01 Nov 2016 18:00:15 +0000 From: Ian Jackson To: xen-devel@lists.xenproject.org Date: Tue, 1 Nov 2016 18:00:05 +0000 Message-Id: <20161101180005.14897-1-ian.jackson@citrix.com> X-Mailer: git-send-email 2.10.1 In-Reply-To: <22552.54770.959229.506489@mariner.uk.xensource.com> References: <22552.54770.959229.506489@mariner.uk.xensource.com> Cc: Ian Jackson , Jan Beulich , Andrew Cooper Subject: [Xen-devel] [PATCH for-4.8 v2] tools/tests/x86_emulator: Pass -no-pie -fno-pic to gcc on x86_32 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: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP The current build fails with GCC6 on Debian sid i386 (unstable): /tmp/ccqjaueF.s: Assembler messages: /tmp/ccqjaueF.s:3713: Error: missing or invalid displacement expression `vmovd_to_reg_len@GOT' This is due to the combination of GCC6, and Debian's decision to enable some hardening flags by default (to try to make runtime addresses less predictable): https://wiki.debian.org/Hardening/PIEByDefaultTransition This is of no benefit for the x86 instruction emulator test, which is a rebuild of the emulator code for testing purposes only. So pass options to disable this. These options will be no-ops if they are the same as the compiler default. On amd64, the -fno-pic breaks the build in a different way. So do this only on i386. Signed-off-by: Ian Jackson CC: Jan Beulich CC: Andrew Cooper squash! tools/tests/x86_emulator: Pass -no-pie -fno-pic to gcc Signed-off-by: Ian Jackson --- tools/tests/x86_emulator/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/tests/x86_emulator/Makefile b/tools/tests/x86_emulator/Makefile index 13ace9a..d349c0f 100644 --- a/tools/tests/x86_emulator/Makefile +++ b/tools/tests/x86_emulator/Makefile @@ -45,6 +45,10 @@ x86_emulate/x86_emulate.c x86_emulate/x86_emulate.h: HOSTCFLAGS += $(CFLAGS_xeninclude) +ifeq ($(XEN_TARGET_ARCH),x86_32) +HOSTCFLAGS += -no-pie -fno-pic +endif + x86_emulate.o: x86_emulate.c x86_emulate/x86_emulate.c x86_emulate/x86_emulate.h $(HOSTCC) $(HOSTCFLAGS) -c -g -o $@ $<