Received: by 10.213.65.68 with SMTP id h4csp997158imn; Wed, 28 Mar 2018 17:50:04 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+sQYwT8wfU9WYjr2FTvkKkjzkZcX+HN/m9HzIGkiCtjAP5OfY/mZo13Kg7nZcHKmaz4rqW X-Received: by 2002:a17:902:6b49:: with SMTP id g9-v6mr5976828plt.75.1522284604364; Wed, 28 Mar 2018 17:50:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522284604; cv=none; d=google.com; s=arc-20160816; b=H+oMzOOElIBw61K5NRNoRSQzjIH6BIk2yh2Tmwb8gY5HbFrZJV7ezqG/1vKi1qml/N H216KaoxjHkInOVUoeS/yMUYqLvVpyL0IhSv8g6CkXTN7BcymVmf1Mm+mH8i7nUdg9SV IyjiLxqyqmXw2Q1xJb2DQej8xn3pbXbpmQ7GLLahGYw0EVLcEaW7WLez6IcDZWDvCGpu Glp6dxi1k8ltEWNOoRwWQKYPvVbR+Wk3RP8j9OP9rMvBv1cAe+vcFWgP4srOvrIdrRO5 QbUoMaRv/IxShLWK7vvL2q+N8p+Heoz3H0uZFY28a40pztV0B1R9ZKwBm28/MNoUipGw YMfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=VxY6mAIPlJvoL0g+BWId4bpP4yPZnrwFyL3K4rPyPWo=; b=FG8nWQfsUzR9fr/tBbF9HQtXvCxI70GOV4ESxJzGg+6VCKbABqbpL/ccA9Wz5trzKX JGlhKec1OAJqNhDpf/wtz9NqxYuWljoBIjdefiJ44LwCUgLnwR5+Gz46XRAQbYbmANiE 60P2PwWzIVITF/M1kI/PRT/ZcomxgOFrJklD76i9CDTdy9ewasUidJ4N/30mOpzUY4GW iTJNT0T2qKn73WfhZ5S9jnz2iCym9OSkcYKk+WcnZTdzffUbKSSQPoUufxVK09zkPPQt V/2J8Ww3sGhg6Pp7LoQJ+kamOpKF2qCtJZSeg1vYIrZL25Q+qYZ60hvN+rygR0UaxWkn KDRQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id be9-v6si4750474plb.201.2018.03.28.17.49.50; Wed, 28 Mar 2018 17:50:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751935AbeC2Aso (ORCPT + 99 others); Wed, 28 Mar 2018 20:48:44 -0400 Received: from mail-pg0-f67.google.com ([74.125.83.67]:42696 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751207AbeC2AsR (ORCPT ); Wed, 28 Mar 2018 20:48:17 -0400 Received: by mail-pg0-f67.google.com with SMTP id f10so1942819pgs.9 for ; Wed, 28 Mar 2018 17:48:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=VxY6mAIPlJvoL0g+BWId4bpP4yPZnrwFyL3K4rPyPWo=; b=Bm2RIu6b76zwEmdoYLvqtXFrgfIYdTQnmmmcnV5HF+9Bnpj8W9sD5EUZo5C2qhVRgG HVGMDygYVnqFHcn68DqFdjJ+M+Jiis5+9X/1H4/8IIosjZc/pwZ5sc89olMuyBQjDuR/ P5QUsKn0UpMTmCz1hnIYE7r1EWzOxGLqF3/u/kBE7B7DTh8C5DbM3xQSp5k9q9aYXSr5 HzjBMVbVzix+0ASSjQgR53AkeZyPrtmlokO7qy9Ug0M/C0HS4jgByxpkJzcAmXhAt1nG 3l0JGkfm3DCO/dfYnCXkmvuc1/TpTt2KZIhdtp/q3t14jlywSr8z4z632djRYh9Di8D9 ShsQ== X-Gm-Message-State: AElRT7Ha6+QV/UP29Ppe0FPjTSOXJSU0yBKq3mUmKUeWTxbgdND36WlE R3kdhVcguFDDtklI0mOdEuXIUrFUpDo= X-Received: by 2002:a17:902:5a5:: with SMTP id f34-v6mr5987493plf.288.1522284496817; Wed, 28 Mar 2018 17:48:16 -0700 (PDT) Received: from localhost.net ([2601:602:9802:a8dc:9d5:10b1:50c5:95c0]) by smtp.gmail.com with ESMTPSA id f82sm10932511pfd.175.2018.03.28.17.48.15 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 Mar 2018 17:48:15 -0700 (PDT) From: Laura Abbott To: Masahiro Yamada , Michal Marek , Josh Poimboeuf Cc: Laura Abbott , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/3] objtool: Support HOSTCFLAGS and HOSTLDFLAGS Date: Wed, 28 Mar 2018 17:48:04 -0700 Message-Id: <20180329004805.7278-3-labbott@redhat.com> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180329004805.7278-1-labbott@redhat.com> References: <20180329004805.7278-1-labbott@redhat.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org It may be useful to compile host programs with different flags (e.g. hardening). Ensure that objtool picks up the appropriate flags. Signed-off-by: Laura Abbott --- tools/objtool/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/objtool/Makefile b/tools/objtool/Makefile index e6acc281dd37..0ff3bcac1ca9 100644 --- a/tools/objtool/Makefile +++ b/tools/objtool/Makefile @@ -31,8 +31,9 @@ INCLUDES := -I$(srctree)/tools/include \ -I$(srctree)/tools/arch/$(HOSTARCH)/include/uapi \ -I$(srctree)/tools/objtool/arch/$(ARCH)/include WARNINGS := $(EXTRA_WARNINGS) -Wno-switch-default -Wno-switch-enum -Wno-packed -CFLAGS += -Wall -Werror $(WARNINGS) -fomit-frame-pointer -O2 -g $(INCLUDES) -LDFLAGS += -lelf $(LIBSUBCMD) +CFLAGS += -Wall -Werror $(WARNINGS) $(HOSTCFLAGS) -fomit-frame-pointer -O2 -g \ + $(INCLUDES) +LDFLAGS += -lelf $(LIBSUBCMD) $(HOSTLDFLAGS) # Allow old libelf to be used: elfshdr := $(shell echo '\#include ' | $(CC) $(CFLAGS) -x c -E - | grep elf_getshdr) -- 2.16.2