From patchwork Tue Jul 23 10:22:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Petr_=C5=A0tetiar?= X-Patchwork-Id: 1135535 X-Patchwork-Delegate: ynezz@true.cz Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=true.cz Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Fbg1M+fx"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45tF1R2Lddz9s4Y for ; Tue, 23 Jul 2019 20:23:22 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:MIME-Version:Message-Id:Date:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=O5c3jp7JAIzx2s6/NhIuZkq1wbigAtZZvrAUnW6KLnU=; b=Fbg1M+fxGY4afs cgkX3Z3ZQy69gqWNP5o+Kjw45sTxSamYqMSUeneEMVmPxQ03yQRqnRC8X+me+blgWQ7fH2QmL2F6z +D186bbFmZ7Pb6P/jn6Y+itGkhnVsimeOvs6LoNZVoEN3z5sNOxyrzxCTOT9wq7e5BEsDdPW32U1T If6UMdz9woJUWdlSfWCfGADO30/4umAxfGHpleF22rC57DY7Mc7I1Xfz7F0mnZTHQlKeMkfOxmbxu 6oaC9+5tvds4aflbllzJgPYOALeeu0OHwBfBd7D08VrsC604NGvtGGcrTs1JOf7lauqhd95+WF6pm OSruJaCr1E0GgYH3QawA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hprwo-0007BC-MN; Tue, 23 Jul 2019 10:23:06 +0000 Received: from smtp-out.xnet.cz ([178.217.244.18]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hprwl-00077l-Tf for openwrt-devel@lists.openwrt.org; Tue, 23 Jul 2019 10:23:05 +0000 Received: from meh.true.cz (meh.true.cz [108.61.167.218]) (Authenticated sender: petr@true.cz) by smtp-out.xnet.cz (Postfix) with ESMTPSA id AFCED3C5E; Tue, 23 Jul 2019 12:22:55 +0200 (CEST) Received: by meh.true.cz (OpenSMTPD) with ESMTP id 2d724b4c; Tue, 23 Jul 2019 12:22:48 +0200 (CEST) From: =?utf-8?q?Petr_=C5=A0tetiar?= To: openwrt-devel@lists.openwrt.org Date: Tue, 23 Jul 2019 12:22:52 +0200 Message-Id: <20190723102252.30420-1-ynezz@true.cz> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190723_032304_111813_B03D1AF4 X-CRM114-Status: UNSURE ( 6.06 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [178.217.244.18 listed in list.dnswl.org] 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record Subject: [OpenWrt-Devel] [PATCH] build: rules.mk: allow overriding of HOSTCC and HOSTCXX X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Petr_=C5=A0tetiar?= Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Currently it's not possible to change the host compiler version during devlopment/test/fixing and one has to always hand edit rules.mk which is tiresome, so let's allow changing of those variables from make/env vars. Signed-off-by: Petr Štetiar Acked-by: Yousong Zhou --- rules.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rules.mk b/rules.mk index 80cb3d63f449..dc8a1bac8d83 100644 --- a/rules.mk +++ b/rules.mk @@ -245,8 +245,8 @@ PKG_CONFIG:=$(STAGING_DIR_HOST)/bin/pkg-config export PKG_CONFIG -HOSTCC:=gcc -HOSTCXX:=g++ +HOSTCC?=gcc +HOSTCXX?=g++ HOST_CPPFLAGS:=-I$(STAGING_DIR_HOST)/include $(if $(IS_PACKAGE_BUILD),-I$(STAGING_DIR_HOSTPKG)/include -I$(STAGING_DIR)/host/include) HOST_CFLAGS:=-O2 $(HOST_CPPFLAGS) HOST_LDFLAGS:=-L$(STAGING_DIR_HOST)/lib $(if $(IS_PACKAGE_BUILD),-L$(STAGING_DIR_HOSTPKG)/lib -L$(STAGING_DIR)/host/lib)