gcc: fix cross built gcc-fortran OMP modules

When cross compiling gcc the OMP support modules for gcc-fortran are
not built / installed. As a workaround copy the cross compiler's
modules and header files to the destdir.

Closes: #12204
Signed-off-by: Jürgen Buchmüller <pullmoll@t-online.de>
This commit is contained in:
Jürgen Buchmüller 2019-06-17 15:39:43 +02:00
parent b149a1e064
commit aa7f7c654a
No known key found for this signature in database
GPG key ID: DE55AD8DBEBB4EE8

View file

@ -7,7 +7,7 @@ _isl_version=0.19
pkgname=gcc
version=${_majorver}.0
revision=1
revision=2
short_desc="GNU Compiler Collection"
maintainer="Juan RP <xtraeme@voidlinux.org>"
homepage="http://gcc.gnu.org"
@ -446,6 +446,16 @@ gcc-fortran_package() {
vmove usr/lib/gcc/${_triplet}/${_majorver}/f951
vmove usr/lib/gcc/${_triplet}/${_majorver}/libcaf_single.a
vmove usr/lib/gcc/${_triplet}/${_majorver}/finclude
if [ "$CROSS_BUILD" ]; then
# A number of OMP modules are not built when cross
# compiling gcc. Copy them from the cross compiler.
local src="/usr/lib/gcc/${_triplet}/${version}/finclude"
local dst="usr/lib/gcc/${_triplet}/${_majorver}/finclude"
for f in omp_lib.f90 omp_lib.h omp_lib.mod omp_lib_kinds.mod \
openacc.f90 openacc.mod openacc_kinds.mod openacc_lib.h; do
vinstall ${src}/${f} 644 ${dst}/
done
fi
vmove usr/share/info/gfortran.info
touch ${PKGDESTDIR}/usr/share/info/dir
vmove usr/share/man/man1/gfortran.1