aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJing Yu <jingyu@google.com>2010-08-12 15:52:15 -0700
committerJing Yu <jingyu@google.com>2010-08-12 15:52:15 -0700
commitde263c26a7680529baca731c003bc58b68d72511 (patch)
tree1a20285b8da7e52cd766f9f4151369539e5f9e32
parentc21b158d6f0910929dcec75327455770268a1d67 (diff)
downloadbuild-de263c26a7680529baca731c003bc58b68d72511.tar.gz
Allow Makefile to pick up environmental CFLAGS_FOR_TARGET, and
CXXFLAGS_FOR_TARGET. So that libstdc++_v3 libraries can be built without modifying the Makefiles. Change-Id: I569febd84a1bf60b15b19030064b4d9996c93bb0 Tested: export CFLAGS_FOR_TARGET=-fexceptions export CXXFLAGS_FOR_TARGET=-frtti Add --enable-libstdc__-v3 to the configuration command, build a C++ supportive toolchain.
-rw-r--r--Makefile.in14
-rw-r--r--README7
2 files changed, 13 insertions, 8 deletions
diff --git a/Makefile.in b/Makefile.in
index 60307f4..2c905de 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -98,11 +98,11 @@ export CC_FOR_TARGET="$(TARGET_GCC_BUILDDIR)/gcc/xgcc \
#
# To build libstdc++ with RTTI and exceptions do:
#
-#CFLAGS_FOR_TARGET= -O2 -Os -g -fexceptions
-#CXXFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET) -frtti
-#
-CFLAGS_FOR_TARGET= -O2 -Os -g
-CXXFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)
+#export CFLAGS_FOR_TARGET=-fexceptions
+#export CXXFLAGS_FOR_TARGET=-frtti
+#
+CFLAGS_FOR_TARGET+= -O2 -Os -g
+CXXFLAGS_FOR_TARGET+=$(CFLAGS_FOR_TARGET)
LDFLAGS_FOR_TARGET=
# Helper
@@ -357,8 +357,8 @@ clean:
.PHONY: distclean
distclean:
@$(RM) -r config.log config.status \
- $(TEMP_INSTALLDIR) temp-src \
- stmp-config-* stmp-build-* stmp-install-* && \
+ $(TEMP_INSTALLDIR) temp-src \
+ stmp-config-* stmp-build-* stmp-install-* && \
for sub in [ * ]; do \
if [ -f $$sub/config.status ]; then \
echo "Deleting " $$sub "..." && $(RM) -r $$sub ; \
diff --git a/README b/README
index 9711518..f349706 100644
--- a/README
+++ b/README
@@ -101,7 +101,12 @@ remove these installed headers.
2.4 Enabling libstdc++-v3
For space saving, we do not provide libstdc++-v3 in the toolchain by default.
-It is possible too build libstdc++-v3. The enable it, add
+It is possible too build libstdc++-v3. To enable it, do
+
+ export CFLAGS_FOR_TARGET=-fexceptions
+ export CXXFLAGS_FOR_TARGET=-frtti
+
+before configuring the toolchain, and add
--enable-libstdc__-v3