summaryrefslogtreecommitdiff
path: root/emulators/simh/files/patch-makefile
blob: 22a56620e410dfb39826d399b9ed8cb572a10474 (plain) (blame)
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
--- makefile.orig	2016-12-01 22:43:43 UTC
+++ makefile
@@ -110,7 +110,7 @@ ifeq ($(WIN32),)  #*nix Environments (&&
             PCAPLIB = wpcap
             LIBEXT = a
           else
-            LDSEARCH :=$(shell ldconfig -r | grep 'search directories' | awk '{print $$3}' | sed 's/:/ /g')
+##########            LDSEARCH :=$(shell ldconfig -r | grep 'search directories' | awk '{print $$3}' | sed 's/:/ /g')
             ifneq (,$(LDSEARCH))
               LIBPATH := $(LDSEARCH)
             endif
@@ -300,7 +300,7 @@ ifneq ($(DEBUG),)
   CFLAGS_O = -O0
   BUILD_FEATURES = - debugging support
 else
-  CFLAGS_O = -O2
+  CFLAGS_O ?= -O2
   LDFLAGS_O = 
   GCC_MAJOR_VERSION = $(firstword $(subst  ., ,$(GCC_VERSION)))
   ifneq (3,$(GCC_MAJOR_VERSION))
@@ -309,9 +309,9 @@ else
     endif
     GCC_OPTIMIZERS = $(shell $(GCC_OPTIMIZERS_CMD))
   endif
-  ifneq (,$(findstring $(GCC_VERSION),$(LTO_EXCLUDE_VERSIONS)))
-    NO_LTO = 1
-  endif
+#  ifneq (,$(findstring $(GCC_VERSION),$(LTO_EXCLUDE_VERSIONS)))
+#    NO_LTO = 1
+#  endif
   ifneq (,$(findstring -finline-functions,$(GCC_OPTIMIZERS)))
     CFLAGS_O += -finline-functions
   endif
@@ -330,12 +330,14 @@ else
   ifneq (,$(findstring -fstrict-overflow,$(GCC_OPTIMIZERS)))
     CFLAGS_O += -fno-strict-overflow
   endif
-  ifeq (,$(NO_LTO))
-    ifneq (,$(findstring -flto,$(GCC_OPTIMIZERS)))
-      CFLAGS_O += -flto -fwhole-program
-      LDFLAGS_O += -flto -fwhole-program
-    endif
-  endif
+#  ifeq (,$(NO_LTO))
+#    ifneq (,$(findstring -flto,$(GCC_OPTIMIZERS)))
+#      ifneq (,$(findstring -fwhole-program,$(GCC_OPTIMIZERS)))
+#        CFLAGS_O += -flto -fwhole-program
+#        LDFLAGS_O += -flto -fwhole-program
+#      endif
+#    endif
+#  endif
   BUILD_FEATURES = - compiler optimizations and no debugging support
 endif
 ifneq (3,$(GCC_MAJOR_VERSION))