Package: exactimage / 1.0.2-1

Respect-CFLAGS-from-the-environment.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
From: Jakub Wilk <jwilk@debian.org>
Date: Sat, 17 Mar 2012 17:18:49 +0100
Subject: Respect CFLAGS from the environment.

Forwarded: not-needed
Last-Update: 2010-03-27
---
 Makefile | 28 +---------------------------
 1 file changed, 1 insertion(+), 27 deletions(-)

diff --git a/Makefile b/Makefile
index bb10e95..2074c42 100644
--- a/Makefile
+++ b/Makefile
@@ -6,9 +6,6 @@ X_BUILD_IMPLICIT=0
 include utility/Makefile
 X_BUILD_IMPLICIT=1
 
-# -s silcently corrupts binaries on OS X, sigh -ReneR
-CFLAGS := -Wall -O2 # -O1 -ggdb # -fsanitize=address -fsanitize=undefined
-
 # for config.h
 CPPFLAGS += -I .
 
@@ -19,31 +16,8 @@ CPPFLAGS += -I .
 cc-option = $(shell if $(CC) $(1) -S -o /dev/null -xc /dev/null \
             > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;)
 
-ifeq "$(X_ARCH)" "i686"
-CFLAGS += -march=i686
-CFLAGS += $(call cc-option,-mtune=pentium4,)
-CFLAGS += $(call cc-option,-mfpmath=sse,)
-endif
-
-# TODO: improve to match i[3456]86
-ifneq  "$(X_ARCH)" "i686"
 CFLAGS += -fPIC
-endif
-
-ifeq "$(X_ARCH)" "sparc64"
-CFLAGS += -mcpu=ultrasparc
-CFLAGS += $(call cc-option,-mtune=niagara,)
-endif
-
-CFLAGS += $(call cc-option,-march=native)
-
-CFLAGS += -funroll-loops -fomit-frame-pointer
-CFLAGS += $(call cc-option,-funswitch-loops,)
-CFLAGS += $(call cc-option,-fpeel-loops,)
-CFLAGS += $(call cc-option,-ftracer,)
-CFLAGS += $(call cc-option,-funit-at-a-time,)
-CFLAGS += $(call cc-option,-frename-registers,)
-CFLAGS += $(call cc-option,-ftree-vectorize,)
+CXXFLAGS += -fPIC
 
 # we have some unimplemented colorspaces in the Image::iterator :-(
 CFLAGS += $(call cc-option,-Wno-switch -Wno-switch-enum,)