Skip to content

Commit

Permalink
[build] Better detection if gcc is used in the mingw environment, fixes
Browse files Browse the repository at this point in the history
#371

 - Apparently sometimes clang is used with -gcc prefix and the use-unaligned-vector-move fails
  • Loading branch information
fador committed Sep 28, 2023
1 parent aab6aa9 commit 8523c96
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,16 @@ AS_CASE([$host_os],
AS_CASE([$CC], [*gcc],[
AX_CHECK_COMPILE_FLAG([-Wa,-muse-unaligned-vector-move],
[CFLAGS="-Wa,-muse-unaligned-vector-move $CFLAGS"],
[AC_MSG_ERROR([-Wa,-muse-unaligned-vector-move not supported, required with mingw+gcc to fix alignment bugs, update the used gcc])]
[
AC_MSG_CHECKING([if compiler is gcc])
AS_IF([$CC --version | grep "gcc" >/dev/null 2>&1], [
AS_ECHO(["yes"])
AC_MSG_ERROR([-Wa,-muse-unaligned-vector-move not supported, required with mingw+gcc to fix alignment bugs, update the used gcc])
],[
AS_ECHO(["no"])
AS_ECHO(["Compiler not gcc, -Wa,-muse-unaligned-vector-move not needed"])
])
]
)
])
AS_IF(
Expand Down

0 comments on commit 8523c96

Please sign in to comment.