aboutsummaryrefslogtreecommitdiff
path: root/src/fpm_compiler.f90
diff options
context:
space:
mode:
authorJeffrey Armstrong <jeff@approximatrix.com>2022-02-18 09:54:40 -0500
committerJeffrey Armstrong <jeff@approximatrix.com>2022-02-18 09:54:40 -0500
commitc1ab3fc41cb1962db2a6909dfd07e8f088fadb8f (patch)
tree116899bceb26c3d90218cdedc0ecb832d32f024b /src/fpm_compiler.f90
parent2c6148e0f9ceafc55da934b8b84299f05a3c030c (diff)
downloadfpm-c1ab3fc41cb1962db2a6909dfd07e8f088fadb8f.tar.gz
fpm-c1ab3fc41cb1962db2a6909dfd07e8f088fadb8f.zip
Added detection of 32bit Windows and prepend -m32 flags when detected, specific to using a mingw64 multilib compiler. Moved default location to local app data.
Diffstat (limited to 'src/fpm_compiler.f90')
-rw-r--r--src/fpm_compiler.f9016
1 files changed, 15 insertions, 1 deletions
diff --git a/src/fpm_compiler.f90 b/src/fpm_compiler.f90
index d94963c..e8e97f4 100644
--- a/src/fpm_compiler.f90
+++ b/src/fpm_compiler.f90
@@ -29,6 +29,7 @@ module fpm_compiler
use fpm_environment, only: &
get_env, &
get_os_type, &
+ os_is_32bit_windows, &
OS_LINUX, &
OS_MACOS, &
OS_WINDOWS, &
@@ -133,7 +134,8 @@ character(*), parameter :: &
flag_gnu_warn = " -Wall -Wextra -Wimplicit-interface", &
flag_gnu_check = " -fcheck=bounds -fcheck=array-temps", &
flag_gnu_limit = " -fmax-errors=1", &
- flag_gnu_external = " -Wimplicit-interface"
+ flag_gnu_external = " -Wimplicit-interface", &
+ flag_gnu_32bit = " -m32"
character(*), parameter :: &
flag_pgi_backslash = " -Mbackslash", &
@@ -194,6 +196,8 @@ function get_default_flags(self, release) result(flags)
end function get_default_flags
subroutine get_release_compile_flags(id, flags)
+ implicit none
+
integer(compiler_enum), intent(in) :: id
character(len=:), allocatable, intent(out) :: flags
@@ -215,6 +219,10 @@ subroutine get_release_compile_flags(id, flags)
flag_gnu_pic//&
flag_gnu_limit//&
flag_gnu_coarray
+
+ if(os_is_32bit_windows()) then
+ flags = flag_gnu_32bit//flags
+ end if
case(id_f95)
flags = &
@@ -286,6 +294,8 @@ subroutine get_release_compile_flags(id, flags)
end subroutine get_release_compile_flags
subroutine get_debug_compile_flags(id, flags)
+ implicit none
+
integer(compiler_enum), intent(in) :: id
character(len=:), allocatable, intent(out) :: flags
@@ -309,6 +319,10 @@ subroutine get_debug_compile_flags(id, flags)
flag_gnu_check//&
flag_gnu_backtrace//&
flag_gnu_coarray
+ if(os_is_32bit_windows()) then
+ flags = flag_gnu_32bit//flags
+ end if
+
case(id_f95)
flags = &
flag_gnu_warn//&