diff --git a/Makefile b/Makefile index e2d713871..80ab9e08c 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,7 @@ #GOPATH := $(CURDIR)/tmp/gopath MAKE_OPTIONS := -s ARCH := $(shell uname -s) +GCCVERSIONGTEQ4 := $(shell expr `gcc -dumpversion | cut -f1 -d.` \>= 4) all: getdeps install @@ -19,7 +20,11 @@ build-utils: @godep go test -race -coverprofile=cover.out github.com/minio-io/minio/pkg/utils/crypto/sha1 @godep go test -race -coverprofile=cover.out github.com/minio-io/minio/pkg/utils/crypto/sha256 @godep go test -race -coverprofile=cover.out github.com/minio-io/minio/pkg/utils/crypto/sha512 -ifeq ($(ARCH), Linux) +ifeq ($(ARCH), Darwin) +ifeq ($(GCCVERSIONGTEQ4), "1") + @godep go test -race -coverprofile=cover.out github.com/minio-io/minio/pkg/utils/checksum/crc32c +endif +else @godep go test -race -coverprofile=cover.out github.com/minio-io/minio/pkg/utils/checksum/crc32c endif diff --git a/checkdeps.sh b/checkdeps.sh index 10825f9cc..e1081d790 100755 --- a/checkdeps.sh +++ b/checkdeps.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash echo -n "Checking if proper environment variables are set.. " diff --git a/pkg/utils/checksum/crc32c/crc32c_amd64.S b/pkg/utils/checksum/crc32c/crc32c_amd64.S index e3a683cd5..2b4c9b272 100644 --- a/pkg/utils/checksum/crc32c/crc32c_amd64.S +++ b/pkg/utils/checksum/crc32c/crc32c_amd64.S @@ -454,22 +454,18 @@ full_block: crc_array: i=128 .rept 128-1 -#if !defined(__clang__) .altmacro LABEL crc_ %i .noaltmacro -#endif crc32q -i*8(block_0), crc_init crc32q -i*8(block_1), crc1 crc32q -i*8(block_2), crc2 i=(i-1) .endr -#if !defined(__clang__) .altmacro LABEL crc_ %i .noaltmacro -#endif crc32q -i*8(block_0), crc_init crc32q -i*8(block_1), crc1 # SKIP crc32 -i*8(block_2), crc2 ; Don't do this one yet