x86 NCG: fix regUsageOfInstr for VMOVU & friends
[ghc.git] / m4 / fp_merge_objects_supports_response_files.m4
blob2e48f3172414226cee8314792a1a26da09879c09
1 # FP_MERGE_OBJECTS_SUPPORTS_RESPONSE_FILES
2 # --------------------
3 # See if whether we are using a version of the merge objects tool which supports response files.
4 AC_DEFUN([FP_MERGE_OBJECTS_SUPPORTS_RESPONSE_FILES], [
5     AC_MSG_CHECKING([whether $LD supports response files])
6     echo 'int funA(int x) {return x;}' > conftesta.c
7     echo 'int funB(int x) {return x;}' > conftestb.c
8     "$CC" -c -o conftesta.o conftesta.c > /dev/null 2>&1
9     "$CC" -c -o conftestb.o conftestb.c > /dev/null 2>&1
10     printf -- "-o\nconftest.o\nconftesta.o\nconftestb.o\n" > args.txt
11     "$MergeObjsCmd" "$MergeObjsArgs" @args.txt > /dev/null 2>&1
12     if ("$NM" conftest.o | grep "funA" > /dev/null 2>&1) && ("$NM" conftest.o | grep "funB" > /dev/null 2>&1)
13     then
14         MergeObjsSupportsResponseFiles=YES
15         AC_MSG_RESULT([yes])
16     else
17         MergeObjsSupportsResponseFiles=NO
18         AC_MSG_RESULT([no])
19     fi
20     rm -f conftesta.c conftestb.c conftesta.o conftestb.o conftest.o args.txt
21     AC_SUBST(MergeObjsSupportsResponseFiles)