Patchwork Fix *-user build error

login
register
mail settings
Submitter Paul Bolle
Date Oct. 13, 2009, 9:32 a.m.
Message ID <1255426327.1817.14.camel@localhost.localdomain>
Download mbox | patch
Permalink /patch/35836/
State New
Headers show

Comments

Paul Bolle - Oct. 13, 2009, 9:32 a.m.
Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
---
Currently building i386-linux-user fails with this error:

  CC    i386-linux-user/fpu/softfloat-native.o
[...]/qemu/fpu/softfloat-native.c:132:5: error: "HOST_LONG_BITS" is not defined
make[3]: *** [fpu/softfloat-native.o] Error 1
make[2]: *** [all] Error 2
make[1]: *** [subdir-i386-linux-user] Error 2
make: *** [build-all] Error 2

This trivial patch seems to fix it (without messing up the i386-softmmu
build, the other one I sort of tested). I assume it also fixes similar
errors in building the other *-user targets.

 fpu/softfloat.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Paul Bolle - Oct. 13, 2009, 11:22 a.m.
On Tue, 2009-10-13 at 13:01 +0200, Juan Quintela wrote:
> Paul Bolle <pebolle@tiscali.nl> wrote:
> > Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
> > ---
> > Currently building i386-linux-user fails with this error:
> >
> >   CC    i386-linux-user/fpu/softfloat-native.o
> > [...]/qemu/fpu/softfloat-native.c:132:5: error: "HOST_LONG_BITS" is not defined
> > make[3]: *** [fpu/softfloat-native.o] Error 1
> > make[2]: *** [all] Error 2
> > make[1]: *** [subdir-i386-linux-user] Error 2
> > make: *** [build-all] Error 2
> >
> 
> make disclean
> or
> rm -f */config.h
> 
> Will fix the problem.
> 
> config.h was a generated file, and now it is not :(  To make things more
> interesting, it moved from one place to other (now it is shared for all
> targets).

make distclean didn't help here (neither did "make clean", which is what
I used before submitting the trivial patch).

"rm */config.h" did work. Thanks.

Why doesn't "make clean" do what one expects it to do? Can't it be made
to behave properly?


Paul
Paul Bolle - Oct. 13, 2009, 3:58 p.m.
On Tue, 2009-10-13 at 15:56 +0200, Juan Quintela wrote:
> Paul Bolle <pebolle@tiscali.nl> wrote:
> > On Tue, 2009-10-13 at 13:01 +0200, Juan Quintela wrote:
> >> Paul Bolle <pebolle@tiscali.nl> wrote:
> > Why doesn't "make clean" do what one expects it to do? Can't it be made
> > to behave properly?
> 
> Not trivial.
> foo-softmmu/config.h got renamed foo-softmmu/config-target.h
> now a new config.h got created at toplevel directory, that includes
> config-target.h (and more things, that is the whore reason why it was
> created).
> 
> Adding removal of foo-softmmu/config.h to the Makefile is an option, but
> this is a "once" affair, i.e. it is only needed if you have ever
> compiled in that directory.  Both options are bad:
> - add a removal of foo-softmmu/config.h that is not generated at all
> - require users to removal config.h once
> 
> 2nd one was adopted, both have disadvantages, just different ones.
> The other option was to rename config.h to something different, but that
> was a BIIIIIIIG patch for no gain either :(

I see. All that basically happened was that this rename etc. took place
in a repository in which I had previously built qemu and I should not
run into this issue anymore. Thanks.


Paul

Patch

diff --git a/fpu/softfloat.h b/fpu/softfloat.h
index 789179a..c6ef652 100644
--- a/fpu/softfloat.h
+++ b/fpu/softfloat.h
@@ -37,7 +37,7 @@  these four paragraphs for those parts of this code that are retained.
 #endif
 
 #include <inttypes.h>
-#include "config.h"
+#include "../config.h"
 
 /*----------------------------------------------------------------------------
 | Each of the following `typedef's defines the most convenient type that holds