From patchwork Tue Feb 12 19:33:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 10808613 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 78AEC922 for ; Tue, 12 Feb 2019 19:33:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 687D228733 for ; Tue, 12 Feb 2019 19:33:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5CDC02874E; Tue, 12 Feb 2019 19:33:58 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B3DDB28733 for ; Tue, 12 Feb 2019 19:33:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731883AbfBLTd5 (ORCPT ); Tue, 12 Feb 2019 14:33:57 -0500 Received: from antares.kleine-koenig.org ([94.130.110.236]:55420 "EHLO antares.kleine-koenig.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730468AbfBLTd5 (ORCPT ); Tue, 12 Feb 2019 14:33:57 -0500 Received: by antares.kleine-koenig.org (Postfix, from userid 1000) id AD9F55A1A84; Tue, 12 Feb 2019 20:33:55 +0100 (CET) From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: linux-sparse@vger.kernel.org Subject: [PATCH] honor CFLAGS from environment Date: Tue, 12 Feb 2019 20:33:50 +0100 Message-Id: <20190212193350.25239-1-uwe@kleine-koenig.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: linux-sparse-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sparse@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Debian build scripts pass CFLAGS in the environment. To honor these only set CFLAGS to "-O2 -g" if CFLAGS is unset. The warnings in the following line are added unconditionally. This makes sparse builds reproducible. Signed-off-by: Uwe Kleine-König --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ CC = gcc-8 -CFLAGS = -O2 -g +CFLAGS ?= -O2 -g CFLAGS += -Wall -Wwrite-strings LD = $(CC) LDFLAGS += -Wl,--as-needed