Skip to contentSkip to conversation

Makefile check for older binutils broken?

PATCH Marcelo Tosatti 3 participants 8 messages Oct 26, 2005 – Nov 1, 2005

lore
Share & tools
lore
#0 lore raw

Hi,

While trying to compile 2.6.14-rc4 on my Pegasos (running Debian unstable):

make[2]: Entering directory `/home/marcelo/8xx/linux-2.6.14-rc4' *** 2.6 kernels no longer build correctly with old versions of binutils. *** Please upgrade your binutils to 2.12.1 or newer
make[2]: *** [checkbin] Error 1

Even though Debian uses a recent version of binutils:

GNU assembler 2.16.1 Debian GNU/Linux
Copyright 2005 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of the GNU General Public License. This program has absolutely no warranty. This assembler was configured for a target of `powerpc-linux-gnu'.

The return value of the verification command is 0:

marcelo@pegasos:~$ /bin/echo dssall | as -many -o /tmp/output.as >/dev/null 2>&1
marcelo@pegasos:~$ echo $?
0

So somehow the verification inside the Makefile fails (maybe a make or shell bug? not sure).

Anyway, surrounding the verification command around an eval expression does the trick correcting the situation. Is it any good?

I'm not sure what to expect from older binutils versions as I don't have any around at the moment for testing.

arch/ppc/Makefile +1 -1
index 0432a25..cdd9250 100644
@@ -126,7 +126,7 @@ checkbin:
 			false; \
 		fi ; \
 	fi
-	@if ! /bin/echo dssall | $(AS) -many -o $(TOUT) >/dev/null 2>&1 ; then \
+	@if ! [[ "/bin/echo dssall | $(AS) -many -o $(TOUT) >/dev/null 2>&1" ]] ; then \
 		echo -n '*** ${VERSION}.${PATCHLEVEL} kernels no longer build ' ; \
 		echo 'correctly with old versions of binutils.' ; \
 		echo '*** Please upgrade your binutils to 2.12.1 or newer' ; \
#1 lore raw
Quoted 2 lines · Marcelo Tosatti

Anyway, surrounding the verification command around an eval expression does the trick correcting the situation. Is it any good?

Not at all. You have effectively disabled the check completely.

arch/ppc/Makefile checkbin: · line 129

Quoted 10 lines
arch/ppc/Makefile +1 -1
index 0432a25..cdd9250 100644
@@ -126,7 +126,7 @@ checkbin:
 			false; \
 		fi ; \
 	fi
-	@if ! /bin/echo dssall | $(AS) -many -o $(TOUT) >/dev/null 2>&1 ; then \
+	@if ! [[ "/bin/echo dssall | $(AS) -many -o $(TOUT) >/dev/null 2>&1" ]] ; then \

A non-empty string is always true.

Andreas.

Signature · 4 lines
Andreas Schwab, SuSE Labs, [email protected]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."
#2 lore raw
Quoted 7 lines · Andreas Schwab
Quoted 2 lines · Marcelo Tosatti

Anyway, surrounding the verification command around an eval expression does the trick correcting the situation. Is it any good?

Not at all. You have effectively disabled the check completely.

Quoted 12 lines

arch/ppc/Makefile checkbin: · line 129

Quoted 10 lines
arch/ppc/Makefile +1 -1
index 0432a25..cdd9250 100644
@@ -126,7 +126,7 @@ checkbin:
 			false; \
 		fi ; \
 	fi
-	@if ! /bin/echo dssall | $(AS) -many -o $(TOUT) >/dev/null 2>&1 ; then \
+	@if ! [[ "/bin/echo dssall | $(AS) -many -o $(TOUT) >/dev/null 2>&1" ]] ; then \

A non-empty string is always true.

Doh - it seemed too easy. I'll go search for some clue (and buy a shell book).

I bet either Make or bash is screwing up.

Thanks

#3 lore raw
In reply to Marcelo Tosatti
Quoted 9 lines · Marcelo Tosatti

Hi,

While trying to compile 2.6.14-rc4 on my Pegasos (running Debian unstable):

make[2]: Entering directory `/home/marcelo/8xx/linux-2.6.14-rc4' *** 2.6 kernels no longer build correctly with old versions of binutils. *** Please upgrade your binutils to 2.12.1 or newer
make[2]: *** [checkbin] Error 1

What's your CONFIG_SHELL set to?

[snip]

Quoted 2 lines
marcelo@pegasos:~$ /bin/echo dssall | as -many -o /tmp/output.as >/dev/null 2>&1
marcelo@pegasos:~$ echo $?

What about if you run the whole test on shell (if ...), does it work there? What shell are you running?

Signature · 2 lines
Tom Rini
http://gate.crashing.org/~trini/
#4 lore raw
Quoted 4 lines · Tom Rini
Quoted 3 lines · Marcelo Tosatti

Hi,

Quoted 8 lines
Quoted 6 lines

While trying to compile 2.6.14-rc4 on my Pegasos (running Debian unstable):

make[2]: Entering directory `/home/marcelo/8xx/linux-2.6.14-rc4' *** 2.6 kernels no longer build correctly with old versions of binutils. *** Please upgrade your binutils to 2.12.1 or newer
make[2]: *** [checkbin] Error 1

What's your CONFIG_SHELL set to?

bash

Quoted 7 lines

[snip]

Quoted 2 lines
marcelo@pegasos:~$ /bin/echo dssall | as -many -o /tmp/output.as >/dev/null 2>&1
marcelo@pegasos:~$ echo $?

What about if you run the whole test on shell (if ...), does it work there? What shell are you running?

Yep, that does the trick. Is it good now?

ppc/Makefile renamed from ppc/Makefile.orig +2 -2
@@ -132,12 +132,12 @@
 			false; \
 		fi ; \
 	fi
-	@if ! [[ "/bin/echo dssall | $(AS) -many -o $(TOUT) >/dev/null 2>&1" ]]; then \
+	@(if ! /bin/echo dssall | $(AS) -many -o $(TOUT) >/dev/null 2>&1 ; then\
 		echo -n '*** ${VERSION}.${PATCHLEVEL} kernels no longer build ' ; \
 		echo 'correctly with old versions of binutils.' ; \
 		echo '*** Please upgrade your binutils to 2.12.1 or newer' ; \
 		false ; \
-	fi
+	fi)
 
 CLEAN_FILES += $(TOUT)
 
#5 lore raw
Quoted 17 lines · Marcelo Tosatti
Quoted 4 lines · Tom Rini
Quoted 3 lines · Marcelo Tosatti

Hi,

Quoted 8 lines
Quoted 6 lines

While trying to compile 2.6.14-rc4 on my Pegasos (running Debian unstable):

make[2]: Entering directory `/home/marcelo/8xx/linux-2.6.14-rc4' *** 2.6 kernels no longer build correctly with old versions of binutils. *** Please upgrade your binutils to 2.12.1 or newer
make[2]: *** [checkbin] Error 1

What's your CONFIG_SHELL set to?

bash

Quoted 1 line
Quoted 8 lines
Quoted 6 lines

[snip]

Quoted 2 lines
marcelo@pegasos:~$ /bin/echo dssall | as -many -o /tmp/output.as >/dev/null 2>&1
marcelo@pegasos:~$ echo $?

What about if you run the whole test on shell (if ...), does it work there? What shell are you running?

Yep, that does the trick. Is it good now?

Er, that's odd. I was using writing parens, not shell parens :) Can
you test the failure case here by changing dssall to garbage? Also, that's not a clean patch, but vs your last one that wasn't valid.

Signature · 2 lines
Tom Rini
http://gate.crashing.org/~trini/
#6 lore raw
Quoted 22 lines · Tom Rini
Quoted 21 lines · Marcelo Tosatti
Quoted 4 lines · Tom Rini
Quoted 3 lines · Marcelo Tosatti

Hi,

Quoted 8 lines
Quoted 6 lines

While trying to compile 2.6.14-rc4 on my Pegasos (running Debian unstable):

make[2]: Entering directory `/home/marcelo/8xx/linux-2.6.14-rc4' *** 2.6 kernels no longer build correctly with old versions of binutils. *** Please upgrade your binutils to 2.12.1 or newer
make[2]: *** [checkbin] Error 1

What's your CONFIG_SHELL set to?

bash

Quoted 5 lines

[snip]

Quoted 2 lines
marcelo@pegasos:~$ /bin/echo dssall | as -many -o /tmp/output.as >/dev/null 2>&1
marcelo@pegasos:~$ echo $?
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

What about if you run the whole test on shell (if ...), does it work there? What shell are you running?

Yep, that does the trick. Is it good now?

Er, that's odd. I was using writing parens, not shell parens :) Can
you test the failure case here by changing dssall to garbage? Also, that's not a clean patch, but vs your last one that wasn't valid.

Yes thats bullshit (it does not work actually).

Give me some time figure out whats going to avoid wasting your time.

Sorry.

#7 lore raw
In reply to Tom Rini
Quoted 6 lines
Quoted 2 lines

Yep, that does the trick. Is it good now?

Er, that's odd. I was using writing parens, not shell parens :) Can
you test the failure case here by changing dssall to garbage? Also, that's not a clean patch, but vs your last one that wasn't valid.

Problem is specific to invocation of "make" inside a (particular) Makefile.

Again, sorry for you wasting your time.