Received: by 10.192.165.156 with SMTP id m28csp1138885imm; Wed, 11 Apr 2018 13:09:53 -0700 (PDT) X-Google-Smtp-Source: AIpwx483LR2TBQFAKaYs2zo+D5vjc2v+WihwgKm2LLZJuTVoC4/XE3Tz8SDJFDB9KpS/dtWUxucM X-Received: by 2002:a17:902:6689:: with SMTP id e9-v6mr6632786plk.176.1523477393768; Wed, 11 Apr 2018 13:09:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523477393; cv=none; d=google.com; s=arc-20160816; b=GXqsvKx/O1Kx06L8K/d+pVZk1sFOVqmYgwp9Z5bM51MslB/2fT7iHxPVVxYEii4BSs bY6MwAkUOd/ohnQBtfMAC5NGU9Pfl9E/pu+pF21l6Nk3RqEKBcQWWxB7oWxxT8IiHXfg mcQnQg2vu2asxjA9Kbeifa7+a9c4NTo4NhPr3LTLNlYR6BS4Pip15BvhcWRyPONKPgRV QudAq5LHcmvVEhLfMN3To4THJ89y7mLatezx/i3PQiGrRyNOmLy/sSokixxOZ+SjTCea bcvVI7vi5QMW4ZKrRILBr1tcgUwdtB63Y9QsnNC01j3uG9z60KvPojrMe9mSXZ1Kgdaz 24XQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=o1SvKtJdNrfJI5lhPAaV5HztC403asLKjRCXSgKl7fg=; b=v6bRk8oWvtsq4zKKnFaWsHeQwZZydItMFECTKLUymKeYRxJCf7r4Pta5Xaea2ETUuk mVVw01xkUHikl6tcfiwoouwIgbIDCRzd7pMVSozbTlres3ZMY/9NfkJ4A9BihPpkqKSM w6mTHca48NWHEDkMddr2YWh4UcyXM7ihoRxZGBAKzttd50cj8dfT+f+IaXitOLEKvkt6 9oDRbIYeOVlr4AJbuCtn6QMWynQfYYjJeUSsLpsMymh2hzOc7a4lM0hwggefd7X841B6 I2JTeiDRxJ4Uu/BEUIqv87gJDOALQFbLhvbBCPwN2bcNOTvrg7P1nEKhW3ZgiZPiNVhW iPzw== 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 q4-v6si1697531plb.613.2018.04.11.13.09.17; Wed, 11 Apr 2018 13:09:53 -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 S1757231AbeDKUEw (ORCPT + 99 others); Wed, 11 Apr 2018 16:04:52 -0400 Received: from mail-pl0-f68.google.com ([209.85.160.68]:36749 "EHLO mail-pl0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756128AbeDKUEt (ORCPT ); Wed, 11 Apr 2018 16:04:49 -0400 Received: by mail-pl0-f68.google.com with SMTP id 91-v6so2179366pld.3 for ; Wed, 11 Apr 2018 13:04:49 -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; bh=o1SvKtJdNrfJI5lhPAaV5HztC403asLKjRCXSgKl7fg=; b=KThcHen9tfryc8uLzeccweTzcWuq47Dthvi3rvSHT1ksWDf0nxLPsoyzWuhLeyuVFo BMtgsnZP9ApNCeZ/C3PwSVStqueYLu53ycEtuBxs1Wv0e/xC3AXVCH89STcSpVsG5ew3 YUKzTHMZO2gqScuFbS87a7u9ipSLFXoAaej5pZyQb/fWgWv1VDlj4SGnEZkfA8zv3zG1 zTo+L4EgQOHRRuf3SGUWerrrPH83tl2pxgS9ZXScwjrPtKskBMil5QBXQCMq6cEuw3yp 1CsSgRxXnDBoGoa/RJbiDmRMYeOYie2kgmShcUMT6u+JrkTsgyGpHwxObrc0RpYuF0ts qYNg== X-Gm-Message-State: ALQs6tB6UuKFUpdjdnNvcTmiA5kcoYD8uQJ3dlZMNf4Sp0pzKEw1rw1j 21TdI9z2PRLG1QS4g0Hgy3e9YA== X-Received: by 2002:a17:902:209:: with SMTP id 9-v6mr6380776plc.403.1523477088958; Wed, 11 Apr 2018 13:04:48 -0700 (PDT) Received: from labbott-redhat.redhat.com ([2601:602:9802:a8dc:4eb2:6dae:ab32:e5b0]) by smtp.gmail.com with ESMTPSA id y2sm3106938pgv.38.2018.04.11.13.04.45 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 11 Apr 2018 13:04:47 -0700 (PDT) From: Laura Abbott To: Josh Poimboeuf , Masahiro Yamada Cc: Laura Abbott , linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org Subject: [PATCHv2] objtool: Support HOSTCFLAGS and HOSTLDFLAGS Date: Wed, 11 Apr 2018 13:04:32 -0700 Message-Id: <20180411200432.3493-1-labbott@redhat.com> X-Mailer: git-send-email 2.14.3 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 --- v2: Drop several flags that are already defined in HOSTCFLAGS --- tools/objtool/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/objtool/Makefile b/tools/objtool/Makefile index e6acc281dd37..7df979ae4573 100644 --- a/tools/objtool/Makefile +++ b/tools/objtool/Makefile @@ -31,8 +31,8 @@ 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 += -Werror $(WARNINGS) $(HOSTCFLAGS) -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.14.3