Ticket #42869: patch-configure-clang.diff

File patch-configure-clang.diff, 993 bytes (added by ddennedy (Dan Dennedy), 11 years ago)
  • configure

    diff --git a/configure b/configure
    index eb20880..7f230ce 100755
    a b build_config() 
    8181                if [ "$optimisations" = "true" ]
    8282                then
    8383                        echo "OPTIMISATIONS=-O2 -pipe"
    84                         # Since gcc 4.6, this optimization enabled with -O1 causes filter_line_sse2 to crash.
    85                         echo "OPTIMISATIONS+=-fno-tree-dominator-opts"
    86                         # Since gcc 4.6, this optimization enabled with -O2 causes filter_line_sse2 to crash.
    87                         echo "OPTIMISATIONS+=-fno-tree-pre"
     84                        "$CC" --version | grep gcc >/dev/null
     85                        if [ "$?" = "0" ]; then
     86                                # Since gcc 4.6, this optimization enabled with -O1 causes filter_line_sse2 to crash.
     87                                echo "OPTIMISATIONS+=-fno-tree-dominator-opts"
     88                                # Since gcc 4.6, this optimization enabled with -O2 causes filter_line_sse2 to crash.
     89                                echo "OPTIMISATIONS+=-fno-tree-pre"
     90                        fi
    8891                fi
    8992
    9093                echo "CFLAGS+=-Wall -DPIC \$(TARGETARCH) \$(TARGETCPU) \$(OPTIMISATIONS) \$(MMX_FLAGS) \$(SSE_FLAGS) \$(SSE2_FLAGS) \$(DEBUG_FLAGS) \$(LARGE_FILE)"