From 7992527c2f628411e22267e3c70477cc9f7853f5 Mon Sep 17 00:00:00 2001 From: John Marino Date: Fri, 19 Oct 2012 09:15:22 +0200 Subject: [PATCH] libstdc++47: Rework to prevent regeneration during install The installincludes target regenerated files such as c++config.h during the install phase. It may be a minor bug as "bits/c++config.h:" would trigger it but "c++config.h:" without the subdirectory wouldn't. In any case, generating it and two other headers to the local working bits directory wasn't necessary as installincludes target installs them in an accessible location. Reworking the makefiles prevents a write operation during installworld. Reported-by: dillon --- gnu/lib/gcc47/libstdc++/Makefile | 10 +++------- gnu/lib/gcc47/libstdc++/Makefile.headers | 6 +++--- gnu/lib/gcc47/libsupc++/Makefile.src | 6 +++--- 3 files changed, 9 insertions(+), 13 deletions(-) diff --git a/gnu/lib/gcc47/libstdc++/Makefile b/gnu/lib/gcc47/libstdc++/Makefile index c4923ddf48..866d7b7556 100644 --- a/gnu/lib/gcc47/libstdc++/Makefile +++ b/gnu/lib/gcc47/libstdc++/Makefile @@ -186,10 +186,7 @@ gnu11_FLAGS_FILES= chrono.cc \ #generated sources SRCS+= unwind.h \ - ${CONF_HEADERS:T} \ - bits/gthr.h \ - bits/gthr-default.h \ - bits/c++config.h + ${CONF_HEADERS:T} HD= ${INCLUDEDIR}/c++/${GCCPOINTVER} @@ -280,8 +277,7 @@ vec-cxx.cc: ${SRCDIR}/libsupc++/vec.cc CLEANDIRS+= bits CLEANFILES+= atomicity.cc basic_file.cc c++locale.cc \ ctype_configure_char.cc unwind.h \ - cp-demangle.c debug-cxx.cc tree-cxx.cc vec-cxx.cc - -depend all: bits/c++config.h + cp-demangle.c debug-cxx.cc tree-cxx.cc vec-cxx.cc \ + c++config.h gthr.h gthr-default.h .include diff --git a/gnu/lib/gcc47/libstdc++/Makefile.headers b/gnu/lib/gcc47/libstdc++/Makefile.headers index b09fb13a81..842640c05b 100644 --- a/gnu/lib/gcc47/libstdc++/Makefile.headers +++ b/gnu/lib/gcc47/libstdc++/Makefile.headers @@ -53,14 +53,14 @@ host_builddir = bits supc_builddir = . host_headers_extra = \ ${glibcxx_srcdir}/config/io/basic_file_stdio.h \ - bits/c++config.h \ + c++config.h \ ${glibcxx_srcdir}/config/allocator/new_allocator_base.h \ ${glibcxx_srcdir}/config/io/c_io_stdio.h \ ${glibcxx_srcdir}/config/locale/generic/c_locale.h \ ${glibcxx_srcdir}/config/locale/generic/messages_members.h \ ${glibcxx_srcdir}/config/locale/generic/time_members.h \ - bits/gthr.h \ - bits/gthr-default.h + gthr.h \ + gthr-default.h supc_headers = \ ${glibcxx_srcdir}/libsupc++/cxxabi.h \ ${glibcxx_srcdir}/libsupc++/exception \ diff --git a/gnu/lib/gcc47/libsupc++/Makefile.src b/gnu/lib/gcc47/libsupc++/Makefile.src index 1bf4454370..e17c4ebc2c 100644 --- a/gnu/lib/gcc47/libsupc++/Makefile.src +++ b/gnu/lib/gcc47/libsupc++/Makefile.src @@ -50,14 +50,14 @@ SUPCXX= \ vmi_class_type_info.cc \ vterminate.cc -bits/gthr.h: copybits ${GCCDIR}/libgcc/gthr.h +gthr.h: ${GCCDIR}/libgcc/gthr.h sed -e '/^#pragma/b' \ -e '/^#/s/\([ABCDEFGHIJKLMNOPQRSTUVWXYZ_][ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*\)/_GLIBCXX_\1/g' \ -e 's/_GLIBCXX_SUPPORTS_WEAK/__GXX_WEAK__/g' \ -e 's,^#include "\(.*\)",#include ,g' \ < ${GCCDIR}/libgcc/gthr.h > ${.TARGET} -bits/gthr-default.h: copybits ${GCCDIR}/libgcc/gthr-posix.h +gthr-default.h: ${GCCDIR}/libgcc/gthr-posix.h sed -e 's/\(UNUSED\)/_GLIBCXX_\1/g' \ -e 's/\(GCC[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*_H\)/_GLIBCXX_\1/g' \ -e 's/SUPPORTS_WEAK/__GXX_WEAK__/g' \ @@ -73,7 +73,7 @@ SUBST2='s,define _GLIBCXX_INLINE_VERSION, define _GLIBCXX_INLINE_VERSION ${ns_ve SUBST3='s,define _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY, define _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY ${visibility},' SUBST4='s,define _GLIBCXX_EXTERN_TEMPLATE$$, define _GLIBCXX_EXTERN_TEMPLATE ${externtemplate},' -bits/c++config.h: copybits ${CXX_CONFIG_H} +c++config.h: ${CXX_CONFIG_H} sed -e ${SUBST1} -e ${SUBST2} -e ${SUBST3} -e ${SUBST4} \ < ${GCCDIR}/libstdc++-v3/include/bits/c++config > ${.TARGET} sed -e 's/HAVE_/_GLIBCXX_HAVE_/g' \ -- 2.41.0