Skip to content

Commit 875c603

Browse files
keith-packardnashif
authored andcommitted
When using multilib-space, disable C++ exceptions in -Os versions
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]>
1 parent c36de30 commit 875c603

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

config-ml.in

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -514,6 +514,8 @@ multi-do:
514514
else \
515515
if [ -d ../$${dir}/$${lib} ]; then \
516516
flags=`echo $$i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \
517+
cxxflags='$${flags}'; \
518+
case "$$i" in *@Os*) cxxflags="$${flags} -fno-exceptions -fno-asynchronous-unwind-tables"; ;; esac ; \
517519
if (cd ../$${dir}/$${lib}; $(MAKE) $(FLAGS_TO_PASS) \
518520
CFLAGS="$(CFLAGS) $${flags}" \
519521
CCASFLAGS="$(CCASFLAGS) $${flags}" \
@@ -524,9 +526,9 @@ multi-do:
524526
exec_prefix="$(exec_prefix)" \
525527
GOCFLAGS="$(GOCFLAGS) $${flags}" \
526528
GDCFLAGS="$(GDCFLAGS) $${flags}" \
527-
CXXFLAGS="$(CXXFLAGS) $${flags}" \
529+
CXXFLAGS="$(CXXFLAGS) $${cxxflags}" \
528530
LIBCFLAGS="$(LIBCFLAGS) $${flags}" \
529-
LIBCXXFLAGS="$(LIBCXXFLAGS) $${flags}" \
531+
LIBCXXFLAGS="$(LIBCXXFLAGS) $${cxxflags}" \
530532
LDFLAGS="$(LDFLAGS) $${flags}" \
531533
MULTIFLAGS="$${flags}" \
532534
DESTDIR="$(DESTDIR)" \

0 commit comments

Comments
 (0)