1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-23 04:23:08 +00:00
freebsd-ports/sysutils/dd_rescue/files/patch-Makefile
MANTANI Nobutaka 9d7296e12b Fix build on amd64.
PR:		192364
Submitted by:	Ivan Klymenko <fidaj@ukr.net>
MFH:		2014Q3
2014-08-06 14:11:16 +00:00

55 lines
1.7 KiB
Plaintext

--- Makefile.orig 2014-05-27 20:31:21.000000000 +0900
+++ Makefile 2014-08-06 21:41:59.000000000 +0900
@@ -6,10 +6,7 @@
DESTDIR =
-CC = gcc
-RPM_OPT_FLAGS = -Os -Wall -g -D_FORTIFY_SOURCE=2
-CFLAGS = $(RPM_OPT_FLAGS) $(EXTRA_CFLAGS) -DHAVE_CONFIG_H
-CFLAGS_OPT = $(CFLAGS) -O3
+CFLAGS_OPT = $(CFLAGS) -DHAVE_CONFIG_H
INSTALL = install
INSTALLFLAGS = -s
prefix = $(DESTDIR)/usr
@@ -32,7 +29,7 @@
LIB = lib
LIBDIR = /usr/$(LIB)
COMPILER = $(shell $(CC) --version | head -n1)
-DEFINES = -DVERSION=\"$(VERSION)\" -D__COMPILER__="\"$(COMPILER)\"" # -DPLUGSEARCH="\"$(LIBDIR)\""
+DEFINES = -DVERSION=\"$(VERSION)\" -D__COMPILER__="\"$(COMPILER)\"" -DHAVE_CONFIG_H # -DPLUGSEARCH="\"$(LIBDIR)\""
OUT = -o dd_rescue
LZOP = $(shell type -p lzop || type -P true)
@@ -46,12 +43,6 @@
HAVE_LZO=0
endif
-ifeq ($(CC),wcl386)
- CFLAGS = "-ox -wx $(EXTRA_CFLAGS)"
- DEFINES = -dMISS_STRSIGNAL -dMISS_PREAD -dVERSION=\"$(VERSION)\" -d__COMPILER__="\"$(COMPILER)\""
- OUT = ""
-endif
-
HAVE_AVX2 := $(shell echo "" | $(CC) -mavx2 -xc - 2>&1 | grep unrecognized || echo 1)
HAVE_SSE42 := $(shell echo "" | $(CC) -msse4.2 -xc - 2>&1 | grep unrecognized || echo 1)
@@ -74,7 +65,7 @@
endif
endif
-ifeq ($(MACH),x86_64)
+ifeq ($(MACH),amd64)
LIB = lib64
OBJECTS2 = find_nonzero_sse2.o
ifeq ($(HAVE_SSE42),1)
@@ -180,7 +171,7 @@
$(CC) $(CFLAGS) -DNO_LIBDL $(DEFINES) $< $(OUT) $(OBJECTS) $(OBJECTS2) $(LIBDIR)/libfallocate.a
dd_rescue: dd_rescue.c $(HEADERS) $(OBJECTS) $(OBJECTS2)
- $(CC) $(CFLAGS) $(DEFINES) $< $(OUT) $(OBJECTS) $(OBJECTS2) -ldl
+ $(CC) $(CFLAGS) $(DEFINES) $< $(OUT) $(OBJECTS) $(OBJECTS2)
md5: md5.c md5.h hash.h config.h
$(CC) $(CFLAGS_OPT) -DMD5_MAIN -o $@ $<