From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0069.outbound.protection.outlook.com [104.47.2.69]) by dpdk.org (Postfix) with ESMTP id 252E98D95 for ; Thu, 19 Apr 2018 19:06:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=msi47AT1ykT83hGSpzVunMinScOn30+k025pWVTNxSk=; b=LshyQWWzR09AqjwbgWKFZQY+kwOSyy23kSCSJk8f/IH0nVK6vp3651K03baUCDnMV7UimbDY4RCE40838U5vv3RtZePEOkPlDwl9SIaTX+q2zFGOzPoOzk0QW2HJZW1VdkH+oJ1sV8tEZw5EJKJO08rlsfy6LuN+ErA6K1cri4M= Received: from AM2PR04MB0753.eurprd04.prod.outlook.com (10.160.56.141) by AM2PR04MB0868.eurprd04.prod.outlook.com (10.161.70.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.675.14; Thu, 19 Apr 2018 17:06:41 +0000 Received: from AM2PR04MB0753.eurprd04.prod.outlook.com ([fe80::d4ee:e091:7253:7237]) by AM2PR04MB0753.eurprd04.prod.outlook.com ([fe80::d4ee:e091:7253:7237%8]) with mapi id 15.20.0675.015; Thu, 19 Apr 2018 17:06:41 +0000 From: Hemant Agrawal To: Bruce Richardson CC: "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH 1/2] build: fix kernel compile on cross-build Thread-Index: AQHT11kCMUUg/3WL7E6FfatpiXFYSKQIPCAggAAHtYCAAA748A== Date: Thu, 19 Apr 2018 17:06:41 +0000 Message-ID: References: <20180418210521.277384-1-bruce.richardson@intel.com> <20180418210521.277384-2-bruce.richardson@intel.com> <20180419161251.GA26648@bricha3-MOBL.ger.corp.intel.com> In-Reply-To: <20180419161251.GA26648@bricha3-MOBL.ger.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=nxp.com; x-originating-ip: [122.162.207.48] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; AM2PR04MB0868; 7:brUKKaTIrBiGKAty1fQosGmIuK7JSFanY4ORtytySx9Ums+nObTpU5rESO2DFwxZsXQ2Ba7ZjMhj9/sV+KYQLTbXhhc4TnxM92CgUI+ZpJr7IiKkhWJVWlgi2ezun8QQw+fRw76E9R+HRLTSo8gtSTZW5uipn8xdtA5IiyunD5dVA/LRiCU8L8Z95AKHbdy/cdGo4CXPZjtyVz4azjpDUx13JZhs5UxePTAxuGcOuUX1D5qtYKs+FQq3jTKu34zG x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(2017052603328)(7153060)(7193020); SRVR:AM2PR04MB0868; x-ms-traffictypediagnostic: AM2PR04MB0868: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(228905959029699); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231232)(944501327)(52105095)(3002001)(10201501046)(93006095)(93001095)(6055026)(6041310)(20161123564045)(20161123560045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(6072148)(201708071742011); SRVR:AM2PR04MB0868; BCL:0; PCL:0; RULEID:; SRVR:AM2PR04MB0868; x-forefront-prvs: 0647963F84 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(376002)(366004)(346002)(39860400002)(396003)(39380400002)(51444003)(13464003)(44832011)(86362001)(102836004)(26005)(8936002)(2900100001)(33656002)(6916009)(5660300001)(186003)(316002)(8676002)(305945005)(446003)(11346002)(7696005)(93886005)(3846002)(59450400001)(76176011)(2906002)(476003)(6506007)(81166006)(74316002)(229853002)(7736002)(6436002)(55016002)(6246003)(9686003)(66066001)(6116002)(25786009)(3660700001)(3280700002)(4326008)(5250100002)(478600001)(53936002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM2PR04MB0868; H:AM2PR04MB0753.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; MLV:sfv; x-microsoft-antispam-message-info: 29JnEsAlyrbL6LPuN5yarJTYvGBi00s+z/3OUhSwU2kdZChZwP8YNul8mi99NyEw4JKRnjbFe2WMBNgT6ryWgJe+zdKFqKZHVCbbB68iD/hWHwfXldfL6pqIi8QiFQCKuuZbnFJaYzwUQO3vHSvoIRAJ/lna8ktFL6zEB8RNj2abPxHzwHgG/t8xdXDQAV8o spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 5794c77e-d13d-4d5a-c572-08d5a617ebc3 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5794c77e-d13d-4d5a-c572-08d5a617ebc3 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Apr 2018 17:06:41.1536 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM2PR04MB0868 Subject: Re: [dpdk-dev] [PATCH 1/2] build: fix kernel compile on cross-build X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Apr 2018 17:06:42 -0000 > > > -----Original Message----- > > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Bruce > > > Richardson > > > > > > When cross-compiling, if no kernel_dir was specified, then the > > > kernel modules were still being compiled for the build machine. Fix > > > this by only building modules on cross-compile when we have a kernel_= dir > value set. > > > > > > Fixes: a52f4574f798 ("igb_uio: build with meson") > > > > > > Signed-off-by: Bruce Richardson > > > --- > > > meson.build | 6 +++++- > > > 1 file changed, 5 insertions(+), 1 deletion(-) > > > > > > diff --git a/meson.build b/meson.build index cc16595cb..9e3b44931 > > > 100644 > > > --- a/meson.build > > > +++ b/meson.build > > > @@ -26,10 +26,14 @@ subdir('config') > > > > > > # build libs and drivers > > > subdir('lib') > > > -subdir('kernel') > > > subdir('buildtools') > > > subdir('drivers') > > > > > > +# build kernel modules if we have a kernel path, or we are not > > > +cross compiling if get_option('kernel_dir') !=3D '' or not meson.is_= cross_build() > > > + subdir('kernel') > > > +endif > > > > [Hemant] actually kernel_dir may not be always available on host. > > So unless kernel_dir is available - irrespective of host/cross - it > > shall not try kernel compilation. > > >=20 > Well, for many native builds the kernel directory can be computed by > looking at `uname -r`, but which won't work for cross-compilation. Given > that there is already an option to disable kernel module compilation > completely, I think that the default for native builds should be try and > build modules for the running kernel. >=20 > However, we could certainly add in a check to see if the kernel sources a= re > available, and optionally not build them in that case - i.e. convert the > error due to non-existant kernel headers into a warning message. Do you > think that might be a good compromise? [Hemant] Yes. A warning instead of error is good in this case. >=20 > /Bruce