gcc-4.1: correctly generate libstdc++ gthr.h headers
authorSimon Schubert <simon.schubert@epfl.ch>
Thu, 14 May 2009 14:02:57 +0000 (16:02 +0200)
committerSimon Schubert <simon.schubert@epfl.ch>
Thu, 14 May 2009 14:05:15 +0000 (16:05 +0200)
The libstdc++ headers changed the names of their macro symbols since
gcc 3.4.  This was missed when introducing gcc 4.1.  Update the generation
rules to match those of the libstdc++ include/Makefile.am.

Reported-by: hasso@
gnu/lib/gcc41/libstdc++/Makefile

index d54f5b8..bafe045 100644 (file)
@@ -456,25 +456,29 @@ THRHDRS=  gthr.h gthr-single.h gthr-posix.h gthr-default.h
 THRHDRSDIR=    ${INCLUDEDIR}/c++/4.1/bits
 
 gthr.h: ${GCCDIR}/gcc/gthr.h
-       sed -e '/^#/s/\([ABCDEFGHIJKLMNOPQRSTUVWXYZ_][ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*\)/_GLIBCPP_\1/g' \
+       sed -e '/^#pragma/b' \
+           -e '/^#/s/\([ABCDEFGHIJKLMNOPQRSTUVWXYZ_][ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*\)/_GLIBCXX_\1/g' \
+           -e 's/_GLIBCXX_SUPPORTS_WEAK/__GXX_WEAK__/g' \
            -e 's,^#include "\(.*\)",#include <bits/\1>,g' \
            < ${GCCDIR}/gcc/gthr.h > gthr.h
 
 gthr-single.h: ${GCCDIR}/gcc/gthr-single.h
-       sed -e 's/\(UNUSED\)/_GLIBCPP_\1/g' \
-           -e 's/\(GCC[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*_H\)/_GLIBCPP_\1/g' \
+       sed -e 's/\(UNUSED\)/_GLIBCXX_\1/g' \
+           -e 's/\(GCC[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*_H\)/_GLIBCXX_\1/g' \
            < ${GCCDIR}/gcc/gthr-single.h > gthr-single.h
 
 gthr-posix.h: ${GCCDIR}/gcc/gthr-posix.h
-       sed -e 's/\(UNUSED\)/_GLIBCPP_\1/g' \
-           -e 's/\(GCC[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*_H\)/_GLIBCPP_\1/g' \
-           -e 's/\([ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*WEAK\)/_GLIBCPP_\1/g' \
+       sed -e 's/\(UNUSED\)/_GLIBCXX_\1/g' \
+           -e 's/\(GCC[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*_H\)/_GLIBCXX_\1/g' \
+           -e 's/SUPPORTS_WEAK/__GXX_WEAK__/g' \
+           -e 's/\([ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*USE_WEAK\)/_GLIBCXX_\1/g' \
            < ${GCCDIR}/gcc/gthr-posix.h > gthr-posix.h
 
 gthr-default.h: ${GCCDIR}/gcc/gthr-posix.h
-       sed -e 's/\(UNUSED\)/_GLIBCPP_\1/g' \
-           -e 's/\(GCC[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*_H\)/_GLIBCPP_\1/g' \
-           -e 's/\([ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*WEAK\)/_GLIBCPP_\1/g' \
+       sed -e 's/\(UNUSED\)/_GLIBCXX_\1/g' \
+           -e 's/\(GCC[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*_H\)/_GLIBCXX_\1/g' \
+           -e 's/SUPPORTS_WEAK/__GXX_WEAK__/g' \
+           -e 's/\([ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*USE_WEAK\)/_GLIBCXX_\1/g' \
            -e 's,^#include "\(.*\)",#include <bits/\1>,g' \
            < ${GCCDIR}/gcc/gthr-posix.h > gthr-default.h