2019-07-28 20:10:46

by Matteo Croce

[permalink] [raw]
Subject: build error

Hi,

I get this build error with 5.3-rc2"

# make
arch/arm64/Makefile:58: gcc not found, check CROSS_COMPILE_COMPAT. Stop.

I didn't bisect the tree, but I guess that this kconfig can be related

# grep CROSS_COMPILE_COMPAT .config
CONFIG_CROSS_COMPILE_COMPAT_VDSO=""

Does someone have any idea? Am I missing something?

Thanks,
--
Matteo Croce
per aspera ad upstream


2019-07-28 20:29:39

by Matteo Croce

[permalink] [raw]
Subject: Re: build error

On Sun, Jul 28, 2019 at 10:16 PM Bernd Petrovitsch
<[email protected]> wrote:
>
> Hi all!
>
> On 28/07/2019 22:08, Matteo Croce wrote:
> [...]
> > I get this build error with 5.3-rc2"
> >
> > # make
> > arch/arm64/Makefile:58: gcc not found, check CROSS_COMPILE_COMPAT. Stop.
>
> - Install (some) gcc?!
> - Fix $PATH so that (some) gcc can be found?!
>

Hi,

I had no build error with 5.2, anyway:

# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/aarch64-linux-gnu/8/lto-wrapper
Target: aarch64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro
8.3.0-6ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-8/README.Bugs
--enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++ --prefix=/usr
--with-gcc-major-version-only --program-suffix=-8
--program-prefix=aarch64-linux-gnu- --enable-shared
--enable-linker-build-id --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --libdir=/usr/lib
--enable-nls --enable-bootstrap --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes
--with-default-libstdcxx-abi=new --enable-gnu-unique-object
--disable-libquadmath --disable-libquadmath-support --enable-plugin
--enable-default-pie --with-system-zlib --disable-libphobos
--enable-multiarch --enable-fix-cortex-a53-843419 --disable-werror
--enable-checking=release --build=aarch64-linux-gnu
--host=aarch64-linux-gnu --target=aarch64-linux-gnu
Thread model: posix
gcc version 8.3.0 (Ubuntu/Linaro 8.3.0-6ubuntu1)

Bye,
--
Matteo Croce
per aspera ad upstream

2019-07-28 21:19:06

by Bernd Petrovitsch

[permalink] [raw]
Subject: Re: build error

Hi all!

On 28/07/2019 22:08, Matteo Croce wrote:
[...]
> I get this build error with 5.3-rc2"
>
> # make
> arch/arm64/Makefile:58: gcc not found, check CROSS_COMPILE_COMPAT. Stop.

- Install (some) gcc?!
- Fix $PATH so that (some) gcc can be found?!

MfG,
Bernd
--
Bernd Petrovitsch Email : [email protected]
LUGA : http://www.luga.at

2019-07-29 04:45:15

by Bhaskar Chowdhury

[permalink] [raw]
Subject: Re: build error


Matteo,

it's look like gcc is not in your normal PATH. Could you please locate
that fellow and realign it ,where is suppose to be.

Or if I understood right (I doubt that is why asking) that you might put
explicitly the architecture to target build with make also, that might
help.

Please do let me know, if I derailed grossly ...am not sure.. :)

Thanks,
Bhaskar

On 22:08 Sun 28 Jul 2019, Matteo Croce wrote:
>Hi,
>
>I get this build error with 5.3-rc2"
>
># make
>arch/arm64/Makefile:58: gcc not found, check CROSS_COMPILE_COMPAT. Stop.
>
>I didn't bisect the tree, but I guess that this kconfig can be related
>
># grep CROSS_COMPILE_COMPAT .config
>CONFIG_CROSS_COMPILE_COMPAT_VDSO=""
>
>Does someone have any idea? Am I missing something?
>
>Thanks,
>--
>Matteo Croce
>per aspera ad upstream


Attachments:
(No filename) (837.00 B)
signature.asc (499.00 B)
Download all attachments

2019-07-29 08:18:26

by Matteo Croce

[permalink] [raw]
Subject: Re: build error

On Mon, Jul 29, 2019 at 6:44 AM Bhaskar Chowdhury <[email protected]> wrote:
>
>
> Matteo,
>
> it's look like gcc is not in your normal PATH. Could you please locate
> that fellow and realign it ,where is suppose to be.
>
> Or if I understood right (I doubt that is why asking) that you might put
> explicitly the architecture to target build with make also, that might
> help.
>
> Please do let me know, if I derailed grossly ...am not sure.. :)
>
> Thanks,
> Bhaskar
>
> On 22:08 Sun 28 Jul 2019, Matteo Croce wrote:
> >Hi,
> >
> >I get this build error with 5.3-rc2"
> >
> ># make
> >arch/arm64/Makefile:58: gcc not found, check CROSS_COMPILE_COMPAT. Stop.
> >
> >I didn't bisect the tree, but I guess that this kconfig can be related
> >
> ># grep CROSS_COMPILE_COMPAT .config
> >CONFIG_CROSS_COMPILE_COMPAT_VDSO=""
> >
> >Does someone have any idea? Am I missing something?
> >
> >Thanks,
> >--
> >Matteo Croce
> >per aspera ad upstream

I've "fixed" the error by unsetting CONFIG_COMPAT
There should be something broken in the CROSS_COMPILE_COMPAT handling

--
Matteo Croce
per aspera ad upstream

2019-07-29 09:52:14

by Will Deacon

[permalink] [raw]
Subject: Re: build error

Hi Matteo,

On Sun, Jul 28, 2019 at 10:08:06PM +0200, Matteo Croce wrote:
> I get this build error with 5.3-rc2"
>
> # make
> arch/arm64/Makefile:58: gcc not found, check CROSS_COMPILE_COMPAT. Stop.
>
> I didn't bisect the tree, but I guess that this kconfig can be related
>
> # grep CROSS_COMPILE_COMPAT .config
> CONFIG_CROSS_COMPILE_COMPAT_VDSO=""
>
> Does someone have any idea? Am I missing something?

Can you try something like the below?

Will

--->8

diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile
index bb1f1dbb34e8..d35ca0aee295 100644
--- a/arch/arm64/Makefile
+++ b/arch/arm64/Makefile
@@ -52,7 +52,7 @@ ifeq ($(CONFIG_GENERIC_COMPAT_VDSO), y)

ifeq ($(CONFIG_CC_IS_CLANG), y)
$(warning CROSS_COMPILE_COMPAT is clang, the compat vDSO will not be built)
- else ifeq ($(CROSS_COMPILE_COMPAT),)
+ else ifeq ("$(CROSS_COMPILE_COMPAT)","")
$(warning CROSS_COMPILE_COMPAT not defined or empty, the compat vDSO will not be built)
else ifeq ($(shell which $(CROSS_COMPILE_COMPAT)gcc 2> /dev/null),)
$(error $(CROSS_COMPILE_COMPAT)gcc not found, check CROSS_COMPILE_COMPAT)

2019-07-29 10:11:27

by Matteo Croce

[permalink] [raw]
Subject: Re: build error

On Mon, Jul 29, 2019 at 11:50 AM Will Deacon <[email protected]> wrote:
>
> Hi Matteo,
>
> On Sun, Jul 28, 2019 at 10:08:06PM +0200, Matteo Croce wrote:
> > I get this build error with 5.3-rc2"
> >
> > # make
> > arch/arm64/Makefile:58: gcc not found, check CROSS_COMPILE_COMPAT. Stop.
> >
> > I didn't bisect the tree, but I guess that this kconfig can be related
> >
> > # grep CROSS_COMPILE_COMPAT .config
> > CONFIG_CROSS_COMPILE_COMPAT_VDSO=""
> >
> > Does someone have any idea? Am I missing something?
>
> Can you try something like the below?
>
> Will
>
> --->8
>
> diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile
> index bb1f1dbb34e8..d35ca0aee295 100644
> --- a/arch/arm64/Makefile
> +++ b/arch/arm64/Makefile
> @@ -52,7 +52,7 @@ ifeq ($(CONFIG_GENERIC_COMPAT_VDSO), y)
>
> ifeq ($(CONFIG_CC_IS_CLANG), y)
> $(warning CROSS_COMPILE_COMPAT is clang, the compat vDSO will not be built)
> - else ifeq ($(CROSS_COMPILE_COMPAT),)
> + else ifeq ("$(CROSS_COMPILE_COMPAT)","")
> $(warning CROSS_COMPILE_COMPAT not defined or empty, the compat vDSO will not be built)
> else ifeq ($(shell which $(CROSS_COMPILE_COMPAT)gcc 2> /dev/null),)
> $(error $(CROSS_COMPILE_COMPAT)gcc not found, check CROSS_COMPILE_COMPAT)

Hi, it doesn't fix. I've tried to print CROSS_COMPILE_COMPAT and it
seemed empty, but hexdump shows that it contains a new line:

# make 2>&1 |hexdump -C
00000000 61 72 63 68 2f 61 72 6d 36 34 2f 4d 61 6b 65 66 |arch/arm64/Makef|
00000010 69 6c 65 3a 35 39 3a 20 2a 2a 2a 20 43 52 4f 53 |ile:59: *** CROS|
00000020 53 5f 43 4f 4d 50 49 4c 45 5f 43 4f 4d 50 41 54 |S_COMPILE_COMPAT|
00000030 3d 27 13 27 2e 20 20 53 74 6f 70 2e 0a |='.'. Stop..|
0000003d

--
Matteo Croce
per aspera ad upstream

2019-07-29 10:17:57

by Vincenzo Frascino

[permalink] [raw]
Subject: Re: build error

Hi Matteo and Will,

On 29/07/2019 10:50, Will Deacon wrote:
> Hi Matteo,
>
> On Sun, Jul 28, 2019 at 10:08:06PM +0200, Matteo Croce wrote:
>> I get this build error with 5.3-rc2"
>>
>> # make
>> arch/arm64/Makefile:58: gcc not found, check CROSS_COMPILE_COMPAT. Stop.
>>
>> I didn't bisect the tree, but I guess that this kconfig can be related
>>
>> # grep CROSS_COMPILE_COMPAT .config
>> CONFIG_CROSS_COMPILE_COMPAT_VDSO=""
>>
>> Does someone have any idea? Am I missing something?
>
> Can you try something like the below?
>
> Will
>
> --->8
>
> diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile
> index bb1f1dbb34e8..d35ca0aee295 100644
> --- a/arch/arm64/Makefile
> +++ b/arch/arm64/Makefile
> @@ -52,7 +52,7 @@ ifeq ($(CONFIG_GENERIC_COMPAT_VDSO), y)
>
> ifeq ($(CONFIG_CC_IS_CLANG), y)
> $(warning CROSS_COMPILE_COMPAT is clang, the compat vDSO will not be built)
> - else ifeq ($(CROSS_COMPILE_COMPAT),)
> + else ifeq ("$(CROSS_COMPILE_COMPAT)","")
> $(warning CROSS_COMPILE_COMPAT not defined or empty, the compat vDSO will not be built)
> else ifeq ($(shell which $(CROSS_COMPILE_COMPAT)gcc 2> /dev/null),)
> $(error $(CROSS_COMPILE_COMPAT)gcc not found, check CROSS_COMPILE_COMPAT)
>

If I try to build a fresh kernel on my machine with the standard "make mrproper
&& make defconfig && make" I do not see the reported issue (Please see below
scissors).

At this point would be interesting to know more about how Matteo is building the
kernel, and try to reproduce the issue here.

@Matteo, could you please provide the full .config and the steps you used to
generate it? Is it an 'oldconfig'?

--->8---

Message of detection of empty compat compiler:
----------------------------------------------

arch/arm64/Makefile:56: CROSS_COMPILE_COMPAT not defined or empty, the compat
vDSO will not be built


Generated .config:
------------------

$ cat .config | grep COMPAT
CONFIG_COMPAT=y
...
CONFIG_GENERIC_COMPAT_VDSO=y
CONFIG_CROSS_COMPILE_COMPAT_VDSO=""


--
Regards,
Vincenzo

2019-07-29 10:23:44

by Matteo Croce

[permalink] [raw]
Subject: Re: build error

On Mon, Jul 29, 2019 at 12:16 PM Vincenzo Frascino
<[email protected]> wrote:
>
> Hi Matteo and Will,
>
>
> If I try to build a fresh kernel on my machine with the standard "make mrproper
> && make defconfig && make" I do not see the reported issue (Please see below
> scissors).
>
> At this point would be interesting to know more about how Matteo is building the
> kernel, and try to reproduce the issue here.
>
> @Matteo, could you please provide the full .config and the steps you used to
> generate it? Is it an 'oldconfig'?
>

Hi,

yes, this is an oldconfig from a vanilla 5.2, I attach it

--
Matteo Croce
per aspera ad upstream


Attachments:
config (91.37 kB)

2019-07-29 11:10:19

by Vincenzo Frascino

[permalink] [raw]
Subject: Re: build error

Hi Matteo,

On 29/07/2019 11:25, Matteo Croce wrote:
> On Mon, Jul 29, 2019 at 12:16 PM Vincenzo Frascino
> <[email protected]> wrote:
>>
>> Hi Matteo and Will,
>>
>>
>> If I try to build a fresh kernel on my machine with the standard "make mrproper
>> && make defconfig && make" I do not see the reported issue (Please see below
>> scissors).
>>
>> At this point would be interesting to know more about how Matteo is building the
>> kernel, and try to reproduce the issue here.
>>
>> @Matteo, could you please provide the full .config and the steps you used to
>> generate it? Is it an 'oldconfig'?
>>
>
> Hi,
>
> yes, this is an oldconfig from a vanilla 5.2, I attach it
> (the non gzipped config was dropped by the ML filter)
>
>

I tried your config file and seems working correctly:

# cp ~/config ../linux-out/.config
# make oldconfig
# make

arch/arm64/Makefile:56: CROSS_COMPILE_COMPAT not defined or empty, the compat
vDSO will not be built

---

Could you please send to me the config file that does not contain:
CONFIG_CROSS_COMPILE_COMPAT_VDSO=""

The original one I mean, on which you did not run make oldconfig.
My suspect at this point is that the string passed to
CONFIG_CROSS_COMPILE_COMPAT_VDSO is not completely empty.

In fact if I do CONFIG_CROSS_COMPILE_COMPAT_VDSO=" " (single space),
I do have a failure similar to the one you reported.

> _______________________________________________
> linux-arm-kernel mailing list
> [email protected]
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>

--
Regards,
Vincenzo

2019-07-29 11:14:12

by Matteo Croce

[permalink] [raw]
Subject: Re: build error

On Mon, Jul 29, 2019 at 1:08 PM Vincenzo Frascino
<[email protected]> wrote:
>
> Hi Matteo,
>
> On 29/07/2019 11:25, Matteo Croce wrote:
> > On Mon, Jul 29, 2019 at 12:16 PM Vincenzo Frascino
> > <[email protected]> wrote:
> >>
> >> Hi Matteo and Will,
> >>
> >>
> >> If I try to build a fresh kernel on my machine with the standard "make mrproper
> >> && make defconfig && make" I do not see the reported issue (Please see below
> >> scissors).
> >>
> >> At this point would be interesting to know more about how Matteo is building the
> >> kernel, and try to reproduce the issue here.
> >>
> >> @Matteo, could you please provide the full .config and the steps you used to
> >> generate it? Is it an 'oldconfig'?
> >>
> >
> > Hi,
> >
> > yes, this is an oldconfig from a vanilla 5.2, I attach it
> > (the non gzipped config was dropped by the ML filter)
> >
> >
>
> I tried your config file and seems working correctly:
>
> # cp ~/config ../linux-out/.config
> # make oldconfig
> # make
>
> arch/arm64/Makefile:56: CROSS_COMPILE_COMPAT not defined or empty, the compat
> vDSO will not be built
>
> ---
>
> Could you please send to me the config file that does not contain:
> CONFIG_CROSS_COMPILE_COMPAT_VDSO=""
>
> The original one I mean, on which you did not run make oldconfig.
> My suspect at this point is that the string passed to
> CONFIG_CROSS_COMPILE_COMPAT_VDSO is not completely empty.
>
> In fact if I do CONFIG_CROSS_COMPILE_COMPAT_VDSO=" " (single space),
> I do have a failure similar to the one you reported.
>

That's what I initially thought, but the string is effectively empty:

# make
arch/arm64/Makefile:58: *** gcc not found, check CROSS_COMPILE_COMPAT. Stop.
# grep CROSS_COMPILE_COMPAT_VDSO .config |hexdump -C
00000000 43 4f 4e 46 49 47 5f 43 52 4f 53 53 5f 43 4f 4d |CONFIG_CROSS_COM|
00000010 50 49 4c 45 5f 43 4f 4d 50 41 54 5f 56 44 53 4f |PILE_COMPAT_VDSO|
00000020 3d 22 22 0a |="".|
00000024


--
Matteo Croce
per aspera ad upstream

2019-07-29 11:21:03

by Vincenzo Frascino

[permalink] [raw]
Subject: Re: build error

On 29/07/2019 12:12, Matteo Croce wrote:
> On Mon, Jul 29, 2019 at 1:08 PM Vincenzo Frascino
> <[email protected]> wrote:
>>
>> Hi Matteo,
>>
>> On 29/07/2019 11:25, Matteo Croce wrote:
>>> On Mon, Jul 29, 2019 at 12:16 PM Vincenzo Frascino
>>> <[email protected]> wrote:
>>>>
>>>> Hi Matteo and Will,
>>>>
>>>>
>>>> If I try to build a fresh kernel on my machine with the standard "make mrproper
>>>> && make defconfig && make" I do not see the reported issue (Please see below
>>>> scissors).
>>>>
>>>> At this point would be interesting to know more about how Matteo is building the
>>>> kernel, and try to reproduce the issue here.
>>>>
>>>> @Matteo, could you please provide the full .config and the steps you used to
>>>> generate it? Is it an 'oldconfig'?
>>>>
>>>
>>> Hi,
>>>
>>> yes, this is an oldconfig from a vanilla 5.2, I attach it
>>> (the non gzipped config was dropped by the ML filter)
>>>
>>>
>>
>> I tried your config file and seems working correctly:
>>
>> # cp ~/config ../linux-out/.config
>> # make oldconfig
>> # make
>>
>> arch/arm64/Makefile:56: CROSS_COMPILE_COMPAT not defined or empty, the compat
>> vDSO will not be built
>>
>> ---
>>
>> Could you please send to me the config file that does not contain:
>> CONFIG_CROSS_COMPILE_COMPAT_VDSO=""
>>
>> The original one I mean, on which you did not run make oldconfig.
>> My suspect at this point is that the string passed to
>> CONFIG_CROSS_COMPILE_COMPAT_VDSO is not completely empty.
>>
>> In fact if I do CONFIG_CROSS_COMPILE_COMPAT_VDSO=" " (single space),
>> I do have a failure similar to the one you reported.
>>
>
> That's what I initially thought, but the string is effectively empty:
>
> # make
> arch/arm64/Makefile:58: *** gcc not found, check CROSS_COMPILE_COMPAT. Stop.
> # grep CROSS_COMPILE_COMPAT_VDSO .config |hexdump -C
> 00000000 43 4f 4e 46 49 47 5f 43 52 4f 53 53 5f 43 4f 4d |CONFIG_CROSS_COM|
> 00000010 50 49 4c 45 5f 43 4f 4d 50 41 54 5f 56 44 53 4f |PILE_COMPAT_VDSO|
> 00000020 3d 22 22 0a |="".|
> 00000024
>
>

Ok, it is strange though that your config file works in my environment. Could
you please provide to me the starting .config file?

Could you please confirm as well that "make mrproper && make defconfig && make"
builds correctly for you?

Last but not least, are you on any irc channel? Might help speeding up the
debugging if we talk there.

--
Regards,
Vincenzo

2019-07-29 11:29:54

by Matteo Croce

[permalink] [raw]
Subject: Re: build error

On Mon, Jul 29, 2019 at 1:18 PM Vincenzo Frascino
<[email protected]> wrote:
> Last but not least, are you on any irc channel? Might help speeding up the
> debugging if we talk there.
>

Sure, I'm matteo on FreeNode, #armlinux

--
Matteo Croce
per aspera ad upstream

2019-07-29 13:18:47

by Matteo Croce

[permalink] [raw]
Subject: Re: build error

On Mon, Jul 29, 2019 at 12:16 PM Vincenzo Frascino
<[email protected]> wrote:
>
> Hi Matteo and Will,
>
>
> If I try to build a fresh kernel on my machine with the standard "make mrproper
> && make defconfig && make" I do not see the reported issue (Please see below
> scissors).
>
> At this point would be interesting to know more about how Matteo is building the
> kernel, and try to reproduce the issue here.
>
> @Matteo, could you please provide the full .config and the steps you used to
> generate it? Is it an 'oldconfig'?
>

Hi,

yes, this is an oldconfig from a vanilla 5.2, I attach it
(the non gzipped config was dropped by the ML filter)

--
Matteo Croce
per aspera ad upstream


Attachments:
config.gz (20.81 kB)

2019-07-29 17:22:36

by Vincenzo Frascino

[permalink] [raw]
Subject: [PATCH] arm64: vdso: Fix Makefile regression

Using an old .config in combination with "make oldconfig" can cause
an incorrect detection of the compat compiler:

$ grep CROSS_COMPILE_COMPAT .config
CONFIG_CROSS_COMPILE_COMPAT_VDSO=""

$ make oldconfig && make
arch/arm64/Makefile:58: gcc not found, check CROSS_COMPILE_COMPAT.
Stop.

Accordingly to the section 7.2 of the GNU Make manual "Syntax of
Conditionals", "When the value results from complex expansions of
variables and functions, expansions you would consider empty may
actually contain whitespace characters and thus are not seen as
empty. However, you can use the strip function to avoid interpreting
whitespace as a non-empty value."

Fix the issue adding strip to the CROSS_COMPILE_COMPAT string
evaluation.

Cc: Will Deacon <[email protected]>
Cc: Catalin Marinas <[email protected]>
Reported-by: Matteo Croce <[email protected]>
Signed-off-by: Vincenzo Frascino <[email protected]>
---
arch/arm64/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile
index bb1f1dbb34e8..61de992bbea3 100644
--- a/arch/arm64/Makefile
+++ b/arch/arm64/Makefile
@@ -52,7 +52,7 @@ ifeq ($(CONFIG_GENERIC_COMPAT_VDSO), y)

ifeq ($(CONFIG_CC_IS_CLANG), y)
$(warning CROSS_COMPILE_COMPAT is clang, the compat vDSO will not be built)
- else ifeq ($(CROSS_COMPILE_COMPAT),)
+ else ifeq ($(strip $(CROSS_COMPILE_COMPAT)),)
$(warning CROSS_COMPILE_COMPAT not defined or empty, the compat vDSO will not be built)
else ifeq ($(shell which $(CROSS_COMPILE_COMPAT)gcc 2> /dev/null),)
$(error $(CROSS_COMPILE_COMPAT)gcc not found, check CROSS_COMPILE_COMPAT)
--
2.22.0

2019-07-31 16:25:44

by Will Deacon

[permalink] [raw]
Subject: Re: [PATCH] arm64: vdso: Fix Makefile regression

On Mon, Jul 29, 2019 at 01:54:21PM +0100, Vincenzo Frascino wrote:
> Using an old .config in combination with "make oldconfig" can cause
> an incorrect detection of the compat compiler:
>
> $ grep CROSS_COMPILE_COMPAT .config
> CONFIG_CROSS_COMPILE_COMPAT_VDSO=""
>
> $ make oldconfig && make
> arch/arm64/Makefile:58: gcc not found, check CROSS_COMPILE_COMPAT.
> Stop.
>
> Accordingly to the section 7.2 of the GNU Make manual "Syntax of
> Conditionals", "When the value results from complex expansions of
> variables and functions, expansions you would consider empty may
> actually contain whitespace characters and thus are not seen as
> empty. However, you can use the strip function to avoid interpreting
> whitespace as a non-empty value."
>
> Fix the issue adding strip to the CROSS_COMPILE_COMPAT string
> evaluation.
>
> Cc: Will Deacon <[email protected]>
> Cc: Catalin Marinas <[email protected]>
> Reported-by: Matteo Croce <[email protected]>
> Signed-off-by: Vincenzo Frascino <[email protected]>
> ---
> arch/arm64/Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile
> index bb1f1dbb34e8..61de992bbea3 100644
> --- a/arch/arm64/Makefile
> +++ b/arch/arm64/Makefile
> @@ -52,7 +52,7 @@ ifeq ($(CONFIG_GENERIC_COMPAT_VDSO), y)
>
> ifeq ($(CONFIG_CC_IS_CLANG), y)
> $(warning CROSS_COMPILE_COMPAT is clang, the compat vDSO will not be built)
> - else ifeq ($(CROSS_COMPILE_COMPAT),)
> + else ifeq ($(strip $(CROSS_COMPILE_COMPAT)),)
> $(warning CROSS_COMPILE_COMPAT not defined or empty, the compat vDSO will not be built)
> else ifeq ($(shell which $(CROSS_COMPILE_COMPAT)gcc 2> /dev/null),)
> $(error $(CROSS_COMPILE_COMPAT)gcc not found, check CROSS_COMPILE_COMPAT)
> --
> 2.22.0

Acked-by: Will Deacon <[email protected]>

Will

2019-07-31 17:52:53

by Catalin Marinas

[permalink] [raw]
Subject: Re: [PATCH] arm64: vdso: Fix Makefile regression

On Mon, Jul 29, 2019 at 01:54:21PM +0100, Vincenzo Frascino wrote:
> Using an old .config in combination with "make oldconfig" can cause
> an incorrect detection of the compat compiler:
>
> $ grep CROSS_COMPILE_COMPAT .config
> CONFIG_CROSS_COMPILE_COMPAT_VDSO=""
>
> $ make oldconfig && make
> arch/arm64/Makefile:58: gcc not found, check CROSS_COMPILE_COMPAT.
> Stop.
>
> Accordingly to the section 7.2 of the GNU Make manual "Syntax of
> Conditionals", "When the value results from complex expansions of
> variables and functions, expansions you would consider empty may
> actually contain whitespace characters and thus are not seen as
> empty. However, you can use the strip function to avoid interpreting
> whitespace as a non-empty value."
>
> Fix the issue adding strip to the CROSS_COMPILE_COMPAT string
> evaluation.
>
> Cc: Will Deacon <[email protected]>
> Cc: Catalin Marinas <[email protected]>
> Reported-by: Matteo Croce <[email protected]>
> Signed-off-by: Vincenzo Frascino <[email protected]>

Queued for 5.3-rc3. Thanks.

--
Catalin