Message ID | 20160701162920.19632-12-s.martin49@gmail.com |
---|---|
State | Changes Requested |
Headers | show |
Hello, On Fri, 1 Jul 2016 18:29:16 +0200, Samuel Martin wrote: > +ifeq ($(BR2_TOOLCHAIN_HAS_FORTRAN),y) > +TOOLCHAIN_EXTERNAL_LIBS += libgfortran.so.* > +# fortran needs quadmath on x86 and x86_64 > +ifeq ($(BR2_I386)$(BR2_x86_64),y) > +TOOLCHAIN_EXTERNAL_LIBS += libquadmath.so* > +endif > +endif OK. Then maybe on the internal toolchain backend side, we should keep things simple for libquadmath: 1/ Disable it when we know it's not supported (wchar missing) 2/ Forcefully enable it when Fortran is enabled and we're on i386/x86_64 3/ Copy it only when Fortran is enabled and i386/x86_64 Which is pretty much what you did originally I believe. This way, only the people who care about Fortran support will have libquadmath copied to their target. If in the future some other non-Fortran related package needs libquadmath, we can revisit this at this time. Thomas
On 01-07-16 23:22, Thomas Petazzoni wrote: > Hello, > > On Fri, 1 Jul 2016 18:29:16 +0200, Samuel Martin wrote: > >> +ifeq ($(BR2_TOOLCHAIN_HAS_FORTRAN),y) >> +TOOLCHAIN_EXTERNAL_LIBS += libgfortran.so.* >> +# fortran needs quadmath on x86 and x86_64 >> +ifeq ($(BR2_I386)$(BR2_x86_64),y) >> +TOOLCHAIN_EXTERNAL_LIBS += libquadmath.so* >> +endif >> +endif > > OK. Then maybe on the internal toolchain backend side, we should keep > things simple for libquadmath: > > 1/ Disable it when we know it's not supported (wchar missing) > > 2/ Forcefully enable it when Fortran is enabled and we're on > i386/x86_64 > > 3/ Copy it only when Fortran is enabled and i386/x86_64 > > Which is pretty much what you did originally I believe. > > This way, only the people who care about Fortran support will have > libquadmath copied to their target. If in the future some other > non-Fortran related package needs libquadmath, we can revisit this at > this time. fftw you mean? :-) At this point, it is perhaps better to introduce a blind BR2_TOOLCHAIN_HAS_QUADMATH option (or should it be USE?) that is selected automatically as appropriate. Later we could add a BR2_PACKAGE_GCC_QUADMATH option to enable it explicitly. Regards, Arnout
diff --git a/toolchain/toolchain-external/toolchain-external.mk b/toolchain/toolchain-external/toolchain-external.mk index 53a7c7a..9629c46 100644 --- a/toolchain/toolchain-external/toolchain-external.mk +++ b/toolchain/toolchain-external/toolchain-external.mk @@ -90,6 +90,14 @@ ifeq ($(BR2_INSTALL_LIBSTDCPP),y) TOOLCHAIN_EXTERNAL_LIBS += libstdc++.so.* endif +ifeq ($(BR2_TOOLCHAIN_HAS_FORTRAN),y) +TOOLCHAIN_EXTERNAL_LIBS += libgfortran.so.* +# fortran needs quadmath on x86 and x86_64 +ifeq ($(BR2_I386)$(BR2_x86_64),y) +TOOLCHAIN_EXTERNAL_LIBS += libquadmath.so* +endif +endif + TOOLCHAIN_EXTERNAL_LIBS += $(call qstrip,$(BR2_TOOLCHAIN_EXTRA_EXTERNAL_LIBS)) # Details about sysroot directory selection.