Skip to contentSkip to conversation

Fix dependency generation for older gcc versions

PATCH New Vlad Lungu 2 participants 2 messages Apr 11, 2008 – Apr 18, 2008 Kbuild

lore
Share & tools
lore

Vlad Lungu

author
#0 lore raw

PATCH 1/1 Fix dependency generation for older gcc versions

With gcc 3.3.3 at least, compilation fails with

Generating include/autoconf.mk
gcc: compilation of header file requested
make: *** [include/autoconf.mk] Error 1

since commit 16fe77752eee099b9fb61ed73460e51cc94b37ba.

---
 Makefile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Makefile +0 -0
index e5b4210..ef6927b 100644
@@ -425,7 +425,7 @@ $(obj)include/autoconf.mk: $(obj)include/config.h 

$(VERSION_FILE)

     @$(XECHO) Generating include/autoconf.mk ; \
     set -e ; \
     : Generate the dependancies ; \
-    $(CC) -M $(HOST_CFLAGS) $(CPPFLAGS) -MQ $@ include/common.h > 
[email protected] ; \
+    $(CC) -x c -M $(HOST_CFLAGS) $(CPPFLAGS) -MQ $@ include/common.h > 
[email protected] ; \
     : Extract the config macros ; \
     $(CPP) $(CFLAGS) -dM include/common.h | sed -n -f 

tools/scripts/define2mk.sed > $@

Signature · 1 line
1.5.4
#1 lore raw

PATCH 1/1 Fix dependency generation for older gcc versions

Quoted 9 lines · In message <[email protected]> you wrote:

With gcc 3.3.3 at least, compilation fails with

Generating include/autoconf.mk
gcc: compilation of header file requested
make: *** [include/autoconf.mk] Error 1

since commit 16fe77752eee099b9fb61ed73460e51cc94b37ba.

Your patch was line-wrapped:

Makefile $(obj)include/autoconf.mk: $(obj)include/config.h · line 425

Quoted 9 lines
 Makefile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Makefile +0 -0
index e5b4210..ef6927b 100644
@@ -425,7 +425,7 @@ $(obj)include/autoconf.mk: $(obj)include/config.h 
 $(VERSION_FILE)

^^^^^^^^^^^^^^^^^ here

Makefile $(obj)include/autoconf.mk: $(obj)include/config.h · line 429

Quoted 5 lines
Makefile +0 -1
     @$(XECHO) Generating include/autoconf.mk ; \
     set -e ; \
     : Generate the dependancies ; \
-    $(CC) -M $(HOST_CFLAGS) $(CPPFLAGS) -MQ $@ include/common.h > 
 [email protected] ; \

^^^^^^^^^^^^^^^^^ and here

Makefile $(obj)include/autoconf.mk: $(obj)include/config.h · line 431

Quoted 2 lines
Makefile +1 -0
+    $(CC) -x c -M $(HOST_CFLAGS) $(CPPFLAGS) -MQ $@ include/common.h > 
 [email protected] ; \

^^^^^^^^^^^^^^^^^ and here

Quoted 3 lines
     : Extract the config macros ; \
     $(CPP) $(CFLAGS) -dM include/common.h | sed -n -f 

tools/scripts/define2mk.sed > $@

^^^^^^^^^^^^^^^^^ and here

Manually applied.

Please make sure to fix your mailer!!!

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Superior ability breeds superior ambition.
	-- Spock, "Space Seed", stardate 3141.9