https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46539

--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <ja...@gcc.gnu.org>:

https://gcc.gnu.org/g:745be54bd6634fe63d6be83615e264c83d2ae9f9

commit r13-2094-g745be54bd6634fe63d6be83615e264c83d2ae9f9
Author: Jakub Jelinek <ja...@redhat.com>
Date:   Wed Aug 17 17:00:33 2022 +0200

    fortran: Add -static-libquadmath support [PR46539]

    The following patch is a revival of the
    https://gcc.gnu.org/legacy-ml/gcc-patches/2014-10/msg00771.html
    patch.  While trunk configured against recent glibc and with linker
    --as-needed support doesn't really need to link against -lquadmath
    anymore, there are still other targets where libquadmath is still in
    use.
    As has been discussed, making -static-libgfortran imply statically
    linking both libgfortran and libquadmath is undesirable because of
    the significant licensing differences between the 2 libraries.
    Compared to the 2014 patch, this one doesn't handle -lquadmath
    addition in the driver, which to me looks incorrect, libgfortran
    configure determines where in libgfortran.spec -lquadmath should
    be present if at all and with what it should be wrapped, but
    analyzes gfortran -### -static-libgfortran stderr and based on
    that figures out what gcc/configure.ac determined.

    2022-08-17  Francois-Xavier Coudert  <fxcoud...@gcc.gnu.org>
                Jakub Jelinek  <ja...@redhat.com>

            PR fortran/46539
    gcc/
            * common.opt (static-libquadmath): New option.
            * gcc.cc (driver_handle_option): Always accept -static-libquadmath.
            * config/darwin.h (LINK_SPEC): Handle -static-libquadmath.
    gcc/fortran/
            * lang.opt (static-libquadmath): New option.
            * invoke.texi (-static-libquadmath): Document it.
            * options.cc (gfc_handle_option): Error out if -static-libquadmath
            is passed but we do not support it.
    libgfortran/
            * acinclude.m4 (LIBQUADSPEC): From $FC -static-libgfortran -###
            output determine -Bstatic/-Bdynamic, -bstatic/-bdynamic,
            -aarchive_shared/-adefault linker support or Darwin remapping
            of -lgfortran to libgfortran.a%s and use that around or instead
            of -lquadmath in LIBQUADSPEC.
            * configure: Regenerated.

    Co-Authored-By: Francois-Xavier Coudert <fxcoud...@gcc.gnu.org>

Reply via email to