diff --git a/var/spack/repos/builtin/packages/qrupdate/package.py b/var/spack/repos/builtin/packages/qrupdate/package.py
index 185bd1f421b39d9395c10d04a00196f71008f16a..3f21501711104638b54eb91fbde528d4f4c5ec40 100644
--- a/var/spack/repos/builtin/packages/qrupdate/package.py
+++ b/var/spack/repos/builtin/packages/qrupdate/package.py
@@ -29,17 +29,31 @@ def edit(self, spec, prefix):
         return
 
     def install(self, spec, prefix):
+
         lapack_blas = spec['lapack'].libs + spec['blas'].libs
-        # Build static and dynamic libraries
-        make('lib', 'solib',
-             'BLAS={0}'.format(lapack_blas.ld_flags),
-             'LAPACK={0}'.format(lapack_blas.ld_flags))
-        # "INSTALL" confuses "make install" on case-insensitive filesystems
+
+        make_args = [
+            'BLAS={0}'.format(lapack_blas.ld_flags),
+            'LAPACK={0}'.format(lapack_blas.ld_flags)
+        ]
+
+        # If 64-bit BLAS is used:
+        if (spec.satisfies('^openblas+ilp64') or
+            spec.satisfies('^intel-mkl+ilp64') or
+            spec.satisfies('^intel-parallel-studio+mkl+ilp64')):
+            make_args.append('FFLAGS=-fdefault-integer-8')
+
+        # Build static and dynamic libraries:
+        make('lib', 'solib', *make_args)
+
+        # "INSTALL" confuses "make install" on case-insensitive filesystems:
         if os.path.isfile("INSTALL"):
             os.remove("INSTALL")
-        # create lib folder:
+
+        # Create lib folder:
         if (sys.platform == 'darwin'):
             mkdirp(prefix.lib)
+
         make("install", "PREFIX=%s" % prefix)
 
     @run_after('install')