From patchwork Tue Mar 29 23:12:23 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Bridgman, John" X-Patchwork-Id: 8691611 Return-Path: X-Original-To: patchwork-dri-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 7286E9F36E for ; Tue, 29 Mar 2016 23:27:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 95BCD20351 for ; Tue, 29 Mar 2016 23:27:08 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 244D92034C for ; Tue, 29 Mar 2016 23:27:07 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BD9666E1A9; Tue, 29 Mar 2016 23:27:01 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from na01-bl2-obe.outbound.protection.outlook.com (mail-bl2on0087.outbound.protection.outlook.com [65.55.169.87]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9EE866E1A9 for ; Tue, 29 Mar 2016 23:26:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=vY8JjKTSpeXHZ4kU/YujfPoPFiRFiOUnfCT6kG7MyIU=; b=Xr6PJ4273tiqshd8CjFNqpuwRfhZXGZbNe9PDfyIMMKZ4DUP2HAq45ikWE7Hecicwi9rO11nv4JxhB8jIZxrcrHcRBYhzJsHxSL3jQdm/NushF8kN8bmfPNAfGu7QnP+aYX3qDsnuYeXDyhKMCAHRB4jJLF3qcq67XC05aPZjo4= Received: from DM3PR12MB0905.namprd12.prod.outlook.com (10.164.7.151) by DM3PR12MB0906.namprd12.prod.outlook.com (10.164.7.152) with Microsoft SMTP Server (TLS) id 15.1.447.15; Tue, 29 Mar 2016 23:12:23 +0000 Received: from DM3PR12MB0905.namprd12.prod.outlook.com ([10.164.7.151]) by DM3PR12MB0905.namprd12.prod.outlook.com ([10.164.7.151]) with mapi id 15.01.0447.023; Tue, 29 Mar 2016 23:12:23 +0000 From: "Bridgman, John" To: "dri-devel@lists.freedesktop.org" Subject: [PATCH] hsakmt: allow building with gcc 4.x v2 Thread-Topic: [PATCH] hsakmt: allow building with gcc 4.x v2 Thread-Index: AQHRihAxNmSyU6gfD02V9V+WxaROHw== Date: Tue, 29 Mar 2016 23:12:23 +0000 Message-ID: Accept-Language: en-CA, en-US Content-Language: en-CA X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: lists.freedesktop.org; dkim=none (message not signed) header.d=none; lists.freedesktop.org; dmarc=none action=none header.from=amd.com; x-originating-ip: [132.245.243.37] x-ms-office365-filtering-correlation-id: df92879b-8e54-40a1-d5a3-08d358279602 x-microsoft-exchange-diagnostics: 1; DM3PR12MB0906; 5:Petk9NcDF+SE9MU2gvlwU7byykTQWevCAMWPSUIlWMcBd/bKnW2WuB7LxUCUQpEl7uDcIVKUbquiy6yswgY4kgcMw/lPagDR+KrCCkA81PfxyY+mmC135izDS4o4Y4pKhCWCs5R8Zhxi1v6kZKkFTQ==; 24:tvM7WtdvGdCpKuKqWGrf23SFpbOHTXcyVWixQuTQ9CwXdj4HeYlmaysFBhObRQjTWl6nH301m5sEdF4doAB3GiZAJa7jm/YkIIbLXP4X3/c=; 20:rjQjq+s24pkcT/0OVyBiUojJKyjeL52yALJngoxalrxtIchXE5vO1Hl58mnv0ZaYTH4McAjUcD1aYL28zOOmZfHNTBpRqMdAmOiGan+5KjRe5ZaKQiKucNKB6YOjw9QROl023+LNzYKZgz02JxX3UMB65n4uJZIdm6+hWzhet1AiMt40Nsb5E+aY6P7DyHyoGqfEaNmuE/CuwNolaCwYBVaVdEylzkrUL4HdYdb8kqmL8OpcF1CHcgo16A9syRtZ x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DM3PR12MB0906; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001); SRVR:DM3PR12MB0906; BCL:0; PCL:0; RULEID:; SRVR:DM3PR12MB0906; x-forefront-prvs: 0896BFCE6C x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(229853001)(2351001)(74316001)(586003)(5003600100002)(1096002)(99286002)(450100001)(19580405001)(19580395003)(2906002)(106116001)(3660700001)(1220700001)(3846002)(3280700002)(5002640100001)(76576001)(122556002)(6116002)(102836003)(110136002)(107886002)(86362001)(5004730100002)(10400500002)(33656002)(5008740100001)(189998001)(66066001)(50986999)(2900100001)(11100500001)(92566002)(81166005)(87936001)(54356999)(2501003)(77096005); DIR:OUT; SFP:1101; SCL:1; SRVR:DM3PR12MB0906; H:DM3PR12MB0905.namprd12.prod.outlook.com; FPR:; SPF:None; MLV:sfv; LANG:en; spamdiagnosticoutput: 1:23 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Mar 2016 23:12:23.2327 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM3PR12MB0906 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham 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 The hsakmt code requires C99 compiler support, however gcc 4.x defaults to C89 (gcc 5 defaults to C11). v2 patch copies code from libdrm, using AC_PROG_CC_C99 and checking success. v1 used AC_PROG_CC_STDC and did not check C99 was enabled. Signed-off-by: John Bridgman Reviewed-by: Oded Gabbay --- configure.ac | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/configure.ac b/configure.ac index b8e9bea..0111067 100644 --- a/configure.ac +++ b/configure.ac @@ -66,6 +66,12 @@ AC_CANONICAL_HOST AC_PROG_AWK test_CFLAGS=${CFLAGS+set} # We may override autoconf default CFLAGS. AC_PROG_CC +AC_PROG_CC_C99 + +if test "x$ac_cv_prog_cc_c99" = xno; then + AC_MSG_ERROR([Building hsakmt requires C99 enabled compiler]) +fi + AC_PROG_INSTALL AC_PROG_LIBTOOL AC_PROG_MAKE_SET