Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2198241pxb; Sun, 18 Apr 2021 22:53:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx2OHQjE4DqiQNzy8bXWhj6rNhMAGor1SKbFATnofbgos1L/g7zEyEqFL9KimZbOdMfyuWt X-Received: by 2002:a17:90a:288:: with SMTP id w8mr23363507pja.163.1618811603108; Sun, 18 Apr 2021 22:53:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618811603; cv=none; d=google.com; s=arc-20160816; b=ux1YkhRZDSqF9vNNQ9QSR20EO/heGUu7scx4ddCPZy2IGtnTllWyDV0v3w2TrZnhlN 8fidBWCprf/QmtzFOGHqTq0nqGxSDRweuMDm87q03tHhiZA2N8H0xREkGw1l2qAvYO4O jxy71WFYzzoDfj/sPQcmF/9qAqbACapeXneevjAChtoYL8JvknYkR+ObSm6MKbFhAany CLfUnw7BWTkdS8HpGBRXCsNLMRAT3/GS7WXUAx+QIamiZd1A5dv2A2gae65pWUKzY7kx eTsSakO/9DAOHLF+LjZzCEqLj/dJgdrnKNYVcDLR3H+yTwrpGIpRycj4e0+T7fMEhEJ1 /QKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=uUqcjO9Wvs0IFsDja9iS9xHY8v7HBc2l03iB/y76/p8=; b=f9WE8VBuyxJWmuOFDccgjDBjESv+QntTjYuK5XaVB0uQvBhIdNwMgYQDAId+58ptJj kvoteYgJ/0Ezxds0AyXGuwAwC+9Gu/o2beKaRkTAjH2b2OyRrdD9Kn7kovoJeGfo5UDl P/kd92+8yjas5LmrNunkPK/Oux8jd1DA7Bz88VHJgmAMPC2iY9yJTwUDUeeoCjtYSClG aE3R5KJwzjBg6lcJ+wmMTWhBQYheMDiFuw87UsM/g/voNVqMXY1Z7D8oofwpQb0GqeMT A6nhcYrkaQjcH1U2WVDchnyhnqg5BoIAhzHM+UmTcc8QtfRWucwbCC09/t8FtB7wQ3xF VX5g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w75si17504919pfd.307.2021.04.18.22.53.11; Sun, 18 Apr 2021 22:53:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231310AbhDSFwh (ORCPT + 99 others); Mon, 19 Apr 2021 01:52:37 -0400 Received: from lucky1.263xmail.com ([211.157.147.134]:39966 "EHLO lucky1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231203AbhDSFwe (ORCPT ); Mon, 19 Apr 2021 01:52:34 -0400 Received: from localhost (unknown [192.168.167.69]) by lucky1.263xmail.com (Postfix) with ESMTP id 5D0AEC81A0; Mon, 19 Apr 2021 13:51:59 +0800 (CST) X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-ADDR-CHECKED: 0 X-ANTISPAM-LEVEL: 2 X-ABS-CHECKED: 0 Received: from localhost.localdomain (unknown [124.126.19.250]) by smtp.263.net (postfix) whith ESMTP id P19994T140047279048448S1618811517751852_; Mon, 19 Apr 2021 13:51:59 +0800 (CST) X-IP-DOMAINF: 1 X-UNIQUE-TAG: X-RL-SENDER: zhaoxiao@uniontech.com X-SENDER: zhaoxiao@uniontech.com X-LOGIN-NAME: zhaoxiao@uniontech.com X-FST-TO: tsbogend@alpha.franken.de X-RCPT-COUNT: 17 X-SENDER-IP: 124.126.19.250 X-ATTACHMENT-NUM: 0 X-System-Flag: 0 From: zhaoxiao To: tsbogend@alpha.franken.de, jiaxun.yang@flygoat.com, chenhuacai@kernel.org, viro@zeniv.linux.org.uk, morbo@google.com Cc: paul@crapouillou.net, alobakin@pm.me, suxingxing@loongson.cn, tangyouling@loongson.cn, yangtiezhu@loongson.cn, ralf@linux-mips.org, nathan@kernel.org, masahiroy@kernel.org, keescook@chromium.org, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, zhaoxiao Subject: [PATCH v2] MIPS: Makefile: Replace -pg with CC_FLAGS_FTRACE Date: Mon, 19 Apr 2021 13:51:56 +0800 Message-Id: <20210419055156.22195-1-zhaoxiao@uniontech.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In preparation for mips supporting ftrace built on other compiler options, let's have the mips Makefiles remove the $(CC_FLAGS_FTRACE) flags, whatever these may be, rather than assuming '-pg'. Signed-off-by: zhaoxiao --- v2:add this same change be appropriate to all of the below Makefile. arch/mips/boot/compressed/Makefile | 2 +- arch/mips/kernel/Makefile | 8 ++++---- arch/mips/vdso/Makefile | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/arch/mips/boot/compressed/Makefile b/arch/mips/boot/compressed/Makefile index f93f72bcba97..e4b7839293e1 100644 --- a/arch/mips/boot/compressed/Makefile +++ b/arch/mips/boot/compressed/Makefile @@ -18,7 +18,7 @@ include $(srctree)/arch/mips/Kbuild.platforms BOOT_HEAP_SIZE := 0x400000 # Disable Function Tracer -KBUILD_CFLAGS := $(filter-out -pg, $(KBUILD_CFLAGS)) +KBUILD_CFLAGS := $(filter-out $(CC_FLAGS_FTRACE), $(KBUILD_CFLAGS)) KBUILD_CFLAGS := $(filter-out -fstack-protector, $(KBUILD_CFLAGS)) diff --git a/arch/mips/kernel/Makefile b/arch/mips/kernel/Makefile index b4a57f1de772..814b3da30501 100644 --- a/arch/mips/kernel/Makefile +++ b/arch/mips/kernel/Makefile @@ -17,10 +17,10 @@ obj-y += cpu-probe.o endif ifdef CONFIG_FUNCTION_TRACER -CFLAGS_REMOVE_ftrace.o = -pg -CFLAGS_REMOVE_early_printk.o = -pg -CFLAGS_REMOVE_perf_event.o = -pg -CFLAGS_REMOVE_perf_event_mipsxx.o = -pg +CFLAGS_REMOVE_ftrace.o = $(CC_FLAGS_FTRACE) +CFLAGS_REMOVE_early_printk.o = $(CC_FLAGS_FTRACE) +CFLAGS_REMOVE_perf_event.o = $(CC_FLAGS_FTRACE) +CFLAGS_REMOVE_perf_event_mipsxx.o = $(CC_FLAGS_FTRACE) endif obj-$(CONFIG_CEVT_BCM1480) += cevt-bcm1480.o diff --git a/arch/mips/vdso/Makefile b/arch/mips/vdso/Makefile index 2131d3fd7333..1b2ea34c3d3b 100644 --- a/arch/mips/vdso/Makefile +++ b/arch/mips/vdso/Makefile @@ -46,7 +46,7 @@ CFLAGS_vgettimeofday-o32.o = -include $(srctree)/$(src)/config-n32-o32-env.c -in CFLAGS_vgettimeofday-n32.o = -include $(srctree)/$(src)/config-n32-o32-env.c -include $(c-gettimeofday-y) endif -CFLAGS_REMOVE_vgettimeofday.o = -pg +CFLAGS_REMOVE_vgettimeofday.o = $(CC_FLAGS_FTRACE) ifdef CONFIG_MIPS_DISABLE_VDSO ifndef CONFIG_MIPS_LD_CAN_LINK_VDSO @@ -60,7 +60,7 @@ ldflags-y := -Bsymbolic --no-undefined -soname=linux-vdso.so.1 \ $(filter -E%,$(KBUILD_CFLAGS)) -nostdlib -shared \ -G 0 --eh-frame-hdr --hash-style=sysv --build-id=sha1 -T -CFLAGS_REMOVE_vdso.o = -pg +CFLAGS_REMOVE_vdso.o = $(CC_FLAGS_FTRACE) GCOV_PROFILE := n UBSAN_SANITIZE := n -- 2.20.1