From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from condef-08.nifty.com (condef-08.nifty.com [202.248.20.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EA37272 for ; Sat, 16 Oct 2021 14:26:17 +0000 (UTC) Received: from conssluserg-05.nifty.com ([10.126.8.84])by condef-08.nifty.com with ESMTP id 19GEK4JC009159 for ; Sat, 16 Oct 2021 23:20:04 +0900 Received: from mail-pf1-f179.google.com (mail-pf1-f179.google.com [209.85.210.179]) (authenticated) by conssluserg-05.nifty.com with ESMTP id 19GEJo0s026805 for ; Sat, 16 Oct 2021 23:19:50 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-05.nifty.com 19GEJo0s026805 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1634393991; bh=6ypZO4eKy8UrY8xuIoKPcuKG3eWAgsGuIUDhYfjtAOE=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=f9FVnU6EOfplMhENw007y9BjfZ0OA9PesbiCaz7f54CGoWdqwoRvMjXd5DFxLQnQM 7UGKb3HlLeP/K4BpvXSVg9pztr5DNuwUp28Zdvtdozud/tBkoJ1zUrGjE/f6WkMvBq sZM+MZvDQydVOBWnsDOacnFjgVJ9EXcJSjBK0CtEgz9QfdYfxkAbrcX1YSuwFaO85G P2Z6LAgMEESUWGlRJoHZD8kmy3lqXx+3faCkE/b3XpPqWdL1mPbPEg5nVtTTDks8/B +vrwJLXU1i3HAjHW5MJdTjOACykivjnFauWquFI+PxKNVWFz5kdmfgaS3VWp4OOYlH dnzHzlT9pFd2Q== X-Nifty-SrcIP: [209.85.210.179] Received: by mail-pf1-f179.google.com with SMTP id d9so3716298pfl.6 for ; Sat, 16 Oct 2021 07:19:50 -0700 (PDT) X-Gm-Message-State: AOAM530hWCu4xIGQ7UYKerjlCcB2sqnKKaggsdztboB6I/Du9/9toozb WLuQVKvJcdyhyuzSyTANc5jFz63DcnijWaOodAQ= X-Google-Smtp-Source: ABdhPJxUGvZ8xkSec8iz+iwXpfbq+CSOSonObmiQdyuGRr5QZLEuaNX6E+AGfPdDO3rCP94v4yL2nVWkx3c8tcOc+CM= X-Received: by 2002:a62:27c7:0:b0:44d:b86:54f2 with SMTP id n190-20020a6227c7000000b0044d0b8654f2mr18001110pfn.68.1634393989868; Sat, 16 Oct 2021 07:19:49 -0700 (PDT) Precedence: bulk X-Mailing-List: llvm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20211012234606.91717-1-ndesaulniers@google.com> <20211012234606.91717-3-ndesaulniers@google.com> In-Reply-To: From: Masahiro Yamada Date: Sat, 16 Oct 2021 23:19:12 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 2/3] arm64: vdso32: lazily invoke COMPAT_CC To: Nick Desaulniers Cc: Catalin Marinas , Will Deacon , llvm@lists.linux.dev, Linux Kernel Mailing List , linux-arm-kernel , Vincenzo Frascino , Lucas Henneman Content-Type: text/plain; charset="UTF-8" On Fri, Oct 15, 2021 at 5:59 AM Nick Desaulniers wrote: > > On Tue, Oct 12, 2021 at 8:03 PM Masahiro Yamada wrote: > > > > On Wed, Oct 13, 2021 at 8:46 AM Nick Desaulniers > > wrote: > > > > > > When running the following command without arm-linux-gnueabi-gcc in > > > one's $PATH, the following warning is observed: > > > > > > $ ARCH=arm64 CROSS_COMPILE_COMPAT=arm-linux-gnueabi- make -j72 LLVM=1 mrproper > > > make[1]: arm-linux-gnueabi-gcc: No such file or directory > > > > > > This is because KCONFIG is not run for mrproper, so CONFIG_CC_IS_CLANG > > > is not set, and we end up eagerly evaluating various variables that try > > > to invoke CC_COMPAT. > > > > > > This is a similar problem to what was observed in > > > commit 3ec8a5b33dea ("kbuild: do not export LDFLAGS_vmlinux") > > > > > > Cc: Masahiro Yamada > > > Reported-by: Lucas Henneman > > > Signed-off-by: Nick Desaulniers > > > > > > There are two ways to fix it: > > > > [1]: sink the error message to /dev/null > > (as in commit dc960bfeedb01cf832c5632ed1f3daed4416b142) > > [2]: use a recursively-expanded variable as you did. > > > > > > "Simple variable (:=) vs recursive variable (=)" is a trade-off. > > > > Please be careful about the cost when you try the [2] approach. > > > > > > > > Simple variables are immediately expanded while parsing Makefile. > > There are 7 call-sites for cc32-option, hence > > the compiler is invoked 7 times for building vdso32, > > 0 times for cleaning. > > (Since 57fd251c789647552d32d2fc51bedd4f90d70f9f, > > try-run is no-op for 'make clean'). > > > > > > > > > > Recursive variables are expanded every time they are used. > > > > IIUC, if_changed expands the command line 3 times. > > There are 2 objects (note.o and vgettimeofday.o) > > There are 7 call-sites for cc32-option. > > > > So, the compiler is invoked 42 (3 * 2 * 7) times > > for building vdso32. > > With this patch applied: > $ ARCH=arm64 CROSS_COMPILE_COMPAT=arm-linux-gnueabi- make LLVM=1 -j72 > clean defconfig > $ ARCH=arm64 CROSS_COMPILE_COMPAT=arm-linux-gnueabi- make LLVM=1 -j72 > arch/arm64/kernel/vdso32/ V=1 | tr -s ' ' | cut -d ' ' -f 2 | grep > clang | wc -l > 55 > $ find arch/arm64/kernel/vdso32/ -name \*.o | xargs rm > $ ARCH=arm64 CROSS_COMPILE_COMPAT=arm-linux-gnueabi- make LLVM=1 -j72 > arch/arm64/kernel/vdso32/ V=1 | tr -s ' ' | cut -d ' ' -f 2 | grep > clang | wc -l > 2 > > Prior to this series: > $ ARCH=arm64 CROSS_COMPILE_COMPAT=arm-linux-gnueabi- make LLVM=1 -j72 > clean defconfig > $ ARCH=arm64 CROSS_COMPILE_COMPAT=arm-linux-gnueabi- make LLVM=1 -j72 > arch/arm64/kernel/vdso32/ V=1 | tr -s ' ' | cut -d ' ' -f 2 | grep > clang | wc -l > 55 > $ find arch/arm64/kernel/vdso32/ -name \*.o | xargs rm > $ ARCH=arm64 CROSS_COMPILE_COMPAT=arm-linux-gnueabi- make LLVM=1 -j72 > arch/arm64/kernel/vdso32/ V=1 | tr -s ' ' | cut -d ' ' -f 2 | grep > clang | wc -l > 2 > > With patch 3 applied, we can drop CROSS_COMPILE_COMPAT, and we now get: > $ ARCH=arm64 make LLVM=1 -j72 clean defconfig > ARCH=arm64 make LLVM=1 -j72 arch/arm64/kernel/vdso32/ V=1 | tr -s ' ' > | cut -d ' ' -f 2 | grep clang | wc -l > 44 > $ find arch/arm64/kernel/vdso32/ -name \*.o | xargs rm > $ ARCH=arm64 make LLVM=1 -j72 arch/arm64/kernel/vdso32/ V=1 | tr -s ' > ' | cut -d ' ' -f 2 | grep clang | wc -l > 2 > > Please confirm; perhaps my pipeline missed some invocations? Or was > there a different target you were referring to? It is pointless to check the build commands. I am talking about how many times $(call cc32-option, ) is evaluated. How about adding the following debug code? (Everytime cc32-option is evaluated, a file "dummy-cc32-option-" is created) diff --git a/arch/arm64/kernel/vdso32/Makefile b/arch/arm64/kernel/vdso32/Makefile index 89299a26638b..e40365f5bc38 100644 --- a/arch/arm64/kernel/vdso32/Makefile +++ b/arch/arm64/kernel/vdso32/Makefile @@ -26,9 +26,9 @@ LD_COMPAT ?= $(CROSS_COMPILE_COMPAT)ld endif cc32-option = $(call try-run,\ - $(CC_COMPAT) $(1) -c -x c /dev/null -o "$$TMP",$(1),$(2)) + $(CC_COMPAT) $(1) -c -x c /dev/null -o "$$TMP"; touch dummy-cc32-option-$$$$,$(1),$(2)) cc32-disable-warning = $(call try-run,\ - $(CC_COMPAT) -W$(strip $(1)) -c -x c /dev/null -o "$$TMP",-Wno-$(strip $(1))) + $(CC_COMPAT) -W$(strip $(1)) -c -x c /dev/null -o "$$TMP"; touch dummy-cc32-option-$$$$,-Wno-$(strip $(1))) # We cannot use the global flags to compile the vDSO files, the main reason # being that the 32-bit compiler may be older than the main (64-bit) compiler Without this patch: masahiro@grover:~/ref/linux$ rm dummy-cc32-* masahiro@grover:~/ref/linux$ make -s LLVM=1 ARCH=arm64 CROSS_COMPILE_COMPAT=arm-linux-gnueabi- defconfig clean arch/arm64/kernel/vdso32/ -j8 masahiro@grover:~/ref/linux$ ls -1 dummy-cc32-* dummy-cc32-disable-warning-765530 dummy-cc32-option-765495 dummy-cc32-option-765500 dummy-cc32-option-765505 dummy-cc32-option-765510 dummy-cc32-option-765515 dummy-cc32-option-765520 dummy-cc32-option-765525 With this patch: masahiro@grover:~/ref/linux$ rm dummy-cc32-* masahiro@grover:~/ref/linux$ make -s LLVM=1 ARCH=arm64 CROSS_COMPILE_COMPAT=arm-linux-gnueabi- defconfig clean arch/arm64/kernel/vdso32/ -j8 masahiro@grover:~/ref/linux$ ls -1 dummy-cc32-* dummy-cc32-disable-warning-768908 dummy-cc32-disable-warning-768949 dummy-cc32-disable-warning-768990 dummy-cc32-disable-warning-769035 dummy-cc32-disable-warning-769076 dummy-cc32-disable-warning-769117 dummy-cc32-option-768871 dummy-cc32-option-768878 dummy-cc32-option-768883 dummy-cc32-option-768888 dummy-cc32-option-768893 dummy-cc32-option-768898 dummy-cc32-option-768903 dummy-cc32-option-768914 dummy-cc32-option-768919 dummy-cc32-option-768924 dummy-cc32-option-768929 dummy-cc32-option-768934 dummy-cc32-option-768939 dummy-cc32-option-768944 dummy-cc32-option-768955 dummy-cc32-option-768960 dummy-cc32-option-768965 dummy-cc32-option-768970 dummy-cc32-option-768975 dummy-cc32-option-768980 dummy-cc32-option-768985 dummy-cc32-option-768998 dummy-cc32-option-769005 dummy-cc32-option-769010 dummy-cc32-option-769015 dummy-cc32-option-769020 dummy-cc32-option-769025 dummy-cc32-option-769030 dummy-cc32-option-769041 dummy-cc32-option-769046 dummy-cc32-option-769051 dummy-cc32-option-769056 dummy-cc32-option-769061 dummy-cc32-option-769066 dummy-cc32-option-769071 dummy-cc32-option-769082 dummy-cc32-option-769087 dummy-cc32-option-769092 dummy-cc32-option-769097 dummy-cc32-option-769102 dummy-cc32-option-769107 dummy-cc32-option-769112 The diff of the number of expansions: cc32-option 7 -> 42 cc32-disable-warning 1 -> 6 -- Best Regards Masahiro Yamada From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D5CD6C433EF for ; Sat, 16 Oct 2021 14:21:44 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A1C9560EDF for ; Sat, 16 Oct 2021 14:21:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org A1C9560EDF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=zOBUzT6iLdP8/yQG69dARNWRkzK7Lc8T626R4qbFsWs=; b=DHcchwgfZ/Mb+a JEZgaXEtLS9A+z0qEa+1VX5rcKyMAxGU9wVIUiwjfkdKRE0MyYfcVaPPdl+Q5SqimwKiXu7HkNYyY 9Eatyeca7P3AMlfdebEQiCQnmmKAUd+fUEEV7F4+4yfPn8zABsSdngmNi5Buk3g8hrYQVm8OSYmcD DEPsSlKb4EixBwQOUyJTBs/y4f2MLpOVYZsjHvQBWKd4hLFfJZ2CFR0V9QXHAlUbeiQklevs1+VqG 1Mvf/7LGO8d0fABG2MdRaDmxmFeWaPxn+f7ELHR3ctovqCiYp4ds8otRqMOh++hMzvRc4Hwa+lM3A zQD/FnhCNtu5cp/4R0Ng==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mbkY4-00AmaK-6W; Sat, 16 Oct 2021 14:20:32 +0000 Received: from conssluserg-03.nifty.com ([210.131.2.82]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mbkXz-00AmY1-Gz for linux-arm-kernel@lists.infradead.org; Sat, 16 Oct 2021 14:20:29 +0000 Received: from mail-pf1-f175.google.com (mail-pf1-f175.google.com [209.85.210.175]) (authenticated) by conssluserg-03.nifty.com with ESMTP id 19GEJoi3003828 for ; Sat, 16 Oct 2021 23:19:50 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-03.nifty.com 19GEJoi3003828 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1634393991; bh=6ypZO4eKy8UrY8xuIoKPcuKG3eWAgsGuIUDhYfjtAOE=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=f9FVnU6EOfplMhENw007y9BjfZ0OA9PesbiCaz7f54CGoWdqwoRvMjXd5DFxLQnQM 7UGKb3HlLeP/K4BpvXSVg9pztr5DNuwUp28Zdvtdozud/tBkoJ1zUrGjE/f6WkMvBq sZM+MZvDQydVOBWnsDOacnFjgVJ9EXcJSjBK0CtEgz9QfdYfxkAbrcX1YSuwFaO85G P2Z6LAgMEESUWGlRJoHZD8kmy3lqXx+3faCkE/b3XpPqWdL1mPbPEg5nVtTTDks8/B +vrwJLXU1i3HAjHW5MJdTjOACykivjnFauWquFI+PxKNVWFz5kdmfgaS3VWp4OOYlH dnzHzlT9pFd2Q== X-Nifty-SrcIP: [209.85.210.175] Received: by mail-pf1-f175.google.com with SMTP id g14so10951605pfm.1 for ; Sat, 16 Oct 2021 07:19:50 -0700 (PDT) X-Gm-Message-State: AOAM533JA7dQoqpnCL5y7ZCX2Axxjb2lt99e8RijeLxsSVVoR5Jt13xo dg3sgF//E/G75nmIrkH0puZQYMPpvU75qr0sp6o= X-Google-Smtp-Source: ABdhPJxUGvZ8xkSec8iz+iwXpfbq+CSOSonObmiQdyuGRr5QZLEuaNX6E+AGfPdDO3rCP94v4yL2nVWkx3c8tcOc+CM= X-Received: by 2002:a62:27c7:0:b0:44d:b86:54f2 with SMTP id n190-20020a6227c7000000b0044d0b8654f2mr18001110pfn.68.1634393989868; Sat, 16 Oct 2021 07:19:49 -0700 (PDT) MIME-Version: 1.0 References: <20211012234606.91717-1-ndesaulniers@google.com> <20211012234606.91717-3-ndesaulniers@google.com> In-Reply-To: From: Masahiro Yamada Date: Sat, 16 Oct 2021 23:19:12 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 2/3] arm64: vdso32: lazily invoke COMPAT_CC To: Nick Desaulniers Cc: Catalin Marinas , Will Deacon , llvm@lists.linux.dev, Linux Kernel Mailing List , linux-arm-kernel , Vincenzo Frascino , Lucas Henneman X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211016_072027_849718_F7910A30 X-CRM114-Status: GOOD ( 31.32 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Oct 15, 2021 at 5:59 AM Nick Desaulniers wrote: > > On Tue, Oct 12, 2021 at 8:03 PM Masahiro Yamada wrote: > > > > On Wed, Oct 13, 2021 at 8:46 AM Nick Desaulniers > > wrote: > > > > > > When running the following command without arm-linux-gnueabi-gcc in > > > one's $PATH, the following warning is observed: > > > > > > $ ARCH=arm64 CROSS_COMPILE_COMPAT=arm-linux-gnueabi- make -j72 LLVM=1 mrproper > > > make[1]: arm-linux-gnueabi-gcc: No such file or directory > > > > > > This is because KCONFIG is not run for mrproper, so CONFIG_CC_IS_CLANG > > > is not set, and we end up eagerly evaluating various variables that try > > > to invoke CC_COMPAT. > > > > > > This is a similar problem to what was observed in > > > commit 3ec8a5b33dea ("kbuild: do not export LDFLAGS_vmlinux") > > > > > > Cc: Masahiro Yamada > > > Reported-by: Lucas Henneman > > > Signed-off-by: Nick Desaulniers > > > > > > There are two ways to fix it: > > > > [1]: sink the error message to /dev/null > > (as in commit dc960bfeedb01cf832c5632ed1f3daed4416b142) > > [2]: use a recursively-expanded variable as you did. > > > > > > "Simple variable (:=) vs recursive variable (=)" is a trade-off. > > > > Please be careful about the cost when you try the [2] approach. > > > > > > > > Simple variables are immediately expanded while parsing Makefile. > > There are 7 call-sites for cc32-option, hence > > the compiler is invoked 7 times for building vdso32, > > 0 times for cleaning. > > (Since 57fd251c789647552d32d2fc51bedd4f90d70f9f, > > try-run is no-op for 'make clean'). > > > > > > > > > > Recursive variables are expanded every time they are used. > > > > IIUC, if_changed expands the command line 3 times. > > There are 2 objects (note.o and vgettimeofday.o) > > There are 7 call-sites for cc32-option. > > > > So, the compiler is invoked 42 (3 * 2 * 7) times > > for building vdso32. > > With this patch applied: > $ ARCH=arm64 CROSS_COMPILE_COMPAT=arm-linux-gnueabi- make LLVM=1 -j72 > clean defconfig > $ ARCH=arm64 CROSS_COMPILE_COMPAT=arm-linux-gnueabi- make LLVM=1 -j72 > arch/arm64/kernel/vdso32/ V=1 | tr -s ' ' | cut -d ' ' -f 2 | grep > clang | wc -l > 55 > $ find arch/arm64/kernel/vdso32/ -name \*.o | xargs rm > $ ARCH=arm64 CROSS_COMPILE_COMPAT=arm-linux-gnueabi- make LLVM=1 -j72 > arch/arm64/kernel/vdso32/ V=1 | tr -s ' ' | cut -d ' ' -f 2 | grep > clang | wc -l > 2 > > Prior to this series: > $ ARCH=arm64 CROSS_COMPILE_COMPAT=arm-linux-gnueabi- make LLVM=1 -j72 > clean defconfig > $ ARCH=arm64 CROSS_COMPILE_COMPAT=arm-linux-gnueabi- make LLVM=1 -j72 > arch/arm64/kernel/vdso32/ V=1 | tr -s ' ' | cut -d ' ' -f 2 | grep > clang | wc -l > 55 > $ find arch/arm64/kernel/vdso32/ -name \*.o | xargs rm > $ ARCH=arm64 CROSS_COMPILE_COMPAT=arm-linux-gnueabi- make LLVM=1 -j72 > arch/arm64/kernel/vdso32/ V=1 | tr -s ' ' | cut -d ' ' -f 2 | grep > clang | wc -l > 2 > > With patch 3 applied, we can drop CROSS_COMPILE_COMPAT, and we now get: > $ ARCH=arm64 make LLVM=1 -j72 clean defconfig > ARCH=arm64 make LLVM=1 -j72 arch/arm64/kernel/vdso32/ V=1 | tr -s ' ' > | cut -d ' ' -f 2 | grep clang | wc -l > 44 > $ find arch/arm64/kernel/vdso32/ -name \*.o | xargs rm > $ ARCH=arm64 make LLVM=1 -j72 arch/arm64/kernel/vdso32/ V=1 | tr -s ' > ' | cut -d ' ' -f 2 | grep clang | wc -l > 2 > > Please confirm; perhaps my pipeline missed some invocations? Or was > there a different target you were referring to? It is pointless to check the build commands. I am talking about how many times $(call cc32-option, ) is evaluated. How about adding the following debug code? (Everytime cc32-option is evaluated, a file "dummy-cc32-option-" is created) diff --git a/arch/arm64/kernel/vdso32/Makefile b/arch/arm64/kernel/vdso32/Makefile index 89299a26638b..e40365f5bc38 100644 --- a/arch/arm64/kernel/vdso32/Makefile +++ b/arch/arm64/kernel/vdso32/Makefile @@ -26,9 +26,9 @@ LD_COMPAT ?= $(CROSS_COMPILE_COMPAT)ld endif cc32-option = $(call try-run,\ - $(CC_COMPAT) $(1) -c -x c /dev/null -o "$$TMP",$(1),$(2)) + $(CC_COMPAT) $(1) -c -x c /dev/null -o "$$TMP"; touch dummy-cc32-option-$$$$,$(1),$(2)) cc32-disable-warning = $(call try-run,\ - $(CC_COMPAT) -W$(strip $(1)) -c -x c /dev/null -o "$$TMP",-Wno-$(strip $(1))) + $(CC_COMPAT) -W$(strip $(1)) -c -x c /dev/null -o "$$TMP"; touch dummy-cc32-option-$$$$,-Wno-$(strip $(1))) # We cannot use the global flags to compile the vDSO files, the main reason # being that the 32-bit compiler may be older than the main (64-bit) compiler Without this patch: masahiro@grover:~/ref/linux$ rm dummy-cc32-* masahiro@grover:~/ref/linux$ make -s LLVM=1 ARCH=arm64 CROSS_COMPILE_COMPAT=arm-linux-gnueabi- defconfig clean arch/arm64/kernel/vdso32/ -j8 masahiro@grover:~/ref/linux$ ls -1 dummy-cc32-* dummy-cc32-disable-warning-765530 dummy-cc32-option-765495 dummy-cc32-option-765500 dummy-cc32-option-765505 dummy-cc32-option-765510 dummy-cc32-option-765515 dummy-cc32-option-765520 dummy-cc32-option-765525 With this patch: masahiro@grover:~/ref/linux$ rm dummy-cc32-* masahiro@grover:~/ref/linux$ make -s LLVM=1 ARCH=arm64 CROSS_COMPILE_COMPAT=arm-linux-gnueabi- defconfig clean arch/arm64/kernel/vdso32/ -j8 masahiro@grover:~/ref/linux$ ls -1 dummy-cc32-* dummy-cc32-disable-warning-768908 dummy-cc32-disable-warning-768949 dummy-cc32-disable-warning-768990 dummy-cc32-disable-warning-769035 dummy-cc32-disable-warning-769076 dummy-cc32-disable-warning-769117 dummy-cc32-option-768871 dummy-cc32-option-768878 dummy-cc32-option-768883 dummy-cc32-option-768888 dummy-cc32-option-768893 dummy-cc32-option-768898 dummy-cc32-option-768903 dummy-cc32-option-768914 dummy-cc32-option-768919 dummy-cc32-option-768924 dummy-cc32-option-768929 dummy-cc32-option-768934 dummy-cc32-option-768939 dummy-cc32-option-768944 dummy-cc32-option-768955 dummy-cc32-option-768960 dummy-cc32-option-768965 dummy-cc32-option-768970 dummy-cc32-option-768975 dummy-cc32-option-768980 dummy-cc32-option-768985 dummy-cc32-option-768998 dummy-cc32-option-769005 dummy-cc32-option-769010 dummy-cc32-option-769015 dummy-cc32-option-769020 dummy-cc32-option-769025 dummy-cc32-option-769030 dummy-cc32-option-769041 dummy-cc32-option-769046 dummy-cc32-option-769051 dummy-cc32-option-769056 dummy-cc32-option-769061 dummy-cc32-option-769066 dummy-cc32-option-769071 dummy-cc32-option-769082 dummy-cc32-option-769087 dummy-cc32-option-769092 dummy-cc32-option-769097 dummy-cc32-option-769102 dummy-cc32-option-769107 dummy-cc32-option-769112 The diff of the number of expansions: cc32-option 7 -> 42 cc32-disable-warning 1 -> 6 -- Best Regards Masahiro Yamada _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel