[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/4334] MAKE FAILED: cpu-powerpc.o isn't added to libbfd.a ?
From: |
vincent dot riviere at freesbee dot fr |
Subject: |
[Bug binutils/4334] MAKE FAILED: cpu-powerpc.o isn't added to libbfd.a ? |
Date: |
28 May 2007 18:24:38 -0000 |
------- Additional Comments From vincent dot riviere at freesbee dot fr
2007-05-28 18:24 -------
More ideas (again) :
6)
libbfd_la_LIBADD = $(shell cat ofiles) @WIN32LIBADD@
This one works with every shell, but only with GNU Make.
http://www.gnu.org/software/make/manual/html_node/Shell-Function.html#Shell-
Function
7)
As said here (thanks Corinna) :
http://cygwin.com/ml/cygwin-announce/2007-05/msg00003.html
Cygwin bash has an option "igncr" which does the trick.
Unfortunately, the shell options are local to a single bash instance.
$ set -o igncr
$ make
In this case, there is no effect on the Makefile because make spawns another
instance of the shell, with the option unset.
The problem is described here :
$ echo "a b c" >ofiles
$ cat ofiles |od -t x1
0000000 61 20 62 20 63 0d 0a
0000007
$ cat Makefile
all:
echo `cat ofiles` |od -t x1
$ make
echo `cat ofiles` |od -t x1
0000000 61 20 62 20 63 0d 0a
0000007
Nothing new until here.
The trick is to add a single line at the top of the Makefile :
$ cat Makefile
SHELL := $(SHELL) -o igncr
all:
echo `cat ofiles` |od -t x1
$ make
echo `cat ofiles` |od -t x1
0000000 61 20 62 20 63 0a
0000006
This time, it is good !
Back to the binutils :
The Makefile SHELL variable can be overriden by invoking configure like this :
CONFIG_SHELL="/bin/sh -o igncr" configure
Using this, the whole binutils builds perfectly, like in binmode !
In the top level configure.in, there is already a case statement on $OSTYPE,
which is used to find a suitable shell on native Win32 systems.
We can add a new case :
cygwin)
CONFIG_SHELL=${CONFIG_SHELL-/bin/sh -o igncr}
export CONFIG_SHELL
;;
This solves the problem by adding very little code.
Only the Cygwin target is impacted.
So it may be the good solution ?
Furthermore, we may add additional runtime checks in configure in order to fail
if a bogus `cat` behaviour is detected.
If all that stuff around CONFIG_SHELL works fine, maybe it should be included
into autoconf...
Vincent
--
http://sourceware.org/bugzilla/show_bug.cgi?id=4334
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
- [Bug binutils/4334] MAKE FAILED: cpu-powerpc.o isn't added to libbfd.a ?, (continued)
- [Bug binutils/4334] MAKE FAILED: cpu-powerpc.o isn't added to libbfd.a ?, vincent dot riviere at freesbee dot fr, 2007/05/22
- [Bug binutils/4334] MAKE FAILED: cpu-powerpc.o isn't added to libbfd.a ?, vincent dot riviere at freesbee dot fr, 2007/05/22
- [Bug binutils/4334] MAKE FAILED: cpu-powerpc.o isn't added to libbfd.a ?, nickc at redhat dot com, 2007/05/23
- [Bug binutils/4334] MAKE FAILED: cpu-powerpc.o isn't added to libbfd.a ?, nickc at redhat dot com, 2007/05/23
- [Bug binutils/4334] MAKE FAILED: cpu-powerpc.o isn't added to libbfd.a ?, vincent dot riviere at freesbee dot fr, 2007/05/23
- [Bug binutils/4334] MAKE FAILED: cpu-powerpc.o isn't added to libbfd.a ?, nickc at redhat dot com, 2007/05/24
- [Bug binutils/4334] MAKE FAILED: cpu-powerpc.o isn't added to libbfd.a ?, schwab at suse dot de, 2007/05/24
- [Bug binutils/4334] MAKE FAILED: cpu-powerpc.o isn't added to libbfd.a ?, dj at redhat dot com, 2007/05/24
- [Bug binutils/4334] MAKE FAILED: cpu-powerpc.o isn't added to libbfd.a ?,
vincent dot riviere at freesbee dot fr <=
- [Bug binutils/4334] MAKE FAILED: cpu-powerpc.o isn't added to libbfd.a ?, vincent dot riviere at freesbee dot fr, 2007/05/30