[patch] Only configure libstdc++-v3/python dir for hosted builds
Jonathan Wakely
jwakely@redhat.com
Tue Apr 28 19:43:00 GMT 2015
On 27/08/14 18:50 +0100, Jonathan Wakely wrote:
>Currently a freestanding build installs the Python GDB hooks as
>${libdir}/libstdc*-gdb.py (with a literal * character in the filename)
>because there is no libstdc++.so library file and the wildcard doesn't
>get expanded (see the install-data-local target in the
>libstdc++-v3/python/Makefile.am file).
>
>I don't see any reason to install any Python files for a freestanding
>build, the pretty printers and type printers are only useful for types
>defined in the hosted library, so this just disables the entire
>directory.
1.txt makes the change described above, so the Python printers are not
installed for freestanding builds (and also regenerates the configure
script which I forgot to commit yesterday after changing
libtool_VERSION).
2.txt disables std::random_shuffle for freestanding builds, because it
uses std::rand() which isn't available.
Tested x86_64-linux, ppc64le-linux, committed to trunk.
-------------- next part --------------
commit 24e549e0e2484d61812bc93517bad97671884801
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Tue Apr 28 19:23:00 2015 +0100
* Makefile.am (SUBDIRS): Move python to hosted_source.
* Makefile.in: Regenerate.
* acinclude.m4 (glibcxx_SUBDIRS): Reorder.
* configure: Regenerate.
diff --git a/libstdc++-v3/Makefile.am b/libstdc++-v3/Makefile.am
index 808beba..b1bcba7 100644
--- a/libstdc++-v3/Makefile.am
+++ b/libstdc++-v3/Makefile.am
@@ -23,12 +23,12 @@
include $(top_srcdir)/fragment.am
if GLIBCXX_HOSTED
- hosted_source = src doc po testsuite
+## Note that python must come after src.
+ hosted_source = src doc po testsuite python
endif
## Keep this list sync'd with acinclude.m4:GLIBCXX_CONFIGURE.
-## Note that python must come after src.
-SUBDIRS = include libsupc++ $(hosted_source) python
+SUBDIRS = include libsupc++ $(hosted_source)
ACLOCAL_AMFLAGS = -I . -I .. -I ../config
diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
index 196b4ff..ffa2122 100644
--- a/libstdc++-v3/acinclude.m4
+++ b/libstdc++-v3/acinclude.m4
@@ -49,7 +49,7 @@ AC_DEFUN([GLIBCXX_CONFIGURE], [
# Keep these sync'd with the list in Makefile.am. The first provides an
# expandable list at autoconf time; the second provides an expandable list
# (i.e., shell variable) at configure time.
- m4_define([glibcxx_SUBDIRS],[include libsupc++ python src src/c++98 src/c++11 doc po testsuite])
+ m4_define([glibcxx_SUBDIRS],[include libsupc++ src src/c++98 src/c++11 doc po testsuite python])
SUBDIRS='glibcxx_SUBDIRS'
# These need to be absolute paths, yet at the same time need to
-------------- next part --------------
commit d90a2639da11db31d370fa62962f53a6d554e456
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Tue Apr 7 11:39:14 2015 +0100
* include/bits/stl_algo.h (random_shuffle): Only define for hosted
implementations.
diff --git a/libstdc++-v3/include/bits/stl_algo.h b/libstdc++-v3/include/bits/stl_algo.h
index 53c455b..56cc743 100644
--- a/libstdc++-v3/include/bits/stl_algo.h
+++ b/libstdc++-v3/include/bits/stl_algo.h
@@ -4420,6 +4420,7 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO
std::__iterator_category(__result));
}
+#if _GLIBCXX_HOSTED
/**
* @brief Randomly shuffle the elements of a sequence.
* @ingroup mutating_algorithms
@@ -4450,6 +4451,7 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO
std::iter_swap(__i, __j);
}
}
+#endif
/**
* @brief Shuffle the elements of a sequence using a random number
More information about the Libstdc++
mailing list