* [Buildroot] [PATCH v2 00/15] Fortran support for all toolchain
@ 2016-07-01 16:29 Samuel Martin
2016-07-01 16:29 ` [Buildroot] [PATCH v2 01/15] package/gcc: fix fortran support Samuel Martin
` (14 more replies)
0 siblings, 15 replies; 37+ messages in thread
From: Samuel Martin @ 2016-07-01 16:29 UTC (permalink / raw)
To: buildroot
Hi all,
This second round of the series integrate the work (and fixes ;-])
from Benjamin, plus few others fixes.
Regards,
Benjamin Kamath (2):
package/Makefile.in: set TARGET_FCFLAGS variables
package/lapack: new package
Samuel Martin (13):
package/gcc: fix fortran support
package/gcc: wrap gfortran
package/Makefile.in: set variables for legacy f77 checks
pkg-cmake.mk: export the fortran compiler path in the CMake toolchain
file
toolchain: add hidden symbol for fortran support in the toolchain
package/gcc: select BR2_TOOLCHAIN_HAS_FORTRAN when appropriated
package/gcc: used BR2_TOOLCHAIN_HAS_FORTRAN instead of
BR2_TOOLCHAIN_BUILDROOT_FORTRAN
toolchain/helpers: add fortran check
toolchain/toolchain-external: enable fortran check when it is selected
toolchain/toolchain-external: add libgfortran and libquadmath to the
TOOLCHAIN_EXTERNAL_LIBS list
toolchain/toolchain-external: add knob for fortran support
toolchain/toolchain-external: update external toolchain configuration
with BR2_TOOLCHAIN_HAS_FORTRAN
package/fftw: add fortran support
package/Config.in | 1 +
package/Makefile.in | 11 ++++++++++
package/fftw/fftw.mk | 3 ++-
package/gcc/Config.in.host | 5 +++++
package/gcc/gcc-final/gcc-final.mk | 8 +++++--
package/gcc/gcc.mk | 9 +++++++-
package/lapack/0001-case-sensitive-paths.patch | 22 +++++++++++++++++++
package/lapack/Config.in | 17 +++++++++++++++
package/lapack/lapack.hash | 2 ++
package/lapack/lapack.mk | 25 ++++++++++++++++++++++
package/pkg-cmake.mk | 3 +++
support/misc/toolchainfile.cmake.in | 4 ++++
toolchain/helpers.mk | 15 +++++++++++++
toolchain/toolchain-common.in | 3 +++
toolchain/toolchain-external/Config.in | 17 +++++++++++++++
toolchain/toolchain-external/toolchain-external.mk | 13 +++++++++++
16 files changed, 154 insertions(+), 4 deletions(-)
create mode 100644 package/lapack/0001-case-sensitive-paths.patch
create mode 100644 package/lapack/Config.in
create mode 100644 package/lapack/lapack.hash
create mode 100644 package/lapack/lapack.mk
--
2.9.0
^ permalink raw reply [flat|nested] 37+ messages in thread
* [Buildroot] [PATCH v2 01/15] package/gcc: fix fortran support
2016-07-01 16:29 [Buildroot] [PATCH v2 00/15] Fortran support for all toolchain Samuel Martin
@ 2016-07-01 16:29 ` Samuel Martin
2016-07-01 18:19 ` Thomas Petazzoni
2016-07-01 16:29 ` [Buildroot] [PATCH v2 02/15] package/gcc: wrap gfortran Samuel Martin
` (13 subsequent siblings)
14 siblings, 1 reply; 37+ messages in thread
From: Samuel Martin @ 2016-07-01 16:29 UTC (permalink / raw)
To: buildroot
Fortran depends on libquadmath, which requires a toolchain with wchar
support.
So:
- make sure libquadmath is enable and installed when fortran is enabled;
- propagate the wchar dependency (from libquadmath) to fortran, and add
a comment when fortran is not available.
[Vincent: only do "HOST_GCC_FINAL_USR_LIBS += libquadmath" for i386 and
x86_64, otherwise it will fail saying "libquadmath.a: file not found"]
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
---
changes v1->v2:
- none
---
package/gcc/Config.in.host | 4 ++++
package/gcc/gcc-final/gcc-final.mk | 4 ++++
package/gcc/gcc.mk | 5 +++++
3 files changed, 13 insertions(+)
diff --git a/package/gcc/Config.in.host b/package/gcc/Config.in.host
index 44a72f1..673b444 100644
--- a/package/gcc/Config.in.host
+++ b/package/gcc/Config.in.host
@@ -120,11 +120,15 @@ config BR2_TOOLCHAIN_BUILDROOT_CXX
config BR2_TOOLCHAIN_BUILDROOT_FORTRAN
bool "Enable Fortran support"
+ depends on BR2_USE_WCHAR # libquadmath
help
Enable this option if you want your toolchain to support the
Fortran language and you want Fortran libraries to be
installed on your target system.
+comment "Fortran support needs a toolchain w/ wchar"
+ depends on !BR2_USE_WCHAR
+
config BR2_GCC_ENABLE_TLS
bool "Enable compiler tls support" if BR2_TOOLCHAIN_BUILDROOT_UCLIBC
default y
diff --git a/package/gcc/gcc-final/gcc-final.mk b/package/gcc/gcc-final/gcc-final.mk
index 78ceeba..f13bc36 100644
--- a/package/gcc/gcc-final/gcc-final.mk
+++ b/package/gcc/gcc-final/gcc-final.mk
@@ -163,6 +163,10 @@ endif
ifeq ($(BR2_TOOLCHAIN_BUILDROOT_FORTRAN),y)
HOST_GCC_FINAL_USR_LIBS += libgfortran
+# fortran needs quadmath on x86 and x86_64
+ifeq ($(BR2_I386)$(BR2_x86_64),y)
+HOST_GCC_FINAL_USR_LIBS += libquadmath
+endif
endif
ifeq ($(BR2_GCC_ENABLE_OPENMP),y)
diff --git a/package/gcc/gcc.mk b/package/gcc/gcc.mk
index 6e1c02d..e981940 100644
--- a/package/gcc/gcc.mk
+++ b/package/gcc/gcc.mk
@@ -109,6 +109,11 @@ endif
# quadmath support requires wchar
ifeq ($(BR2_USE_WCHAR),)
HOST_GCC_COMMON_CONF_OPTS += --disable-libquadmath
+else
+# fortran needs quadmath on x86 and x86_64
+ifeq ($(BR2_TOOLCHAIN_BUILDROOT_FORTRAN)$(BR2_I386)$(BR2_x86_64),yy)
+HOST_GCC_COMMON_CONF_OPTS += --enable-libquadmath
+endif
endif
# libsanitizer requires wordexp, not in default uClibc config. Also
--
2.9.0
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [Buildroot] [PATCH v2 02/15] package/gcc: wrap gfortran
2016-07-01 16:29 [Buildroot] [PATCH v2 00/15] Fortran support for all toolchain Samuel Martin
2016-07-01 16:29 ` [Buildroot] [PATCH v2 01/15] package/gcc: fix fortran support Samuel Martin
@ 2016-07-01 16:29 ` Samuel Martin
2016-07-01 20:55 ` Thomas Petazzoni
2016-07-01 16:29 ` [Buildroot] [PATCH v2 03/15] package/Makefile.in: set TARGET_FCFLAGS variables Samuel Martin
` (12 subsequent siblings)
14 siblings, 1 reply; 37+ messages in thread
From: Samuel Martin @ 2016-07-01 16:29 UTC (permalink / raw)
To: buildroot
gfortran supports all options supported by gcc, so it can and should be called
via the toolchain wrapper.
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
---
changes v1->v2:
- none
---
package/gcc/gcc.mk | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/package/gcc/gcc.mk b/package/gcc/gcc.mk
index e981940..ff92bbc 100644
--- a/package/gcc/gcc.mk
+++ b/package/gcc/gcc.mk
@@ -270,6 +270,8 @@ endif # BR2_CCACHE
# used. However, we should not add the toolchain wrapper for them, and they
# match the *cc-* pattern. Therefore, an additional case is added for *-ar,
# *-ranlib and *-nm.
+# According to gfortran manpage, it supports all options supported by gcc, so
+# add gfortran to the list of the program called via the Buildroot wrapper.
# Avoid that a .br_real is symlinked a second time.
# Also create <arch>-linux-<tool> symlinks.
define HOST_GCC_INSTALL_WRAPPER_AND_SIMPLE_SYMLINKS
@@ -281,7 +283,7 @@ define HOST_GCC_INSTALL_WRAPPER_AND_SIMPLE_SYMLINKS
*-ar|*-ranlib|*-nm) \
ln -snf $$i $(ARCH)-linux$${i##$(GNU_TARGET_NAME)}; \
;; \
- *cc|*cc-*|*++|*++-*|*cpp) \
+ *cc|*cc-*|*++|*++-*|*cpp|*-gfortran) \
rm -f $$i.br_real; \
mv $$i $$i.br_real; \
ln -sf toolchain-wrapper $$i; \
--
2.9.0
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [Buildroot] [PATCH v2 03/15] package/Makefile.in: set TARGET_FCFLAGS variables
2016-07-01 16:29 [Buildroot] [PATCH v2 00/15] Fortran support for all toolchain Samuel Martin
2016-07-01 16:29 ` [Buildroot] [PATCH v2 01/15] package/gcc: fix fortran support Samuel Martin
2016-07-01 16:29 ` [Buildroot] [PATCH v2 02/15] package/gcc: wrap gfortran Samuel Martin
@ 2016-07-01 16:29 ` Samuel Martin
2016-07-01 20:59 ` Thomas Petazzoni
2016-07-01 16:29 ` [Buildroot] [PATCH v2 04/15] package/Makefile.in: set variables for legacy f77 checks Samuel Martin
` (11 subsequent siblings)
14 siblings, 1 reply; 37+ messages in thread
From: Samuel Martin @ 2016-07-01 16:29 UTC (permalink / raw)
To: buildroot
From: Benjamin Kamath <bkamath@spaceflight.com>
TARGET_FCFLAGS is already added to TARGET_CONFIGURE_OPTS, but was not
defined so for.
This change fixes this.
Cc: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Signed-off-by: Benjamin Kamath <bkamath@spaceflight.com>
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
changes v1->v2:
- integrate these FCFLAGS changes in this series
---
package/Makefile.in | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/package/Makefile.in b/package/Makefile.in
index f6d1e67..471f687 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -141,6 +141,7 @@ endif
TARGET_CPPFLAGS += -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
TARGET_CFLAGS = $(TARGET_CPPFLAGS) $(TARGET_ABI) $(TARGET_OPTIMIZATION) $(TARGET_DEBUGGING)
TARGET_CXXFLAGS = $(TARGET_CFLAGS)
+TARGET_FCFLAGS = $(TARGET_ABI) $(TARGET_OPTIMIZATION) $(TARGET_DEBUGGING)
TARGET_LDFLAGS = $(call qstrip,$(BR2_TARGET_LDFLAGS))
ifeq ($(BR2_BINFMT_FLAT),y)
@@ -148,29 +149,36 @@ TARGET_CFLAGS += $(if $($(PKG)_FLAT_STACKSIZE),-Wl$(comma)-elf2flt=-s$($(PKG)_FL
-Wl$(comma)-elf2flt)
TARGET_CXXFLAGS += $(if $($(PKG)_FLAT_STACKSIZE),-Wl$(comma)-elf2flt=-s$($(PKG)_FLAT_STACKSIZE),\
-Wl$(comma)-elf2flt)
+TARGET_FCFLAGS += $(if $($(PKG)_FLAT_STACKSIZE),-Wl$(comma)-elf2flt=-s$($(PKG)_FLAT_STACKSIZE),\
+ -Wl$(comma)-elf2flt)
TARGET_LDFLAGS += $(if $($(PKG)_FLAT_STACKSIZE),-Wl$(comma)-elf2flt=-s$($(PKG)_FLAT_STACKSIZE),-Wl$(comma)-elf2flt)
endif
ifeq ($(BR2_BINFMT_FLAT_SHARED),y)
TARGET_LDFLAGS += -mid-shared-library -mshared-library-id=0
TARGET_CFLAGS += -mid-shared-library -mshared-library-id=0
+TARGET_FCFLAGS += -mid-shared-library -mshared-library-id=0
TARGET_CXXFLAGS += -mid-shared-library -mshared-library-id=0
endif
ifeq ($(BR2_BINFMT_FLAT_SEP_DATA),y)
TARGET_LDFLAGS += -msep-data
TARGET_CFLAGS += -msep-data
+TARGET_FCFLAGS += -msep-data
TARGET_CXXFLAGS += -msep-data
endif
ifeq ($(BR2_SSP_REGULAR),y)
TARGET_CFLAGS += -fstack-protector
TARGET_CXXFLAGS += -fstack-protector
+TARGET_FCFLAGS += -fstack-protector
else ifeq ($(BR2_SSP_STRONG),y)
TARGET_CFLAGS += -fstack-protector-strong
TARGET_CXXFLAGS += -fstack-protector-strong
+TARGET_FCFLAGS += -fstack-protector-strong
else ifeq ($(BR2_SSP_ALL),y)
TARGET_CFLAGS += -fstack-protector-all
TARGET_CXXFLAGS += -fstack-protector-all
+TARGET_FCFLAGS += -fstack-protector-all
endif
ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y)
@@ -373,6 +381,7 @@ ifeq ($(BR2_STATIC_LIBS),y)
SHARED_STATIC_LIBS_OPTS = --enable-static --disable-shared
TARGET_CFLAGS += -static
TARGET_CXXFLAGS += -static
+TARGET_FCFLAGS += -static
TARGET_LDFLAGS += -static
else ifeq ($(BR2_SHARED_LIBS),y)
SHARED_STATIC_LIBS_OPTS = --disable-static --enable-shared
--
2.9.0
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [Buildroot] [PATCH v2 04/15] package/Makefile.in: set variables for legacy f77 checks
2016-07-01 16:29 [Buildroot] [PATCH v2 00/15] Fortran support for all toolchain Samuel Martin
` (2 preceding siblings ...)
2016-07-01 16:29 ` [Buildroot] [PATCH v2 03/15] package/Makefile.in: set TARGET_FCFLAGS variables Samuel Martin
@ 2016-07-01 16:29 ` Samuel Martin
2016-07-01 21:01 ` Thomas Petazzoni
2016-07-01 16:29 ` [Buildroot] [PATCH v2 05/15] pkg-cmake.mk: export the fortran compiler path in the CMake toolchain file Samuel Martin
` (10 subsequent siblings)
14 siblings, 1 reply; 37+ messages in thread
From: Samuel Martin @ 2016-07-01 16:29 UTC (permalink / raw)
To: buildroot
For fortran detection, some projects check for fortran availability
using the FC/FCFLAGS variables, and others for the legacy F77/FFLAGS
ones.
So, make sure the legacy fortran F77 and FFLAGS variables are set in
TARGET_CONFIGURE_OPTS.
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
changes v1->v2:
- new patch
---
package/Makefile.in | 2 ++
1 file changed, 2 insertions(+)
diff --git a/package/Makefile.in b/package/Makefile.in
index 471f687..afd5d3a 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -250,6 +250,7 @@ TARGET_CONFIGURE_OPTS = \
CPP="$(TARGET_CPP)" \
CXX="$(TARGET_CXX)" \
FC="$(TARGET_FC)" \
+ F77="$(TARGET_FC)" \
RANLIB="$(TARGET_RANLIB)" \
READELF="$(TARGET_READELF)" \
STRIP="$(TARGET_STRIP)" \
@@ -273,6 +274,7 @@ TARGET_CONFIGURE_OPTS = \
CXXFLAGS="$(TARGET_CXXFLAGS)" \
LDFLAGS="$(TARGET_LDFLAGS)" \
FCFLAGS="$(TARGET_FCFLAGS)" \
+ FFLAGS="$(TARGET_FCFLAGS)" \
PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" \
STAGING_DIR="$(STAGING_DIR)" \
INTLTOOL_PERL=$(PERL)
--
2.9.0
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [Buildroot] [PATCH v2 05/15] pkg-cmake.mk: export the fortran compiler path in the CMake toolchain file
2016-07-01 16:29 [Buildroot] [PATCH v2 00/15] Fortran support for all toolchain Samuel Martin
` (3 preceding siblings ...)
2016-07-01 16:29 ` [Buildroot] [PATCH v2 04/15] package/Makefile.in: set variables for legacy f77 checks Samuel Martin
@ 2016-07-01 16:29 ` Samuel Martin
2016-07-01 21:02 ` Thomas Petazzoni
2016-07-01 16:29 ` [Buildroot] [PATCH v2 06/15] toolchain: add hidden symbol for fortran support in the toolchain Samuel Martin
` (9 subsequent siblings)
14 siblings, 1 reply; 37+ messages in thread
From: Samuel Martin @ 2016-07-01 16:29 UTC (permalink / raw)
To: buildroot
Since the fortran support is conditional, only enable it when needed.
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Cc: Benjamin Kamath <bkamath@spaceflight.com>
---
changes v1->v2:
- set CMAKE_Fortran_FLAGS in the toolchainfile.cmake (Benjamin K.)
---
package/pkg-cmake.mk | 3 +++
support/misc/toolchainfile.cmake.in | 4 ++++
2 files changed, 7 insertions(+)
diff --git a/package/pkg-cmake.mk b/package/pkg-cmake.mk
index 81dcfcc..1fe2e51 100644
--- a/package/pkg-cmake.mk
+++ b/package/pkg-cmake.mk
@@ -243,9 +243,12 @@ $(HOST_DIR)/usr/share/buildroot/toolchainfile.cmake:
-e 's#@@STAGING_SUBDIR@@#$(call qstrip,$(STAGING_SUBDIR))#' \
-e 's#@@TARGET_CFLAGS@@#$(call qstrip,$(TARGET_CFLAGS))#' \
-e 's#@@TARGET_CXXFLAGS@@#$(call qstrip,$(TARGET_CXXFLAGS))#' \
+ -e 's#@@TARGET_FCFLAGS@@#$(call qstrip,$(TARGET_FCFLAGS))#' \
-e 's#@@TARGET_LDFLAGS@@#$(call qstrip,$(TARGET_LDFLAGS))#' \
-e 's#@@TARGET_CC@@#$(subst $(HOST_DIR)/,,$(call qstrip,$(TARGET_CC)))#' \
-e 's#@@TARGET_CXX@@#$(subst $(HOST_DIR)/,,$(call qstrip,$(TARGET_CXX)))#' \
+ -e 's#@@TARGET_FC@@#$(subst $(HOST_DIR)/,,$(call qstrip,$(TARGET_FC)))#' \
-e 's#@@CMAKE_SYSTEM_PROCESSOR@@#$(call qstrip,$(CMAKE_SYSTEM_PROCESSOR))#' \
+ -e 's#@@TOOLCHAIN_HAS_FORTRAN@@#$(if $(BR2_TOOLCHAIN_HAS_FORTRAN),1,0)#' \
$(TOPDIR)/support/misc/toolchainfile.cmake.in \
> $@
diff --git a/support/misc/toolchainfile.cmake.in b/support/misc/toolchainfile.cmake.in
index 5cf381e..e550b8f 100644
--- a/support/misc/toolchainfile.cmake.in
+++ b/support/misc/toolchainfile.cmake.in
@@ -29,3 +29,7 @@ set(ENV{PKG_CONFIG_SYSROOT_DIR} "${RELOCATED_HOST_DIR}/@@STAGING_SUBDIR@@")
# This toolchain file can be used both inside and outside Buildroot.
set(CMAKE_C_COMPILER "${RELOCATED_HOST_DIR}/@@TARGET_CC@@")
set(CMAKE_CXX_COMPILER "${RELOCATED_HOST_DIR}/@@TARGET_CXX@@")
+if(@@TOOLCHAIN_HAS_FORTRAN@@)
+ set(CMAKE_Fortran_FLAGS "@@TARGET_FCFLAGS@@ ${CMAKE_Fortran_FLAGS}" CACHE STRING "Buildroot FCFLAGS")
+ set(CMAKE_Fortran_COMPILER "${RELOCATED_HOST_DIR}/@@TARGET_FC@@")
+endif()
--
2.9.0
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [Buildroot] [PATCH v2 06/15] toolchain: add hidden symbol for fortran support in the toolchain
2016-07-01 16:29 [Buildroot] [PATCH v2 00/15] Fortran support for all toolchain Samuel Martin
` (4 preceding siblings ...)
2016-07-01 16:29 ` [Buildroot] [PATCH v2 05/15] pkg-cmake.mk: export the fortran compiler path in the CMake toolchain file Samuel Martin
@ 2016-07-01 16:29 ` Samuel Martin
2016-07-01 21:03 ` Thomas Petazzoni
2016-07-01 16:29 ` [Buildroot] [PATCH v2 07/15] package/gcc: select BR2_TOOLCHAIN_HAS_FORTRAN when appropriated Samuel Martin
` (8 subsequent siblings)
14 siblings, 1 reply; 37+ messages in thread
From: Samuel Martin @ 2016-07-01 16:29 UTC (permalink / raw)
To: buildroot
This symbol should be used in all packages requiring/testing for fortran
support.
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
---
changes v1->v2:
- none
---
toolchain/toolchain-common.in | 3 +++
1 file changed, 3 insertions(+)
diff --git a/toolchain/toolchain-common.in b/toolchain/toolchain-common.in
index 847c905..e8d47fb 100644
--- a/toolchain/toolchain-common.in
+++ b/toolchain/toolchain-common.in
@@ -21,6 +21,9 @@ config BR2_ENABLE_LOCALE
config BR2_INSTALL_LIBSTDCPP
bool
+config BR2_TOOLCHAIN_HAS_FORTRAN
+ bool
+
config BR2_TOOLCHAIN_HAS_THREADS
bool
--
2.9.0
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [Buildroot] [PATCH v2 07/15] package/gcc: select BR2_TOOLCHAIN_HAS_FORTRAN when appropriated
2016-07-01 16:29 [Buildroot] [PATCH v2 00/15] Fortran support for all toolchain Samuel Martin
` (5 preceding siblings ...)
2016-07-01 16:29 ` [Buildroot] [PATCH v2 06/15] toolchain: add hidden symbol for fortran support in the toolchain Samuel Martin
@ 2016-07-01 16:29 ` Samuel Martin
2016-07-01 21:03 ` Thomas Petazzoni
2016-07-01 21:03 ` Thomas Petazzoni
2016-07-01 16:29 ` [Buildroot] [PATCH v2 08/15] package/gcc: used BR2_TOOLCHAIN_HAS_FORTRAN instead of BR2_TOOLCHAIN_BUILDROOT_FORTRAN Samuel Martin
` (7 subsequent siblings)
14 siblings, 2 replies; 37+ messages in thread
From: Samuel Martin @ 2016-07-01 16:29 UTC (permalink / raw)
To: buildroot
This is only for the Buildroot toolchain backend.
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
---
changes v1->v2:
- none
---
package/gcc/Config.in.host | 1 +
1 file changed, 1 insertion(+)
diff --git a/package/gcc/Config.in.host b/package/gcc/Config.in.host
index 673b444..f19b5e3 100644
--- a/package/gcc/Config.in.host
+++ b/package/gcc/Config.in.host
@@ -121,6 +121,7 @@ config BR2_TOOLCHAIN_BUILDROOT_CXX
config BR2_TOOLCHAIN_BUILDROOT_FORTRAN
bool "Enable Fortran support"
depends on BR2_USE_WCHAR # libquadmath
+ select BR2_TOOLCHAIN_HAS_FORTRAN
help
Enable this option if you want your toolchain to support the
Fortran language and you want Fortran libraries to be
--
2.9.0
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [Buildroot] [PATCH v2 08/15] package/gcc: used BR2_TOOLCHAIN_HAS_FORTRAN instead of BR2_TOOLCHAIN_BUILDROOT_FORTRAN
2016-07-01 16:29 [Buildroot] [PATCH v2 00/15] Fortran support for all toolchain Samuel Martin
` (6 preceding siblings ...)
2016-07-01 16:29 ` [Buildroot] [PATCH v2 07/15] package/gcc: select BR2_TOOLCHAIN_HAS_FORTRAN when appropriated Samuel Martin
@ 2016-07-01 16:29 ` Samuel Martin
2016-07-01 21:06 ` Thomas Petazzoni
2016-07-01 16:29 ` [Buildroot] [PATCH v2 09/15] toolchain/helpers: add fortran check Samuel Martin
` (6 subsequent siblings)
14 siblings, 1 reply; 37+ messages in thread
From: Samuel Martin @ 2016-07-01 16:29 UTC (permalink / raw)
To: buildroot
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
---
changes v1->v2:
- none
---
package/gcc/gcc-final/gcc-final.mk | 4 ++--
package/gcc/gcc.mk | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/package/gcc/gcc-final/gcc-final.mk b/package/gcc/gcc-final/gcc-final.mk
index f13bc36..4eb3639 100644
--- a/package/gcc/gcc-final/gcc-final.mk
+++ b/package/gcc/gcc-final/gcc-final.mk
@@ -54,7 +54,7 @@ endef
# Languages supported by the cross-compiler
GCC_FINAL_CROSS_LANGUAGES-y = c
GCC_FINAL_CROSS_LANGUAGES-$(BR2_INSTALL_LIBSTDCPP) += c++
-GCC_FINAL_CROSS_LANGUAGES-$(BR2_TOOLCHAIN_BUILDROOT_FORTRAN) += fortran
+GCC_FINAL_CROSS_LANGUAGES-$(BR2_TOOLCHAIN_HAS_FORTRAN) += fortran
GCC_FINAL_CROSS_LANGUAGES = $(subst $(space),$(comma),$(GCC_FINAL_CROSS_LANGUAGES-y))
HOST_GCC_FINAL_CONF_OPTS = \
@@ -161,7 +161,7 @@ ifeq ($(BR2_INSTALL_LIBSTDCPP),y)
HOST_GCC_FINAL_USR_LIBS += libstdc++
endif
-ifeq ($(BR2_TOOLCHAIN_BUILDROOT_FORTRAN),y)
+ifeq ($(BR2_TOOLCHAIN_HAS_FORTRAN),y)
HOST_GCC_FINAL_USR_LIBS += libgfortran
# fortran needs quadmath on x86 and x86_64
ifeq ($(BR2_I386)$(BR2_x86_64),y)
diff --git a/package/gcc/gcc.mk b/package/gcc/gcc.mk
index ff92bbc..9a8efad 100644
--- a/package/gcc/gcc.mk
+++ b/package/gcc/gcc.mk
@@ -111,7 +111,7 @@ ifeq ($(BR2_USE_WCHAR),)
HOST_GCC_COMMON_CONF_OPTS += --disable-libquadmath
else
# fortran needs quadmath on x86 and x86_64
-ifeq ($(BR2_TOOLCHAIN_BUILDROOT_FORTRAN)$(BR2_I386)$(BR2_x86_64),yy)
+ifeq ($(BR2_TOOLCHAIN_HAS_FORTRAN)$(BR2_I386)$(BR2_x86_64),yy)
HOST_GCC_COMMON_CONF_OPTS += --enable-libquadmath
endif
endif
--
2.9.0
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [Buildroot] [PATCH v2 09/15] toolchain/helpers: add fortran check
2016-07-01 16:29 [Buildroot] [PATCH v2 00/15] Fortran support for all toolchain Samuel Martin
` (7 preceding siblings ...)
2016-07-01 16:29 ` [Buildroot] [PATCH v2 08/15] package/gcc: used BR2_TOOLCHAIN_HAS_FORTRAN instead of BR2_TOOLCHAIN_BUILDROOT_FORTRAN Samuel Martin
@ 2016-07-01 16:29 ` Samuel Martin
2016-07-01 21:19 ` Thomas Petazzoni
2016-07-01 16:29 ` [Buildroot] [PATCH v2 10/15] toolchain/toolchain-external: enable fortran check when it is selected Samuel Martin
` (5 subsequent siblings)
14 siblings, 1 reply; 37+ messages in thread
From: Samuel Martin @ 2016-07-01 16:29 UTC (permalink / raw)
To: buildroot
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
---
changes v1->v2:
- none
---
toolchain/helpers.mk | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/toolchain/helpers.mk b/toolchain/helpers.mk
index 108fdaa..3288c90 100644
--- a/toolchain/helpers.mk
+++ b/toolchain/helpers.mk
@@ -311,6 +311,21 @@ check_cplusplus = \
fi
#
+#
+# Check that the external toolchain supports Fortran
+#
+# $1: cross-gfortran path
+#
+check_fortran = \
+ __CROSS_FC=$(strip $1) ; \
+ printf 'program hello\n\tprint *, "Hello Fortran!\\n"\nend program hello\n' | \
+ $${__CROSS_FC} -x f95 -o /dev/null - ; \
+ if test $$? -ne 0 ; then \
+ echo "Fortran support is selected but is not available in external toolchain" ; \
+ exit 1 ; \
+ fi
+
+#
# Check that the cross-compiler given in the configuration exists
#
# $1: cross-gcc path
--
2.9.0
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [Buildroot] [PATCH v2 10/15] toolchain/toolchain-external: enable fortran check when it is selected
2016-07-01 16:29 [Buildroot] [PATCH v2 00/15] Fortran support for all toolchain Samuel Martin
` (8 preceding siblings ...)
2016-07-01 16:29 ` [Buildroot] [PATCH v2 09/15] toolchain/helpers: add fortran check Samuel Martin
@ 2016-07-01 16:29 ` Samuel Martin
2016-07-01 21:20 ` Thomas Petazzoni
2016-07-01 16:29 ` [Buildroot] [PATCH v2 11/15] toolchain/toolchain-external: add libgfortran and libquadmath to the TOOLCHAIN_EXTERNAL_LIBS list Samuel Martin
` (4 subsequent siblings)
14 siblings, 1 reply; 37+ messages in thread
From: Samuel Martin @ 2016-07-01 16:29 UTC (permalink / raw)
To: buildroot
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
---
changes v1->v2:
- none
---
toolchain/toolchain-external/toolchain-external.mk | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/toolchain/toolchain-external/toolchain-external.mk b/toolchain/toolchain-external/toolchain-external.mk
index 7f46234..53a7c7a 100644
--- a/toolchain/toolchain-external/toolchain-external.mk
+++ b/toolchain/toolchain-external/toolchain-external.mk
@@ -160,6 +160,7 @@ TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += \
TOOLCHAIN_EXTERNAL_CROSS = $(TOOLCHAIN_EXTERNAL_BIN)/$(TOOLCHAIN_EXTERNAL_PREFIX)-
TOOLCHAIN_EXTERNAL_CC = $(TOOLCHAIN_EXTERNAL_CROSS)gcc$(TOOLCHAIN_EXTERNAL_SUFFIX)
TOOLCHAIN_EXTERNAL_CXX = $(TOOLCHAIN_EXTERNAL_CROSS)g++$(TOOLCHAIN_EXTERNAL_SUFFIX)
+TOOLCHAIN_EXTERNAL_FC = $(TOOLCHAIN_EXTERNAL_CROSS)gfortran$(TOOLCHAIN_EXTERNAL_SUFFIX)
TOOLCHAIN_EXTERNAL_READELF = $(TOOLCHAIN_EXTERNAL_CROSS)readelf$(TOOLCHAIN_EXTERNAL_SUFFIX)
ifeq ($(filter $(HOST_DIR)/%,$(TOOLCHAIN_EXTERNAL_BIN)),)
@@ -529,6 +530,10 @@ define TOOLCHAIN_EXTERNAL_CONFIGURE_CMDS
if test "$(BR2_INSTALL_LIBSTDCPP)" = "y" ; then \
$(call check_cplusplus,$(TOOLCHAIN_EXTERNAL_CXX)) ; \
fi ; \
+ if test "$(BR2_TOOLCHAIN_HAS_FORTRAN)" = "y" ; then \
+ $(call check_fortran,\
+ "$(TOOLCHAIN_EXTERNAL_FC) $(TOOLCHAIN_EXTERNAL_CFLAGS)") ; \
+ fi ; \
if test "$(BR2_TOOLCHAIN_EXTERNAL_UCLIBC)" = "y" ; then \
$(call check_uclibc,$${SYSROOT_DIR}) ; \
elif test "$(BR2_TOOLCHAIN_EXTERNAL_MUSL)" = "y" ; then \
--
2.9.0
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [Buildroot] [PATCH v2 11/15] toolchain/toolchain-external: add libgfortran and libquadmath to the TOOLCHAIN_EXTERNAL_LIBS list
2016-07-01 16:29 [Buildroot] [PATCH v2 00/15] Fortran support for all toolchain Samuel Martin
` (9 preceding siblings ...)
2016-07-01 16:29 ` [Buildroot] [PATCH v2 10/15] toolchain/toolchain-external: enable fortran check when it is selected Samuel Martin
@ 2016-07-01 16:29 ` Samuel Martin
2016-07-01 21:22 ` Thomas Petazzoni
2016-07-01 16:29 ` [Buildroot] [PATCH v2 12/15] toolchain/toolchain-external: add knob for fortran support Samuel Martin
` (3 subsequent siblings)
14 siblings, 1 reply; 37+ messages in thread
From: Samuel Martin @ 2016-07-01 16:29 UTC (permalink / raw)
To: buildroot
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
---
changes v1->v2:
- s/USR_LIB_EXTERNAL_LIBS/TOOLCHAIN_EXTERNAL_LIBS/
- only install libquadmath for x86{,_64} target (not built on other
arch.)
---
toolchain/toolchain-external/toolchain-external.mk | 8 ++++++++
1 file changed, 8 insertions(+)
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.
--
2.9.0
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [Buildroot] [PATCH v2 12/15] toolchain/toolchain-external: add knob for fortran support
2016-07-01 16:29 [Buildroot] [PATCH v2 00/15] Fortran support for all toolchain Samuel Martin
` (10 preceding siblings ...)
2016-07-01 16:29 ` [Buildroot] [PATCH v2 11/15] toolchain/toolchain-external: add libgfortran and libquadmath to the TOOLCHAIN_EXTERNAL_LIBS list Samuel Martin
@ 2016-07-01 16:29 ` Samuel Martin
2016-07-01 21:23 ` Thomas Petazzoni
2016-07-01 16:29 ` [Buildroot] [PATCH v2 13/15] toolchain/toolchain-external: update external toolchain configuration with BR2_TOOLCHAIN_HAS_FORTRAN Samuel Martin
` (2 subsequent siblings)
14 siblings, 1 reply; 37+ messages in thread
From: Samuel Martin @ 2016-07-01 16:29 UTC (permalink / raw)
To: buildroot
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
---
changes v1->v2:
- none
---
toolchain/toolchain-external/Config.in | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/toolchain/toolchain-external/Config.in b/toolchain/toolchain-external/Config.in
index 552536e..253aeb1 100644
--- a/toolchain/toolchain-external/Config.in
+++ b/toolchain/toolchain-external/Config.in
@@ -1020,6 +1020,18 @@ config BR2_TOOLCHAIN_EXTERNAL_CXX
support. If you don't know, leave the default value,
Buildroot will tell you if it's correct or not.
+config BR2_TOOLCHAIN_EXTERNAL_FORTRAN
+ bool "Toolchain has Fortran support?"
+ depends on BR2_USE_WCHAR # libquadmath
+ select BR2_TOOLCHAIN_HAS_FORTRAN
+ help
+ Select this option if your external toolchain has fortran
+ support. If you don't know, leave the default value,
+ Buildroot will tell you if it's correct or not.
+
+comment "Fortran support needs a toolchain w/ wchar"
+ depends on !BR2_USE_WCHAR
+
config BR2_TOOLCHAIN_EXTRA_EXTERNAL_LIBS
string "Extra toolchain libraries to be copied to target"
help
--
2.9.0
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [Buildroot] [PATCH v2 13/15] toolchain/toolchain-external: update external toolchain configuration with BR2_TOOLCHAIN_HAS_FORTRAN
2016-07-01 16:29 [Buildroot] [PATCH v2 00/15] Fortran support for all toolchain Samuel Martin
` (11 preceding siblings ...)
2016-07-01 16:29 ` [Buildroot] [PATCH v2 12/15] toolchain/toolchain-external: add knob for fortran support Samuel Martin
@ 2016-07-01 16:29 ` Samuel Martin
2016-07-01 16:29 ` [Buildroot] [PATCH v2 14/15] package/fftw: add fortran support Samuel Martin
2016-07-01 16:29 ` [Buildroot] [PATCH v2 15/15] package/lapack: new package Samuel Martin
14 siblings, 0 replies; 37+ messages in thread
From: Samuel Martin @ 2016-07-01 16:29 UTC (permalink / raw)
To: buildroot
[Vincent: BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX also has fortran]
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
---
changes v1->v2:
- update linaro 2016.02 arm selection
---
toolchain/toolchain-external/Config.in | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/toolchain/toolchain-external/Config.in b/toolchain/toolchain-external/Config.in
index 253aeb1..f687240 100644
--- a/toolchain/toolchain-external/Config.in
+++ b/toolchain/toolchain-external/Config.in
@@ -27,6 +27,7 @@ config BR2_TOOLCHAIN_EXTERNAL_LINARO_ARM
select BR2_INSTALL_LIBSTDCPP
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
+ select BR2_TOOLCHAIN_HAS_FORTRAN
help
Linaro toolchain for the ARM architecture. It uses Linaro
GCC 2014.09 (based on gcc 4.9), Linaro GDB 2013.10 (based on
@@ -50,6 +51,7 @@ config BR2_TOOLCHAIN_EXTERNAL_LINARO_ARM
select BR2_INSTALL_LIBSTDCPP
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
select BR2_TOOLCHAIN_GCC_AT_LEAST_5
+ select BR2_TOOLCHAIN_HAS_FORTRAN
help
Linaro toolchain for the ARM architecture. It uses Linaro
GCC 2016.02 (based on gcc 5.3), Linaro GDB 2016.02 (based on
@@ -73,6 +75,7 @@ config BR2_TOOLCHAIN_EXTERNAL_LINARO_ARMEB
select BR2_INSTALL_LIBSTDCPP
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
+ select BR2_TOOLCHAIN_HAS_FORTRAN
help
Linaro toolchain for the ARM big endian architecture. It
uses Linaro GCC 2014.09 (based on gcc 4.9), Linaro GDB
@@ -522,6 +525,7 @@ config BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX
select BR2_HOSTARCH_NEEDS_IA32_LIBS
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
select BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
+ select BR2_TOOLCHAIN_HAS_FORTRAN
help
Toolchain for the Blackfin architecture, from
http://blackfin.uclinux.org.
@@ -538,6 +542,7 @@ config BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64
select BR2_TOOLCHAIN_HAS_NATIVE_RPC
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
+ select BR2_TOOLCHAIN_HAS_FORTRAN
help
Toolchain for the AArch64 architecture, from
http://www.linaro.org/engineering/armv8/
--
2.9.0
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [Buildroot] [PATCH v2 14/15] package/fftw: add fortran support
2016-07-01 16:29 [Buildroot] [PATCH v2 00/15] Fortran support for all toolchain Samuel Martin
` (12 preceding siblings ...)
2016-07-01 16:29 ` [Buildroot] [PATCH v2 13/15] toolchain/toolchain-external: update external toolchain configuration with BR2_TOOLCHAIN_HAS_FORTRAN Samuel Martin
@ 2016-07-01 16:29 ` Samuel Martin
2016-07-01 16:29 ` [Buildroot] [PATCH v2 15/15] package/lapack: new package Samuel Martin
14 siblings, 0 replies; 37+ messages in thread
From: Samuel Martin @ 2016-07-01 16:29 UTC (permalink / raw)
To: buildroot
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
---
changes v1->v2:
- add comment about fortran
---
package/fftw/fftw.mk | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/package/fftw/fftw.mk b/package/fftw/fftw.mk
index 5045ab6..9e2b2cc 100644
--- a/package/fftw/fftw.mk
+++ b/package/fftw/fftw.mk
@@ -10,7 +10,8 @@ FFTW_INSTALL_STAGING = YES
FFTW_LICENSE = GPLv2+
FFTW_LICENSE_FILES = COPYING
-FFTW_CONF_OPTS = --disable-fortran
+# fortran support only enables generation and installation of fortran sources
+FFTW_CONF_OPTS = $(if $(BR2_TOOLCHAIN_HAS_FORTRAN),--enable,--disable)-fortran
FFTW_CONF_OPTS += $(if $(BR2_PACKAGE_FFTW_PRECISION_SINGLE),--enable,--disable)-single
FFTW_CONF_OPTS += $(if $(BR2_PACKAGE_FFTW_PRECISION_LONG_DOUBLE),--enable,--disable)-long-double
--
2.9.0
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [Buildroot] [PATCH v2 15/15] package/lapack: new package
2016-07-01 16:29 [Buildroot] [PATCH v2 00/15] Fortran support for all toolchain Samuel Martin
` (13 preceding siblings ...)
2016-07-01 16:29 ` [Buildroot] [PATCH v2 14/15] package/fftw: add fortran support Samuel Martin
@ 2016-07-01 16:29 ` Samuel Martin
2016-07-01 21:26 ` Thomas Petazzoni
14 siblings, 1 reply; 37+ messages in thread
From: Samuel Martin @ 2016-07-01 16:29 UTC (permalink / raw)
To: buildroot
From: Benjamin Kamath <kamath.ben@gmail.com>
lapack is a fortran-based linear algebra math library.
Signed-off-by: Benjamin Kamath <bkamath@spaceflight.com>
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
changes v1->v2:
- integrate this patch in this series
- slightly tweak the commit log
- s/BR2_INSTALL_LIBFORTRAN/BR2_TOOLCHAIN_HAS_FORTRAN/
---
package/Config.in | 1 +
package/lapack/0001-case-sensitive-paths.patch | 22 ++++++++++++++++++++++
package/lapack/Config.in | 17 +++++++++++++++++
package/lapack/lapack.hash | 2 ++
package/lapack/lapack.mk | 25 +++++++++++++++++++++++++
5 files changed, 67 insertions(+)
create mode 100644 package/lapack/0001-case-sensitive-paths.patch
create mode 100644 package/lapack/Config.in
create mode 100644 package/lapack/lapack.hash
create mode 100644 package/lapack/lapack.mk
diff --git a/package/Config.in b/package/Config.in
index 26e2059..8e2a2af 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1255,6 +1255,7 @@ menu "Other"
source "package/gmp/Config.in"
source "package/gsl/Config.in"
source "package/gtest/Config.in"
+ source "package/lapack/Config.in"
source "package/libargtable2/Config.in"
source "package/libatomic_ops/Config.in"
source "package/libbsd/Config.in"
diff --git a/package/lapack/0001-case-sensitive-paths.patch b/package/lapack/0001-case-sensitive-paths.patch
new file mode 100644
index 0000000..3722b88
--- /dev/null
+++ b/package/lapack/0001-case-sensitive-paths.patch
@@ -0,0 +1,22 @@
+Fix upper case issue in CMakeLists
+
+Fix the 3.6.0 release of lapack to work with case-sensitive file systems,
+reported as bug 145 in LAPACK's bug list. Corrected in SVN rev 1651.
+
+Signed-off-by: Benjamin Kamath <kamath.ben@gmail.com>
+
+diff -rupN lapack-3.6.0/CBLAS/CMakeLists.txt lapack-3.6.0-old/CBLAS/CMakeLists.txt
+--- lapack-3.6.0/CBLAS/CMakeLists.txt 2016-03-17 13:42:31.121248051 -0700
++++ lapack-3.6.0-old/CBLAS/CMakeLists.txt 2016-03-17 13:41:37.819316904 -0700
+@@ -65,9 +65,9 @@ if(ALL_TARGETS)
+ list(GET ALL_TARGETS 0 _cblas_config_build_guard_target)
+ endif()
+
+-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/CMAKE/cblas-config-version.cmake.in
++configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/cblas-config-version.cmake.in
+ ${LAPACK_BINARY_DIR}/cblas-config-version.cmake @ONLY)
+-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/CMAKE/cblas-config-build.cmake.in
++configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/cblas-config-build.cmake.in
+ ${LAPACK_BINARY_DIR}/cblas-config.cmake @ONLY)
+
+
diff --git a/package/lapack/Config.in b/package/lapack/Config.in
new file mode 100644
index 0000000..8e028bd
--- /dev/null
+++ b/package/lapack/Config.in
@@ -0,0 +1,17 @@
+config BR2_PACKAGE_LAPACK
+ bool "lapack/blas"
+ depends on BR2_TOOLCHAIN_HAS_FORTRAN
+ # _fpu_control is used on PowerPC, but not available with
+ # uClibc
+ depends on !BR2_powerpc || BR2_TOOLCHAIN_USES_GLIBC
+ help
+ LAPACK and BLAS FORTRAN implementation.
+
+ http://www.netlib.org/lapack/
+
+config BR2_PACKAGE_LAPACK_COMPLEX
+ bool "Complex/Complex16 support"
+ depends on BR2_PACKAGE_LAPACK
+ default y
+ help
+ Builds support for COMPLEX and COMPLEX16 data types.
diff --git a/package/lapack/lapack.hash b/package/lapack/lapack.hash
new file mode 100644
index 0000000..99d25b5
--- /dev/null
+++ b/package/lapack/lapack.hash
@@ -0,0 +1,2 @@
+# Locally computed:
+sha256 a9a0082c918fe14e377bbd570057616768dca76cbdc713457d8199aaa233ffc3 lapack-3.6.0.tgz
diff --git a/package/lapack/lapack.mk b/package/lapack/lapack.mk
new file mode 100644
index 0000000..7656291
--- /dev/null
+++ b/package/lapack/lapack.mk
@@ -0,0 +1,25 @@
+################################################################################
+#
+# lapack
+#
+################################################################################
+
+# This package provides 2 libraries:
+# - libblas
+# - liblapack
+
+LAPACK_VERSION = 3.6.0
+LAPACK_SOURCE = lapack-$(LAPACK_VERSION).tgz
+LAPACK_LICENSE = BSD-3c (libblas and liblapack)
+LAPACK_LICENSE_FILES = LICENSE
+LAPACK_SITE = http://www.netlib.org/lapack
+LAPACK_INSTALL_STAGING = YES
+LAPACK_CONF_OPTS = -DLAPACKE=on -DCBLAS=on
+
+ifeq ($(BR2_PACKAGE_LAPACK_COMPLEX),y)
+LAPACK_CONF_OPTS += -DBUILD_COMPLEX=on -DBUILD_COMPLEX16=on
+else
+LAPACK_CONF_OPTS += -DBUILD_COMPLEX=off -DBUILD_COMPLEX16=off
+endif
+
+$(eval $(cmake-package))
--
2.9.0
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [Buildroot] [PATCH v2 01/15] package/gcc: fix fortran support
2016-07-01 16:29 ` [Buildroot] [PATCH v2 01/15] package/gcc: fix fortran support Samuel Martin
@ 2016-07-01 18:19 ` Thomas Petazzoni
0 siblings, 0 replies; 37+ messages in thread
From: Thomas Petazzoni @ 2016-07-01 18:19 UTC (permalink / raw)
To: buildroot
Hello,
On Fri, 1 Jul 2016 18:29:06 +0200, Samuel Martin wrote:
> diff --git a/package/gcc/gcc-final/gcc-final.mk b/package/gcc/gcc-final/gcc-final.mk
> index 78ceeba..f13bc36 100644
> --- a/package/gcc/gcc-final/gcc-final.mk
> +++ b/package/gcc/gcc-final/gcc-final.mk
> @@ -163,6 +163,10 @@ endif
>
> ifeq ($(BR2_TOOLCHAIN_BUILDROOT_FORTRAN),y)
> HOST_GCC_FINAL_USR_LIBS += libgfortran
> +# fortran needs quadmath on x86 and x86_64
> +ifeq ($(BR2_I386)$(BR2_x86_64),y)
BR2_I386 doesn't exist, you probably meant BR2_i386.
> +HOST_GCC_FINAL_USR_LIBS += libquadmath
> +endif
> endif
>
> ifeq ($(BR2_GCC_ENABLE_OPENMP),y)
> diff --git a/package/gcc/gcc.mk b/package/gcc/gcc.mk
> index 6e1c02d..e981940 100644
> --- a/package/gcc/gcc.mk
> +++ b/package/gcc/gcc.mk
> @@ -109,6 +109,11 @@ endif
> # quadmath support requires wchar
> ifeq ($(BR2_USE_WCHAR),)
> HOST_GCC_COMMON_CONF_OPTS += --disable-libquadmath
> +else
> +# fortran needs quadmath on x86 and x86_64
> +ifeq ($(BR2_TOOLCHAIN_BUILDROOT_FORTRAN)$(BR2_I386)$(BR2_x86_64),yy)
Same here.
> +HOST_GCC_COMMON_CONF_OPTS += --enable-libquadmath
> +endif
> endif
I'm not a big fan of this condition, it looks a bit clunky and
complicated. Why don't we simply enable libquadmath as soon as wchar is
available? With your condition, there are cases where libquadmath is
forced enabled, some cases where libquadmath is forced disabled, and
lots of other cases where we neither disable nor enable it. Doesn't
look pretty.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 37+ messages in thread
* [Buildroot] [PATCH v2 02/15] package/gcc: wrap gfortran
2016-07-01 16:29 ` [Buildroot] [PATCH v2 02/15] package/gcc: wrap gfortran Samuel Martin
@ 2016-07-01 20:55 ` Thomas Petazzoni
0 siblings, 0 replies; 37+ messages in thread
From: Thomas Petazzoni @ 2016-07-01 20:55 UTC (permalink / raw)
To: buildroot
Hello,
On Fri, 1 Jul 2016 18:29:07 +0200, Samuel Martin wrote:
> gfortran supports all options supported by gcc, so it can and should be called
> via the toolchain wrapper.
>
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
>
> ---
> changes v1->v2:
> - none
> ---
> package/gcc/gcc.mk | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 37+ messages in thread
* [Buildroot] [PATCH v2 03/15] package/Makefile.in: set TARGET_FCFLAGS variables
2016-07-01 16:29 ` [Buildroot] [PATCH v2 03/15] package/Makefile.in: set TARGET_FCFLAGS variables Samuel Martin
@ 2016-07-01 20:59 ` Thomas Petazzoni
2016-07-02 11:14 ` Arnout Vandecappelle
0 siblings, 1 reply; 37+ messages in thread
From: Thomas Petazzoni @ 2016-07-01 20:59 UTC (permalink / raw)
To: buildroot
Hello,
On Fri, 1 Jul 2016 18:29:08 +0200, Samuel Martin wrote:
> From: Benjamin Kamath <bkamath@spaceflight.com>
>
> TARGET_FCFLAGS is already added to TARGET_CONFIGURE_OPTS, but was not
> defined so for.
so for -> so far.
> ifeq ($(BR2_BINFMT_FLAT),y)
> @@ -148,29 +149,36 @@ TARGET_CFLAGS += $(if $($(PKG)_FLAT_STACKSIZE),-Wl$(comma)-elf2flt=-s$($(PKG)_FL
> -Wl$(comma)-elf2flt)
> TARGET_CXXFLAGS += $(if $($(PKG)_FLAT_STACKSIZE),-Wl$(comma)-elf2flt=-s$($(PKG)_FLAT_STACKSIZE),\
> -Wl$(comma)-elf2flt)
> +TARGET_FCFLAGS += $(if $($(PKG)_FLAT_STACKSIZE),-Wl$(comma)-elf2flt=-s$($(PKG)_FLAT_STACKSIZE),\
> + -Wl$(comma)-elf2flt)
> TARGET_LDFLAGS += $(if $($(PKG)_FLAT_STACKSIZE),-Wl$(comma)-elf2flt=-s$($(PKG)_FLAT_STACKSIZE),-Wl$(comma)-elf2flt)
> endif
>
> ifeq ($(BR2_BINFMT_FLAT_SHARED),y)
> TARGET_LDFLAGS += -mid-shared-library -mshared-library-id=0
> TARGET_CFLAGS += -mid-shared-library -mshared-library-id=0
> +TARGET_FCFLAGS += -mid-shared-library -mshared-library-id=0
> TARGET_CXXFLAGS += -mid-shared-library -mshared-library-id=0
[...]
There's really a lot of duplication between all those definitions, so
maybe one day we should clean this up. I'm also not a big fan of the
TARGET_ABI variable, but that's really unrelated to this patch.
So: applied, thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 37+ messages in thread
* [Buildroot] [PATCH v2 04/15] package/Makefile.in: set variables for legacy f77 checks
2016-07-01 16:29 ` [Buildroot] [PATCH v2 04/15] package/Makefile.in: set variables for legacy f77 checks Samuel Martin
@ 2016-07-01 21:01 ` Thomas Petazzoni
0 siblings, 0 replies; 37+ messages in thread
From: Thomas Petazzoni @ 2016-07-01 21:01 UTC (permalink / raw)
To: buildroot
Hello,
On Fri, 1 Jul 2016 18:29:09 +0200, Samuel Martin wrote:
> For fortran detection, some projects check for fortran availability
> using the FC/FCFLAGS variables, and others for the legacy F77/FFLAGS
> ones.
> So, make sure the legacy fortran F77 and FFLAGS variables are set in
> TARGET_CONFIGURE_OPTS.
>
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
>
> ---
> changes v1->v2:
> - new patch
> ---
> package/Makefile.in | 2 ++
> 1 file changed, 2 insertions(+)
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 37+ messages in thread
* [Buildroot] [PATCH v2 05/15] pkg-cmake.mk: export the fortran compiler path in the CMake toolchain file
2016-07-01 16:29 ` [Buildroot] [PATCH v2 05/15] pkg-cmake.mk: export the fortran compiler path in the CMake toolchain file Samuel Martin
@ 2016-07-01 21:02 ` Thomas Petazzoni
2016-07-01 21:37 ` Samuel Martin
0 siblings, 1 reply; 37+ messages in thread
From: Thomas Petazzoni @ 2016-07-01 21:02 UTC (permalink / raw)
To: buildroot
Hello,
On Fri, 1 Jul 2016 18:29:10 +0200, Samuel Martin wrote:
> + -e 's#@@TOOLCHAIN_HAS_FORTRAN@@#$(if $(BR2_TOOLCHAIN_HAS_FORTRAN),1,0)#' \
The BR2_TOOLCHAIN_HAS_FORTRAN variable doesn't exist at this point in
the patch series, so shouldn't this patch come later?
Or did you assume that because it doesn't exist, it's always false for
the moment, and that this patch should be considered a "preparation"
patch ?
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 37+ messages in thread
* [Buildroot] [PATCH v2 06/15] toolchain: add hidden symbol for fortran support in the toolchain
2016-07-01 16:29 ` [Buildroot] [PATCH v2 06/15] toolchain: add hidden symbol for fortran support in the toolchain Samuel Martin
@ 2016-07-01 21:03 ` Thomas Petazzoni
0 siblings, 0 replies; 37+ messages in thread
From: Thomas Petazzoni @ 2016-07-01 21:03 UTC (permalink / raw)
To: buildroot
Hello,
On Fri, 1 Jul 2016 18:29:11 +0200, Samuel Martin wrote:
> This symbol should be used in all packages requiring/testing for fortran
> support.
>
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Reviewed-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 37+ messages in thread
* [Buildroot] [PATCH v2 07/15] package/gcc: select BR2_TOOLCHAIN_HAS_FORTRAN when appropriated
2016-07-01 16:29 ` [Buildroot] [PATCH v2 07/15] package/gcc: select BR2_TOOLCHAIN_HAS_FORTRAN when appropriated Samuel Martin
@ 2016-07-01 21:03 ` Thomas Petazzoni
2016-07-01 21:03 ` Thomas Petazzoni
1 sibling, 0 replies; 37+ messages in thread
From: Thomas Petazzoni @ 2016-07-01 21:03 UTC (permalink / raw)
To: buildroot
Hello,
On Fri, 1 Jul 2016 18:29:12 +0200, Samuel Martin wrote:
> This is only for the Buildroot toolchain backend.
>
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Reviewed-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 37+ messages in thread
* [Buildroot] [PATCH v2 07/15] package/gcc: select BR2_TOOLCHAIN_HAS_FORTRAN when appropriated
2016-07-01 16:29 ` [Buildroot] [PATCH v2 07/15] package/gcc: select BR2_TOOLCHAIN_HAS_FORTRAN when appropriated Samuel Martin
2016-07-01 21:03 ` Thomas Petazzoni
@ 2016-07-01 21:03 ` Thomas Petazzoni
1 sibling, 0 replies; 37+ messages in thread
From: Thomas Petazzoni @ 2016-07-01 21:03 UTC (permalink / raw)
To: buildroot
Hello,
On Fri, 1 Jul 2016 18:29:12 +0200, Samuel Martin wrote:
> This is only for the Buildroot toolchain backend.
In the title: appropriated -> appropriate
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 37+ messages in thread
* [Buildroot] [PATCH v2 08/15] package/gcc: used BR2_TOOLCHAIN_HAS_FORTRAN instead of BR2_TOOLCHAIN_BUILDROOT_FORTRAN
2016-07-01 16:29 ` [Buildroot] [PATCH v2 08/15] package/gcc: used BR2_TOOLCHAIN_HAS_FORTRAN instead of BR2_TOOLCHAIN_BUILDROOT_FORTRAN Samuel Martin
@ 2016-07-01 21:06 ` Thomas Petazzoni
2016-07-02 11:18 ` Arnout Vandecappelle
0 siblings, 1 reply; 37+ messages in thread
From: Thomas Petazzoni @ 2016-07-01 21:06 UTC (permalink / raw)
To: buildroot
Hello,
In the title: used -> use
On Fri, 1 Jul 2016 18:29:13 +0200, Samuel Martin wrote:
> # Languages supported by the cross-compiler
> GCC_FINAL_CROSS_LANGUAGES-y = c
> GCC_FINAL_CROSS_LANGUAGES-$(BR2_INSTALL_LIBSTDCPP) += c++
> -GCC_FINAL_CROSS_LANGUAGES-$(BR2_TOOLCHAIN_BUILDROOT_FORTRAN) += fortran
> +GCC_FINAL_CROSS_LANGUAGES-$(BR2_TOOLCHAIN_HAS_FORTRAN) += fortran
I am not actually sure of the value of this change, and I would rather
suggest that BR2_TOOLCHAIN_BUILDROOT_CXX should be used to enable the
C++ support.
To me, BR2_TOOLCHAIN_BUILDROOT_CXX and BR2_TOOLCHAIN_BUILDROOT_FORTRAN
indicate that you *want* C++/Fortran support in the gcc being built by
Buildroot. Those config options are from gcc, and affect the gcc build.
On the other hand BR2_INSTALL_LIBSTDCPP (which should be named
BR2_TOOLCHAIN_HAS_CXX) and BR2_TOOLCHAIN_HAS_FORTRAN should be used by
*consumers* that need C++ or Fortran.
So I would be inclined to reject this patch.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 37+ messages in thread
* [Buildroot] [PATCH v2 09/15] toolchain/helpers: add fortran check
2016-07-01 16:29 ` [Buildroot] [PATCH v2 09/15] toolchain/helpers: add fortran check Samuel Martin
@ 2016-07-01 21:19 ` Thomas Petazzoni
0 siblings, 0 replies; 37+ messages in thread
From: Thomas Petazzoni @ 2016-07-01 21:19 UTC (permalink / raw)
To: buildroot
Hello,
On Fri, 1 Jul 2016 18:29:14 +0200, Samuel Martin wrote:
> +check_fortran = \
> + __CROSS_FC=$(strip $1) ; \
> + printf 'program hello\n\tprint *, "Hello Fortran!\\n"\nend program hello\n' | \
> + $${__CROSS_FC} -x f95 -o /dev/null - ; \
We've seen in the past some toolchains that didn't support this
solution of taking the source on the standard input and throwing away
the output (see 375bc18850f0f8fec90e1e478c0e9d2159377a64). I'd prefer
to use the same solution.
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 37+ messages in thread
* [Buildroot] [PATCH v2 10/15] toolchain/toolchain-external: enable fortran check when it is selected
2016-07-01 16:29 ` [Buildroot] [PATCH v2 10/15] toolchain/toolchain-external: enable fortran check when it is selected Samuel Martin
@ 2016-07-01 21:20 ` Thomas Petazzoni
2016-07-02 8:36 ` Samuel Martin
0 siblings, 1 reply; 37+ messages in thread
From: Thomas Petazzoni @ 2016-07-01 21:20 UTC (permalink / raw)
To: buildroot
Hello,
On Fri, 1 Jul 2016 18:29:15 +0200, Samuel Martin wrote:
> ifeq ($(filter $(HOST_DIR)/%,$(TOOLCHAIN_EXTERNAL_BIN)),)
> @@ -529,6 +530,10 @@ define TOOLCHAIN_EXTERNAL_CONFIGURE_CMDS
> if test "$(BR2_INSTALL_LIBSTDCPP)" = "y" ; then \
> $(call check_cplusplus,$(TOOLCHAIN_EXTERNAL_CXX)) ; \
> fi ; \
> + if test "$(BR2_TOOLCHAIN_HAS_FORTRAN)" = "y" ; then \
> + $(call check_fortran,\
> + "$(TOOLCHAIN_EXTERNAL_FC) $(TOOLCHAIN_EXTERNAL_CFLAGS)") ; \
Why are you passing TOOLCHAIN_EXTERNAL_CFLAGS for the fortran compiler
check, while we are not using them for the C++ compiler check ?
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 37+ messages in thread
* [Buildroot] [PATCH v2 11/15] toolchain/toolchain-external: add libgfortran and libquadmath to the TOOLCHAIN_EXTERNAL_LIBS list
2016-07-01 16:29 ` [Buildroot] [PATCH v2 11/15] toolchain/toolchain-external: add libgfortran and libquadmath to the TOOLCHAIN_EXTERNAL_LIBS list Samuel Martin
@ 2016-07-01 21:22 ` Thomas Petazzoni
2016-07-02 11:22 ` Arnout Vandecappelle
0 siblings, 1 reply; 37+ messages in thread
From: Thomas Petazzoni @ 2016-07-01 21:22 UTC (permalink / raw)
To: buildroot
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
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 37+ messages in thread
* [Buildroot] [PATCH v2 12/15] toolchain/toolchain-external: add knob for fortran support
2016-07-01 16:29 ` [Buildroot] [PATCH v2 12/15] toolchain/toolchain-external: add knob for fortran support Samuel Martin
@ 2016-07-01 21:23 ` Thomas Petazzoni
2016-07-02 10:37 ` Samuel Martin
0 siblings, 1 reply; 37+ messages in thread
From: Thomas Petazzoni @ 2016-07-01 21:23 UTC (permalink / raw)
To: buildroot
Hello,
On Fri, 1 Jul 2016 18:29:17 +0200, Samuel Martin wrote:
> +config BR2_TOOLCHAIN_EXTERNAL_FORTRAN
> + bool "Toolchain has Fortran support?"
> + depends on BR2_USE_WCHAR # libquadmath
Is this dependency really needed? Plus libquadmath is only needed on
i386/x86_64, so on other architectures, we could have Fortran support
without wchar, could we?
> + select BR2_TOOLCHAIN_HAS_FORTRAN
> + help
> + Select this option if your external toolchain has fortran
> + support. If you don't know, leave the default value,
> + Buildroot will tell you if it's correct or not.
> +
> +comment "Fortran support needs a toolchain w/ wchar"
> + depends on !BR2_USE_WCHAR
I think this comment is not needed.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 37+ messages in thread
* [Buildroot] [PATCH v2 15/15] package/lapack: new package
2016-07-01 16:29 ` [Buildroot] [PATCH v2 15/15] package/lapack: new package Samuel Martin
@ 2016-07-01 21:26 ` Thomas Petazzoni
2016-07-02 9:45 ` Samuel Martin
0 siblings, 1 reply; 37+ messages in thread
From: Thomas Petazzoni @ 2016-07-01 21:26 UTC (permalink / raw)
To: buildroot
Hello,
On Fri, 1 Jul 2016 18:29:20 +0200, Samuel Martin wrote:
> diff --git a/package/lapack/Config.in b/package/lapack/Config.in
> new file mode 100644
> index 0000000..8e028bd
> --- /dev/null
> +++ b/package/lapack/Config.in
> @@ -0,0 +1,17 @@
> +config BR2_PACKAGE_LAPACK
> + bool "lapack/blas"
> + depends on BR2_TOOLCHAIN_HAS_FORTRAN
> + # _fpu_control is used on PowerPC, but not available with
> + # uClibc
> + depends on !BR2_powerpc || BR2_TOOLCHAIN_USES_GLIBC
What about musl here ?
Also, just like we have a comment for packages that need C++ support,
we should probably have a similar comment for packages that need
Fortran support. And of course, the documentation should be updated
accordingly.
> + help
> + LAPACK and BLAS FORTRAN implementation.
> +
> + http://www.netlib.org/lapack/
> +
> +config BR2_PACKAGE_LAPACK_COMPLEX
> + bool "Complex/Complex16 support"
> + depends on BR2_PACKAGE_LAPACK
> + default y
> + help
> + Builds support for COMPLEX and COMPLEX16 data types.
> diff --git a/package/lapack/lapack.hash b/package/lapack/lapack.hash
> new file mode 100644
> index 0000000..99d25b5
> --- /dev/null
> +++ b/package/lapack/lapack.hash
> @@ -0,0 +1,2 @@
> +# Locally computed:
> +sha256 a9a0082c918fe14e377bbd570057616768dca76cbdc713457d8199aaa233ffc3 lapack-3.6.0.tgz
> diff --git a/package/lapack/lapack.mk b/package/lapack/lapack.mk
> new file mode 100644
> index 0000000..7656291
> --- /dev/null
> +++ b/package/lapack/lapack.mk
> @@ -0,0 +1,25 @@
> +################################################################################
> +#
> +# lapack
> +#
> +################################################################################
> +
> +# This package provides 2 libraries:
> +# - libblas
> +# - liblapack
> +
> +LAPACK_VERSION = 3.6.0
> +LAPACK_SOURCE = lapack-$(LAPACK_VERSION).tgz
> +LAPACK_LICENSE = BSD-3c (libblas and liblapack)
No need to mention "libblas and liblapack" if that's all what the
package is installing. Specifying what is under what license is only
needed when multiple licenses are used.
> +LAPACK_LICENSE_FILES = LICENSE
> +LAPACK_SITE = http://www.netlib.org/lapack
> +LAPACK_INSTALL_STAGING = YES
> +LAPACK_CONF_OPTS = -DLAPACKE=on -DCBLAS=on
> +
> +ifeq ($(BR2_PACKAGE_LAPACK_COMPLEX),y)
> +LAPACK_CONF_OPTS += -DBUILD_COMPLEX=on -DBUILD_COMPLEX16=on
> +else
> +LAPACK_CONF_OPTS += -DBUILD_COMPLEX=off -DBUILD_COMPLEX16=off
> +endif
Don't we generally use upper-case for ON/OFF in CMake packages ?
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 37+ messages in thread
* [Buildroot] [PATCH v2 05/15] pkg-cmake.mk: export the fortran compiler path in the CMake toolchain file
2016-07-01 21:02 ` Thomas Petazzoni
@ 2016-07-01 21:37 ` Samuel Martin
0 siblings, 0 replies; 37+ messages in thread
From: Samuel Martin @ 2016-07-01 21:37 UTC (permalink / raw)
To: buildroot
On Fri, Jul 1, 2016 at 11:02 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Hello,
>
> On Fri, 1 Jul 2016 18:29:10 +0200, Samuel Martin wrote:
>
>> + -e 's#@@TOOLCHAIN_HAS_FORTRAN@@#$(if $(BR2_TOOLCHAIN_HAS_FORTRAN),1,0)#' \
>
> The BR2_TOOLCHAIN_HAS_FORTRAN variable doesn't exist at this point in
> the patch series, so shouldn't this patch come later?
>
> Or did you assume that because it doesn't exist, it's always false for
> the moment, and that this patch should be considered a "preparation"
> patch ?
Nope, I just screwed my rebase :-S
>
> Thanks,
>
> Thomas
> --
> Thomas Petazzoni, CTO, Free Electrons
> Embedded Linux, Kernel and Android engineering
> http://free-electrons.com
--
Samuel
^ permalink raw reply [flat|nested] 37+ messages in thread
* [Buildroot] [PATCH v2 10/15] toolchain/toolchain-external: enable fortran check when it is selected
2016-07-01 21:20 ` Thomas Petazzoni
@ 2016-07-02 8:36 ` Samuel Martin
0 siblings, 0 replies; 37+ messages in thread
From: Samuel Martin @ 2016-07-02 8:36 UTC (permalink / raw)
To: buildroot
On Fri, Jul 1, 2016 at 11:20 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Hello,
>
> On Fri, 1 Jul 2016 18:29:15 +0200, Samuel Martin wrote:
>
>> ifeq ($(filter $(HOST_DIR)/%,$(TOOLCHAIN_EXTERNAL_BIN)),)
>> @@ -529,6 +530,10 @@ define TOOLCHAIN_EXTERNAL_CONFIGURE_CMDS
>> if test "$(BR2_INSTALL_LIBSTDCPP)" = "y" ; then \
>> $(call check_cplusplus,$(TOOLCHAIN_EXTERNAL_CXX)) ; \
>> fi ; \
>> + if test "$(BR2_TOOLCHAIN_HAS_FORTRAN)" = "y" ; then \
>> + $(call check_fortran,\
>> + "$(TOOLCHAIN_EXTERNAL_FC) $(TOOLCHAIN_EXTERNAL_CFLAGS)") ; \
>
> Why are you passing TOOLCHAIN_EXTERNAL_CFLAGS for the fortran compiler
> check, while we are not using them for the C++ compiler check ?
Well, no real reason to do this indeed... only gfortran is supposed to
support gcc option, so it should be harmless.
Anyway, I drop them.
>
> Thanks,
>
> Thomas
> --
> Thomas Petazzoni, CTO, Free Electrons
> Embedded Linux, Kernel and Android engineering
> http://free-electrons.com
--
Samuel
^ permalink raw reply [flat|nested] 37+ messages in thread
* [Buildroot] [PATCH v2 15/15] package/lapack: new package
2016-07-01 21:26 ` Thomas Petazzoni
@ 2016-07-02 9:45 ` Samuel Martin
0 siblings, 0 replies; 37+ messages in thread
From: Samuel Martin @ 2016-07-02 9:45 UTC (permalink / raw)
To: buildroot
On Fri, Jul 1, 2016 at 11:26 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Hello,
>
> On Fri, 1 Jul 2016 18:29:20 +0200, Samuel Martin wrote:
>
>> diff --git a/package/lapack/Config.in b/package/lapack/Config.in
>> new file mode 100644
>> index 0000000..8e028bd
>> --- /dev/null
>> +++ b/package/lapack/Config.in
>> @@ -0,0 +1,17 @@
>> +config BR2_PACKAGE_LAPACK
>> + bool "lapack/blas"
>> + depends on BR2_TOOLCHAIN_HAS_FORTRAN
>> + # _fpu_control is used on PowerPC, but not available with
>> + # uClibc
>> + depends on !BR2_powerpc || BR2_TOOLCHAIN_USES_GLIBC
>
> What about musl here ?
It does build with musl, so I changed deps to be:
depends on !(BR2_powerpc && BR2_TOOLCHAIN_USES_UCLIBC)
>
> Also, just like we have a comment for packages that need C++ support,
> we should probably have a similar comment for packages that need
> Fortran support. And of course, the documentation should be updated
> accordingly.
Done
>
>> + help
>> + LAPACK and BLAS FORTRAN implementation.
>> +
>> + http://www.netlib.org/lapack/
>> +
>> +config BR2_PACKAGE_LAPACK_COMPLEX
>> + bool "Complex/Complex16 support"
>> + depends on BR2_PACKAGE_LAPACK
>> + default y
>> + help
>> + Builds support for COMPLEX and COMPLEX16 data types.
>> diff --git a/package/lapack/lapack.hash b/package/lapack/lapack.hash
>> new file mode 100644
>> index 0000000..99d25b5
>> --- /dev/null
>> +++ b/package/lapack/lapack.hash
>> @@ -0,0 +1,2 @@
>> +# Locally computed:
>> +sha256 a9a0082c918fe14e377bbd570057616768dca76cbdc713457d8199aaa233ffc3 lapack-3.6.0.tgz
>> diff --git a/package/lapack/lapack.mk b/package/lapack/lapack.mk
>> new file mode 100644
>> index 0000000..7656291
>> --- /dev/null
>> +++ b/package/lapack/lapack.mk
>> @@ -0,0 +1,25 @@
>> +################################################################################
>> +#
>> +# lapack
>> +#
>> +################################################################################
>> +
>> +# This package provides 2 libraries:
>> +# - libblas
>> +# - liblapack
>> +
>> +LAPACK_VERSION = 3.6.0
>> +LAPACK_SOURCE = lapack-$(LAPACK_VERSION).tgz
>> +LAPACK_LICENSE = BSD-3c (libblas and liblapack)
>
> No need to mention "libblas and liblapack" if that's all what the
> package is installing. Specifying what is under what license is only
> needed when multiple licenses are used.
Done
>
>> +LAPACK_LICENSE_FILES = LICENSE
>> +LAPACK_SITE = http://www.netlib.org/lapack
>> +LAPACK_INSTALL_STAGING = YES
>> +LAPACK_CONF_OPTS = -DLAPACKE=on -DCBLAS=on
>> +
>> +ifeq ($(BR2_PACKAGE_LAPACK_COMPLEX),y)
>> +LAPACK_CONF_OPTS += -DBUILD_COMPLEX=on -DBUILD_COMPLEX16=on
>> +else
>> +LAPACK_CONF_OPTS += -DBUILD_COMPLEX=off -DBUILD_COMPLEX16=off
>> +endif
>
> Don't we generally use upper-case for ON/OFF in CMake packages ?
Done
>
> Thanks,
>
> Thomas
> --
> Thomas Petazzoni, CTO, Free Electrons
> Embedded Linux, Kernel and Android engineering
> http://free-electrons.com
--
Samuel
^ permalink raw reply [flat|nested] 37+ messages in thread
* [Buildroot] [PATCH v2 12/15] toolchain/toolchain-external: add knob for fortran support
2016-07-01 21:23 ` Thomas Petazzoni
@ 2016-07-02 10:37 ` Samuel Martin
0 siblings, 0 replies; 37+ messages in thread
From: Samuel Martin @ 2016-07-02 10:37 UTC (permalink / raw)
To: buildroot
On Fri, Jul 1, 2016 at 11:23 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Hello,
>
> On Fri, 1 Jul 2016 18:29:17 +0200, Samuel Martin wrote:
>
>> +config BR2_TOOLCHAIN_EXTERNAL_FORTRAN
>> + bool "Toolchain has Fortran support?"
>> + depends on BR2_USE_WCHAR # libquadmath
>
> Is this dependency really needed? Plus libquadmath is only needed on
> i386/x86_64, so on other architectures, we could have Fortran support
> without wchar, could we?
Right, it should be:
depends on (wchar && (i386 || x86_64)) || !(i386 || x86_64)
>
>> + select BR2_TOOLCHAIN_HAS_FORTRAN
>> + help
>> + Select this option if your external toolchain has fortran
>> + support. If you don't know, leave the default value,
>> + Buildroot will tell you if it's correct or not.
>> +
>> +comment "Fortran support needs a toolchain w/ wchar"
>> + depends on !BR2_USE_WCHAR
>
> I think this comment is not needed.
Indeed, if the external toolchain has fortran, then it already meets
all the fortran dependencies.
>
> Thomas
> --
> Thomas Petazzoni, CTO, Free Electrons
> Embedded Linux, Kernel and Android engineering
> http://free-electrons.com
--
Samuel
^ permalink raw reply [flat|nested] 37+ messages in thread
* [Buildroot] [PATCH v2 03/15] package/Makefile.in: set TARGET_FCFLAGS variables
2016-07-01 20:59 ` Thomas Petazzoni
@ 2016-07-02 11:14 ` Arnout Vandecappelle
0 siblings, 0 replies; 37+ messages in thread
From: Arnout Vandecappelle @ 2016-07-02 11:14 UTC (permalink / raw)
To: buildroot
On 01-07-16 22:59, Thomas Petazzoni wrote:
>> ifeq ($(BR2_BINFMT_FLAT),y)
>> @@ -148,29 +149,36 @@ TARGET_CFLAGS += $(if $($(PKG)_FLAT_STACKSIZE),-Wl$(comma)-elf2flt=-s$($(PKG)_FL
>> -Wl$(comma)-elf2flt)
>> TARGET_CXXFLAGS += $(if $($(PKG)_FLAT_STACKSIZE),-Wl$(comma)-elf2flt=-s$($(PKG)_FLAT_STACKSIZE),\
>> -Wl$(comma)-elf2flt)
>> +TARGET_FCFLAGS += $(if $($(PKG)_FLAT_STACKSIZE),-Wl$(comma)-elf2flt=-s$($(PKG)_FLAT_STACKSIZE),\
>> + -Wl$(comma)-elf2flt)
>> TARGET_LDFLAGS += $(if $($(PKG)_FLAT_STACKSIZE),-Wl$(comma)-elf2flt=-s$($(PKG)_FLAT_STACKSIZE),-Wl$(comma)-elf2flt)
>> endif
>>
>> ifeq ($(BR2_BINFMT_FLAT_SHARED),y)
>> TARGET_LDFLAGS += -mid-shared-library -mshared-library-id=0
>> TARGET_CFLAGS += -mid-shared-library -mshared-library-id=0
>> +TARGET_FCFLAGS += -mid-shared-library -mshared-library-id=0
>> TARGET_CXXFLAGS += -mid-shared-library -mshared-library-id=0
>
> [...]
>
> There's really a lot of duplication between all those definitions, so
> maybe one day we should clean this up. I'm also not a big fan of the
> TARGET_ABI variable, but that's really unrelated to this patch.
IMHO this stuff should go into the toolchain wrapper.
Regards,
Arnout
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
^ permalink raw reply [flat|nested] 37+ messages in thread
* [Buildroot] [PATCH v2 08/15] package/gcc: used BR2_TOOLCHAIN_HAS_FORTRAN instead of BR2_TOOLCHAIN_BUILDROOT_FORTRAN
2016-07-01 21:06 ` Thomas Petazzoni
@ 2016-07-02 11:18 ` Arnout Vandecappelle
0 siblings, 0 replies; 37+ messages in thread
From: Arnout Vandecappelle @ 2016-07-02 11:18 UTC (permalink / raw)
To: buildroot
On 01-07-16 23:06, Thomas Petazzoni wrote:
> Hello,
>
> In the title: used -> use
>
> On Fri, 1 Jul 2016 18:29:13 +0200, Samuel Martin wrote:
>
>> # Languages supported by the cross-compiler
>> GCC_FINAL_CROSS_LANGUAGES-y = c
>> GCC_FINAL_CROSS_LANGUAGES-$(BR2_INSTALL_LIBSTDCPP) += c++
>> -GCC_FINAL_CROSS_LANGUAGES-$(BR2_TOOLCHAIN_BUILDROOT_FORTRAN) += fortran
>> +GCC_FINAL_CROSS_LANGUAGES-$(BR2_TOOLCHAIN_HAS_FORTRAN) += fortran
>
> I am not actually sure of the value of this change, and I would rather
> suggest that BR2_TOOLCHAIN_BUILDROOT_CXX should be used to enable the
> C++ support.
>
> To me, BR2_TOOLCHAIN_BUILDROOT_CXX and BR2_TOOLCHAIN_BUILDROOT_FORTRAN
> indicate that you *want* C++/Fortran support in the gcc being built by
> Buildroot. Those config options are from gcc, and affect the gcc build.
>
> On the other hand BR2_INSTALL_LIBSTDCPP (which should be named
> BR2_TOOLCHAIN_HAS_CXX) and BR2_TOOLCHAIN_HAS_FORTRAN should be used by
> *consumers* that need C++ or Fortran.
>
> So I would be inclined to reject this patch.
I agree.
BTW, we actually can easily change BR2_INSTALL_LIBSTDCPP into
BR2_TOOLCHAIN_HAS_CXX because it's a blind symbol.
BR2_TOOLCHAIN_BUILDROOT_CXX _should_ actually be named BR2_PACKAGE_GCC_CXX, but
that's more difficult because it's not blind.
Regards,
Arnout
>
> Thomas
>
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
^ permalink raw reply [flat|nested] 37+ messages in thread
* [Buildroot] [PATCH v2 11/15] toolchain/toolchain-external: add libgfortran and libquadmath to the TOOLCHAIN_EXTERNAL_LIBS list
2016-07-01 21:22 ` Thomas Petazzoni
@ 2016-07-02 11:22 ` Arnout Vandecappelle
0 siblings, 0 replies; 37+ messages in thread
From: Arnout Vandecappelle @ 2016-07-02 11:22 UTC (permalink / raw)
To: buildroot
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
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
^ permalink raw reply [flat|nested] 37+ messages in thread
end of thread, other threads:[~2016-07-02 11:22 UTC | newest]
Thread overview: 37+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-01 16:29 [Buildroot] [PATCH v2 00/15] Fortran support for all toolchain Samuel Martin
2016-07-01 16:29 ` [Buildroot] [PATCH v2 01/15] package/gcc: fix fortran support Samuel Martin
2016-07-01 18:19 ` Thomas Petazzoni
2016-07-01 16:29 ` [Buildroot] [PATCH v2 02/15] package/gcc: wrap gfortran Samuel Martin
2016-07-01 20:55 ` Thomas Petazzoni
2016-07-01 16:29 ` [Buildroot] [PATCH v2 03/15] package/Makefile.in: set TARGET_FCFLAGS variables Samuel Martin
2016-07-01 20:59 ` Thomas Petazzoni
2016-07-02 11:14 ` Arnout Vandecappelle
2016-07-01 16:29 ` [Buildroot] [PATCH v2 04/15] package/Makefile.in: set variables for legacy f77 checks Samuel Martin
2016-07-01 21:01 ` Thomas Petazzoni
2016-07-01 16:29 ` [Buildroot] [PATCH v2 05/15] pkg-cmake.mk: export the fortran compiler path in the CMake toolchain file Samuel Martin
2016-07-01 21:02 ` Thomas Petazzoni
2016-07-01 21:37 ` Samuel Martin
2016-07-01 16:29 ` [Buildroot] [PATCH v2 06/15] toolchain: add hidden symbol for fortran support in the toolchain Samuel Martin
2016-07-01 21:03 ` Thomas Petazzoni
2016-07-01 16:29 ` [Buildroot] [PATCH v2 07/15] package/gcc: select BR2_TOOLCHAIN_HAS_FORTRAN when appropriated Samuel Martin
2016-07-01 21:03 ` Thomas Petazzoni
2016-07-01 21:03 ` Thomas Petazzoni
2016-07-01 16:29 ` [Buildroot] [PATCH v2 08/15] package/gcc: used BR2_TOOLCHAIN_HAS_FORTRAN instead of BR2_TOOLCHAIN_BUILDROOT_FORTRAN Samuel Martin
2016-07-01 21:06 ` Thomas Petazzoni
2016-07-02 11:18 ` Arnout Vandecappelle
2016-07-01 16:29 ` [Buildroot] [PATCH v2 09/15] toolchain/helpers: add fortran check Samuel Martin
2016-07-01 21:19 ` Thomas Petazzoni
2016-07-01 16:29 ` [Buildroot] [PATCH v2 10/15] toolchain/toolchain-external: enable fortran check when it is selected Samuel Martin
2016-07-01 21:20 ` Thomas Petazzoni
2016-07-02 8:36 ` Samuel Martin
2016-07-01 16:29 ` [Buildroot] [PATCH v2 11/15] toolchain/toolchain-external: add libgfortran and libquadmath to the TOOLCHAIN_EXTERNAL_LIBS list Samuel Martin
2016-07-01 21:22 ` Thomas Petazzoni
2016-07-02 11:22 ` Arnout Vandecappelle
2016-07-01 16:29 ` [Buildroot] [PATCH v2 12/15] toolchain/toolchain-external: add knob for fortran support Samuel Martin
2016-07-01 21:23 ` Thomas Petazzoni
2016-07-02 10:37 ` Samuel Martin
2016-07-01 16:29 ` [Buildroot] [PATCH v2 13/15] toolchain/toolchain-external: update external toolchain configuration with BR2_TOOLCHAIN_HAS_FORTRAN Samuel Martin
2016-07-01 16:29 ` [Buildroot] [PATCH v2 14/15] package/fftw: add fortran support Samuel Martin
2016-07-01 16:29 ` [Buildroot] [PATCH v2 15/15] package/lapack: new package Samuel Martin
2016-07-01 21:26 ` Thomas Petazzoni
2016-07-02 9:45 ` Samuel Martin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox