From patchwork Tue Apr 29 11:09:24 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 29333 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f197.google.com (mail-ie0-f197.google.com [209.85.223.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 5F849202FE for ; Tue, 29 Apr 2014 11:09:28 +0000 (UTC) Received: by mail-ie0-f197.google.com with SMTP id rd18sf234554iec.0 for ; Tue, 29 Apr 2014 04:09:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=Fmv8WF1e5pCyIlJ/w7ocSQ92JQEk3g2bVztjAWav/Nk=; b=V+TyLfag2mJ3LIXnwDdAWu8tYtwNDIaSs3vbBWve/+HiH+9Ztpbl4NuKEM5EPtl0kZ pwRGQCox/rern8kTMwU4kGGJb66vrBqvKl24J1TK4dqc2eIQkikc/bzcjA7+/posyvtR p16kdupsBLSjeROhk4v1uF+ER0sax8zq6dsti1TexAFv5CR9UHbkD2jFTRdQwhA/f0BK 9ithjA/AmjPQM1rC25LXNWAHxxlZgqdr/azX+cHOIwPoCBe3jA2VMEE2mNQxTJTEGgML ciSQIjmPr1DY0QVhyR2LVVmQMWSigoVc+IPCbUk+VxFp4phDMQAOG0DwX6z1GyhhwtrN oqKg== X-Gm-Message-State: ALoCoQly75dUb1Ci726865JuxgzSl6QvmVa2iEy3Oik9lBh+HHo3+W7U0Y16v+ZNnFeBOszxhdKa X-Received: by 10.42.155.137 with SMTP id u9mr13947795icw.12.1398769767574; Tue, 29 Apr 2014 04:09:27 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.86.170 with SMTP id p39ls51563qgd.49.gmail; Tue, 29 Apr 2014 04:09:27 -0700 (PDT) X-Received: by 10.220.12.66 with SMTP id w2mr28623813vcw.15.1398769767300; Tue, 29 Apr 2014 04:09:27 -0700 (PDT) Received: from mail-vc0-f171.google.com (mail-vc0-f171.google.com [209.85.220.171]) by mx.google.com with ESMTPS id ph6si4415925veb.215.2014.04.29.04.09.27 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 29 Apr 2014 04:09:27 -0700 (PDT) Received-SPF: none (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) client-ip=209.85.220.171; Received: by mail-vc0-f171.google.com with SMTP id ld13so45500vcb.2 for ; Tue, 29 Apr 2014 04:09:27 -0700 (PDT) X-Received: by 10.52.37.130 with SMTP id y2mr469105vdj.38.1398769767197; Tue, 29 Apr 2014 04:09:27 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp188076vcb; Tue, 29 Apr 2014 04:09:26 -0700 (PDT) X-Received: by 10.180.76.146 with SMTP id k18mr19699723wiw.5.1398769766240; Tue, 29 Apr 2014 04:09:26 -0700 (PDT) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [2001:8b0:1d0::1]) by mx.google.com with ESMTPS id cd10si1114622wib.94.2014.04.29.04.09.25 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 29 Apr 2014 04:09:26 -0700 (PDT) Received-SPF: none (google.com: pm215@archaic.org.uk does not designate permitted sender hosts) client-ip=2001:8b0:1d0::1; Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1Wf5ue-0006de-D2; Tue, 29 Apr 2014 12:09:24 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, Stefan Weil , qemu-trivial@nongnu.org, Michael Tokarev Subject: [PATCH v2] tests/tcg: Fix compilation of test_path Date: Tue, 29 Apr 2014 12:09:24 +0100 Message-Id: <1398769764-25493-1-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: peter.maydell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , The test_path binary is (unlike the other test binaries in tests/tcg) actually intended to be compiled with the same compiler used to build the main QEMU executables. It actually #includes a number of the QEMU source files in an attempt to unit-test the util/path.c functions, and so if it is not compiled with the same compiler used by configure to set CONFIG_ settings then it is liable to fail to build. Fix the makefile to build it with the default C compiler rules, not CC_I386, and fix the test itself not to include a lot of unnecessary trace related source files which cause the build to fail if the trace backend is anything other than 'simple'. Signed-off-by: Peter Maydell --- Changes v1->v2: * drop the CC lines entirely, and drop define of _GNU_SOURCE since we can get that from our cflags via the default .c->.o rule tests/tcg/Makefile | 2 -- tests/tcg/test_path.c | 7 ------- 2 files changed, 9 deletions(-) diff --git a/tests/tcg/Makefile b/tests/tcg/Makefile index 24e3154..89e3342 100644 --- a/tests/tcg/Makefile +++ b/tests/tcg/Makefile @@ -81,10 +81,8 @@ run-test_path: test_path # rules to compile tests test_path: test_path.o - $(CC_I386) $(LDFLAGS) -o $@ $^ $(LIBS) test_path.o: test_path.c - $(CC_I386) $(QEMU_INCLUDES) $(GLIB_CFLAGS) $(CFLAGS) -c -o $@ $^ hello-i386: hello-i386.c $(CC_I386) -nostdlib $(CFLAGS) -static $(LDFLAGS) -o $@ $< diff --git a/tests/tcg/test_path.c b/tests/tcg/test_path.c index f8dd36a..1c29bce 100644 --- a/tests/tcg/test_path.c +++ b/tests/tcg/test_path.c @@ -1,17 +1,10 @@ /* Test path override code */ -#define _GNU_SOURCE #include "config-host.h" #include "util/cutils.c" #include "util/hexdump.c" #include "util/iov.c" #include "util/path.c" #include "util/qemu-timer-common.c" -#include "trace/control.c" -#include "../trace/generated-events.c" -#ifdef CONFIG_TRACE_SIMPLE -#include "trace/simple.c" -#endif - #include #include #include