linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* arch/ppc/Makefile wiping out /dev/null
@ 2004-04-01 20:42 John Whitney
  2004-04-02  4:50 ` Ethan Benson
  0 siblings, 1 reply; 4+ messages in thread
From: John Whitney @ 2004-04-01 20:42 UTC (permalink / raw)
  To: linuxppc-dev

[-- Attachment #1: Type: text/plain, Size: 1032 bytes --]

In arch/ppc/Makefile, the line

NEW_AS := $(shell echo dssall | $(AS) -o /dev/null >/dev/null 2>&1 ;
echo $$?)

is causing my host's /dev/null file to be wiped out if I don't specify
CROSS_COMPILE, and the hosts' "as" is getting called instead of the
cross-compiler.  Apparently, "as" assumes that the file specified by
"-o file" belongs to it, and deletes it if an error occurs in the
compilation process.  I get this happening to me when I issue the
command:

sudo make ARCH=ppc INSTALL_MOD_PATH=<path> modules_install

In this case, I wasn't compiling anything so I didn't specify
CROSS_COMPILE, with the aforementioned result.  I've attached a patch
for this file which changes the offending line to:

NEW_AS := $(shell echo dssall | $(AS) -o /tmp/.as.$$$$ >/dev/null 2>&1
; echo $$?)

Which appears to work as intended (at least, my 2.14 binutils
ppc7xx-linux-as returns a value of 0 for this, and the failing x86 "as"
is returning 1, which I believe is the expected behavior), and doesn't
cause /dev/null to be deleted.

John

[-- Attachment #2: Makefile.patch --]
[-- Type: application/octet-stream, Size: 458 bytes --]

--- linuxppc-2.6.5-rc2.orig/arch/ppc/Makefile	2004-04-01 14:20:36.000000000 -0500
+++ linuxppc-2.6.5-rc2/arch/ppc/Makefile	2004-04-01 15:31:07.000000000 -0500
@@ -87,7 +87,7 @@

 ifdef CONFIG_6xx
 # Ensure this is binutils 2.12.1 (or 2.12.90.0.7) or later
-NEW_AS	:= $(shell echo dssall | $(AS) -o /dev/null >/dev/null 2>&1 ; echo $$?)
+NEW_AS	:= $(shell echo dssall | $(AS) -o /tmp/.as.$$$$ >/dev/null 2>&1 ; echo $$?)
 GOODVER	:= 2.12.1
 else
 NEW_AS	:= 0

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-04-03  4:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-01 20:42 arch/ppc/Makefile wiping out /dev/null John Whitney
2004-04-02  4:50 ` Ethan Benson
2004-04-03  4:16   ` John Whitney
2004-04-03  4:32     ` Ethan Benson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).