Make gcc mandatory on OSX, since clang lacks certain GAS features

master
Harshavardhana 10 years ago
parent 3a3d9989d1
commit 3d43305b1f
  1. 7
      Makefile
  2. 2
      checkdeps.sh
  3. 4
      pkg/utils/checksum/crc32c/crc32c_amd64.S

@ -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

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
echo -n "Checking if proper environment variables are set.. "

@ -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

Loading…
Cancel
Save