Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows archiver: also search for gcc-ar #1067

Merged
merged 1 commit into from
Aug 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 17 additions & 4 deletions src/fpm_compiler.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1065,13 +1065,26 @@ subroutine new_archiver(self, ar, echo, verbose)
if (os_type /= OS_WINDOWS .and. os_type /= OS_UNKNOWN) then
self%ar = "ar"//arflags
else
! Attempt "ar"
call execute_command_line("ar --version > "//get_temp_filename()//" 2>&1", &
& exitstat=estat)
if (estat /= 0) then
self%ar = "lib"//libflags

if (estat == 0) then

self%ar = "ar"//arflags

else
self%ar = "ar"//arflags
end if

! Then "gcc-ar"
call execute_command_line("gcc-ar --version > "//get_temp_filename()//" 2>&1", &
& exitstat=estat)

if (estat /= 0) then
self%ar = "lib"//libflags
else
self%ar = "gcc-ar"//arflags
end if
endif
end if
end if
self%use_response_file = os_type == OS_WINDOWS
Expand Down
Loading