Let's provide a version of libstdc++ without exception support. As
that is a space saving choice, we'll tie it to the -Os multilib
variants.

Signed-off-by: Keith Packard <[email protected]>
---
 config-ml.in | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/config-ml.in b/config-ml.in
index 8aefaad3cb9..decb956007f 100644
--- a/config-ml.in
+++ b/config-ml.in
@@ -514,6 +514,8 @@ multi-do:
            else \
              if [ -d ../$${dir}/$${lib} ]; then \
                flags=`echo $$i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \
+               cxxflags='$${flags}'; \
+               case "$$i" in *@Os*) cxxflags="$${flags} -fno-exceptions 
-fno-asynchronous-unwind-tables"; ;; esac ; \
                libsuffix_=`$${compiler} $${flags} --print-multi-os-directory`; 
\
                if (cd ../$${dir}/$${lib}; $(MAKE) $(subst \
                                -B$(build_tooldir)/lib/, \
@@ -529,9 +531,9 @@ multi-do:
                                GOCFLAGS="$(GOCFLAGS) $${flags}" \
                                GDCFLAGS="$(GDCFLAGS) $${flags}" \
                                A68FLAGS="$(A68FLAGS) $${flags}" \
-                               CXXFLAGS="$(CXXFLAGS) $${flags}" \
+                               CXXFLAGS="$(CXXFLAGS) $${cxxflags}" \
                                LIBCFLAGS="$(LIBCFLAGS) $${flags}" \
-                               LIBCXXFLAGS="$(LIBCXXFLAGS) $${flags}" \
+                               LIBCXXFLAGS="$(LIBCXXFLAGS) $${cxxflags}" \
                                LDFLAGS="$(LDFLAGS) $${flags}" \
                                MULTIFLAGS="$${flags}" \
                                DESTDIR="$(DESTDIR)" \
-- 
2.51.0

Reply via email to