diff mbox

Fix libstdc++/45711: --enable-libstdcxx-debug on darwin

Message ID 20100920192205.GG22704@gmx.de
State New
Headers show

Commit Message

Ralf Wildenhues Sept. 20, 2010, 7:22 p.m. UTC
I can reproduce the issue by simulating broken install and mkdir
programs.  The patch below should fix it.

OK for trunk?

The 4.5 branch probably has this issue as well, and 4.4 hasn't, because
it used older autotools which didn't provide MKDIR_P yet (and mkdir_p is
computed differently).

There is a workaround: specify absolute $INSTALL at toplevel configure,
for example:
  ../gcc/configure INSTALL="`pwd`/../install-sh -c"

With that in mind, I'll leave you to decide whether a backport to 4.5 is
desirable.  If you agree, I'll do it.

Thanks,
Ralf

Fix PR libstdc++/45711.

libstdc++-v3/ChangeLog:
2010-09-20  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

	PR libstdc++/45711
	* src/Makefile.am (stamp-debug): Also adjust possibly-relative
	file names in MKDIR_P, and, for consistency, also top_build_prefix.
	* src/Makefile.in: Regenerate.

Comments

Paolo Carlini Sept. 20, 2010, 7:27 p.m. UTC | #1
On 09/20/2010 09:22 PM, Ralf Wildenhues wrote:
> I can reproduce the issue by simulating broken install and mkdir
> programs.  The patch below should fix it.
>
> OK for trunk?
>   
Yes, thanks a lot Ralf.
> The 4.5 branch probably has this issue as well, and 4.4 hasn't, because
> it used older autotools which didn't provide MKDIR_P yet (and mkdir_p is
> computed differently).
>
> There is a workaround: specify absolute $INSTALL at toplevel configure,
> for example:
>   ../gcc/configure INSTALL="`pwd`/../install-sh -c"
>
> With that in mind, I'll leave you to decide whether a backport to 4.5 is
> desirable.  If you agree, I'll do it.
>   
As we often do in such cases, I'm in favor of testing a bit the patch in
mainline and, if everything goes well, backporting it to the release
branch, say in 1 week or so.

Thanks again,
Paolo.
diff mbox

Patch

diff --git a/libstdc++-v3/src/Makefile.am b/libstdc++-v3/src/Makefile.am
index d5194c3..bd748aa 100644
--- a/libstdc++-v3/src/Makefile.am
+++ b/libstdc++-v3/src/Makefile.am
@@ -421,13 +421,16 @@  endif
 debugdir = debug
 
 # Build a set of debug objects here.
+# Take care to fix all possibly-relative paths.
 stamp-debug:
 	if test ! -d ${debugdir}; then \
 	  mkdir -p ${debugdir}; \
 	  (cd ${debugdir}; \
 	  sed -e 's/top_builddir = \.\./top_builddir = ..\/../' \
+	      -e 's/top_build_prefix = \.\./top_build_prefix = ..\/../' \
 	      -e 's/srcdir = \.\./srcdir = ..\/../' \
 	      -e 's/glibcxx_basedir = \.\./glibcxx_basedir = ..\/../' \
+	      -e 's/MKDIR_P = \.\./MKDIR_P = ..\/../' \
 	      -e 's/all-local: build_debug/all-local:/' \
 	      -e 's/install-data-local: install_debug/install-data-local:/' \
 	  < ../Makefile > Makefile) ; \