Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp17676643rwd; Tue, 27 Jun 2023 06:21:31 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7vOi+MpF1VaxC7UYu5oCL0NHqPFNVoiQn9apbQMg9uwGCFXAn/e4/Qx48rqHgP1ii+zHhZ X-Received: by 2002:a17:903:1c3:b0:1b0:25ff:a8af with SMTP id e3-20020a17090301c300b001b025ffa8afmr6397031plh.60.1687872091287; Tue, 27 Jun 2023 06:21:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687872091; cv=none; d=google.com; s=arc-20160816; b=IH1QV0IqpptETxgvkxUf2qbLENVwhnmNkRa34M0x8MOxbfUZYGqQBUl4XafbiqJblC Jpc2WcBKgBP5RYRIbQZqiy2MhPnyVfqoaC2EGl3NmBl9j9jrdT3cbHTb75hElcFVo0fz Gj5ddphBf+r9kkSx8sR0HpqZgmccR0zbSq+2MgMN5r7/VKLtNuUW9Yje07v1JxNpPN09 Jadtnq+WaYTSRFykv+lF1NwNglZi6ZYlvfw+YPSlHpeWDTgAHsYZJyibDLISIZPerjCE P7KZjWneDLtc1bHc04PmAG1Q0wiibrZhMvAfElWO9TtScJCzROE3MgUTtK0PhjZQjBLp GdSg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=t4fstIEFzE8QLfSHc0mI7EVJ7MwfFA80/urFUO7+hvY=; fh=LXvh4ZKpO2BrukjxFmrF34mf+AP7C4p0jztOvURxOLg=; b=WtRGZAjiskrhg0TZtlEUEVyEV9KBUNq3bLvM8fV7FVZE8Oh7dtl7aup5hPxMZaYxUp 59BVU4Jbez9neb/+/++HrY4o4R8cWZu4/dQzxltRGyGNMNBlRemsBOw+PysKs+GSMp/K UVZDv3MNi9T9GDGBqS44nsOfu/H29HdqP4um0uupK5zny3gSkBp5h5CC5hs+AZj6y0Xt wtbYsMDsYQzkRkohjZptqQYghG9fJQVIusHURHTNyH8J4or/KxFqAHiXDUaf3EYYH6zd i9GUUm0X7kE7hCz1GzY9EHv8U5/pJeP/PW4MZ1rKrJe2E4H/RiKyciI1G+2mIy3/sT+x qzcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@xen0n.name header.s=mail header.b=AmLbxfGZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d17-20020a170902e15100b001b8076df862si3571988pla.119.2023.06.27.06.21.19; Tue, 27 Jun 2023 06:21:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@xen0n.name header.s=mail header.b=AmLbxfGZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230140AbjF0NBu (ORCPT + 99 others); Tue, 27 Jun 2023 09:01:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53120 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230419AbjF0NBk (ORCPT ); Tue, 27 Jun 2023 09:01:40 -0400 Received: from mailbox.box.xen0n.name (mail.xen0n.name [115.28.160.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A36526BA; Tue, 27 Jun 2023 06:01:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xen0n.name; s=mail; t=1687870893; bh=Ooj9bvYQGjGgA7KkojQxY/KTQ6hTo/rmmadUHjRE+uw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AmLbxfGZ3u2GhlsdZnn1SM+SQrqkxIB2z42P1lhAE+b2yQrHF1d362KAlDBiTMAF3 d/wUQhDCG9pm+NTdaRBkPv8golHXpFdIG17uSmYig/F8RBpJhDtIfLTMOGANskVhOM U3rcyxkUjplvEwp5hrnVWBPjWRVP/eIEz4I2YEg4= Received: from ld50.lan (unknown [101.88.25.181]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mailbox.box.xen0n.name (Postfix) with ESMTPSA id 3C8E96017D; Tue, 27 Jun 2023 21:01:33 +0800 (CST) From: WANG Xuerui To: Huacai Chen Cc: WANG Rui , Nathan Chancellor , Xi Ruoyao , loongarch@lists.linux.dev, linux-kbuild@vger.kernel.org, llvm@lists.linux.dev, linux-kernel@vger.kernel.org, WANG Xuerui Subject: [PATCH 1/2] LoongArch: vDSO: Use CLANG_FLAGS instead of filtering out '--target=' Date: Tue, 27 Jun 2023 21:01:21 +0800 Message-Id: <20230627130122.1491765-2-kernel@xen0n.name> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230627130122.1491765-1-kernel@xen0n.name> References: <20230627130122.1491765-1-kernel@xen0n.name> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: WANG Xuerui This is a port of commit 76d7fff22be3e ("MIPS: VDSO: Use CLANG_FLAGS instead of filtering out '--target='") to arch/loongarch, for fixing cross-compilation with Clang. Reported-by: Nathan Chancellor Link: https://github.com/ClangBuiltLinux/linux/issues/1787#issuecomment-1608306002 Signed-off-by: WANG Xuerui --- arch/loongarch/vdso/Makefile | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/arch/loongarch/vdso/Makefile b/arch/loongarch/vdso/Makefile index 3f9df4d9930f..a50308b6fc25 100644 --- a/arch/loongarch/vdso/Makefile +++ b/arch/loongarch/vdso/Makefile @@ -12,12 +12,9 @@ ccflags-vdso := \ $(filter -E%,$(KBUILD_CFLAGS)) \ $(filter -march=%,$(KBUILD_CFLAGS)) \ $(filter -m%-float,$(KBUILD_CFLAGS)) \ + $(CLANG_FLAGS) \ -D__VDSO__ -ifeq ($(cc-name),clang) -ccflags-vdso += $(filter --target=%,$(KBUILD_CFLAGS)) -endif - cflags-vdso := $(ccflags-vdso) \ -isystem $(shell $(CC) -print-file-name=include) \ $(filter -W%,$(filter-out -Wa$(comma)%,$(KBUILD_CFLAGS))) \ -- 2.40.0