Patchwork [libstdc++] Fix build failure with --enable-libstdcxx-debug

login
register
mail settings
Submitter Matthias Klose
Date Dec. 10, 2012, 8:22 a.m.
Message ID <50C59BB8.1040300@ubuntu.com>
Download mbox | patch
Permalink /patch/204830/
State New
Headers show

Comments

Matthias Klose - Dec. 10, 2012, 8:22 a.m.
Am 10.12.2012 08:19, schrieb Matthias Klose:
> Seen with a x86_64 x arm x arm cross build and --enable-libstdcxx-debug. The
> ../config.h should not be hard-coded. Using the macro guarantees that the
> rewritten macros for the debug builds are used. However I fail to see why the
> unpatched version does work for the native build.
> 
> Ok for the trunk and the 4.7 branch?

and attaching the patch ...
Jonathan Wakely - Dec. 10, 2012, 8:51 a.m.
On 10 December 2012 08:22, Matthias Klose <doko@ubuntu.com> wrote:
> Am 10.12.2012 08:19, schrieb Matthias Klose:
>> Seen with a x86_64 x arm x arm cross build and --enable-libstdcxx-debug. The
>> ../config.h should not be hard-coded. Using the macro guarantees that the
>> rewritten macros for the debug builds are used. However I fail to see why the
>> unpatched version does work for the native build.
>>
>> Ok for the trunk and the 4.7 branch?

OK, thanks

> and attaching the patch ...
>
>

Patch

# DP: Fix cross build failure with --enable-libstdcxx-debug.

	* src/Makefile.am (libstdc++-symbols.ver): Use CONFIG_HEADER.
	* src/Makefile.in: Regenerate.

--- libstdc++-v3/src/Makefile.am~	2012-12-09 11:55:15.357516806 +0100
+++ libstdc++-v3/src/Makefile.am	2012-12-09 14:48:31.545377728 +0100
@@ -213,7 +213,7 @@ 
 	  fi; \
 	fi
 	$(EGREP) -v '^[ 	]*#(#| |$$)' $@.tmp | \
-	  $(CC) -E -P -include ../config.h - > $@ || (rm -f $@ ; exit 1)
+	  $(CC) -E -P -include $(CONFIG_HEADER) - > $@ || (rm -f $@ ; exit 1)
 	rm -f $@.tmp
 
 CLEANFILES = libstdc++-symbols.ver