On Sun, Jan 4, 2026 at 10:45 PM Keith Packard <[email protected]> wrote:
>
> 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.

I am not sure this is the correct thing for this one. Because there
could be some use out there that someone wants to use -Os multilib
without disabling exceptions.
I suspect you want to have a separate multilib for this or maybe a
configure option.
Plus this changes the current --enable-target-optspace configure
option to use -fno-exceptions which I am 99% sure is not a good thing.

Thanks,
Andrew

>
> 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