summaryrefslogtreecommitdiff
blob: 4848c80ec663930a36fc4861f2766898405db2e3 (plain)
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
--- a/generate/unix/acpiexec/Makefile
+++ b/generate/unix/acpiexec/Makefile
@@ -256,12 +256,12 @@
 endif
 
 ifneq ($(ACPI_HOST),_QNX)
-LDFLAGS += -lpthread
+LIBS += -lpthread
 endif
 
 ifneq ($(ACPI_HOST),_APPLE)
 ifneq ($(ACPI_HOST),_QNX)
-LDFLAGS += -lrt
+LIBS += -lrt
 endif
 endif
 
--- a/generate/unix/Makefile.config
+++ b/generate/unix/Makefile.config
@@ -35,15 +35,14 @@
 .SUFFIXES :
 PROGS = acpibin acpidump acpiexamples acpiexec acpihelp acpinames acpisrc acpixtract iasl
 ACPI_HOST ?= _CYGWIN
-CC ?=    gcc
 
 #
 # Common defines
 #
 OBJDIR =     obj
 BINDIR =     bin
-COMPILEOBJ = $(CC) -c $(CFLAGS) $(OPT_CFLAGS) -o $@ $<
-LINKPROG =   $(CC) $(OBJECTS) -o $(PROG) $(LDFLAGS) $(OPT_LDFLAGS)
+COMPILEOBJ = $(CC) -c $(CFLAGS) $(CPPFLAGS) $(OPT_CFLAGS) -o $@ $<
+LINKPROG =   $(CC) $(LDFLAGS) $(OBJECTS) -o $(PROG) $(LIBS)
 PREFIX ?=    /usr
 INSTALLDIR = $(PREFIX)/bin
 UNAME_S := $(shell uname -s)
@@ -76,7 +75,7 @@
 INSTALLFLAGS ?= -f
 else
 INSTALL =    install
-INSTALLFLAGS ?= -m 555 -s
+INSTALLFLAGS ?= -m 555
 endif
 
 INSTALLPROG = \
@@ -161,26 +160,18 @@
 #
 ifeq ($(M32),TRUE)
 CFLAGS +=-m32
-LDFLAGS +=-m32
+LIBS +=-m32
 endif
 
 #
 # Optionally disable optimizations. Optimization causes problems on
 # some compilers such as gcc 4.4
 #
-ifneq ($(NOOPT),TRUE)
-OPT_CFLAGS += -O2
-else
-OPT_CFLAGS += -O0
-endif
 
 #
 # Optionally disable fortify source. This option can cause
 # compile errors in toolchains where it is already defined.
 #
-ifneq ($(NOFORTIFY),TRUE)
-OPT_CFLAGS += -D_FORTIFY_SOURCE=2
-endif
 
 CFLAGS += \
     -D$(ACPI_HOST)\
@@ -272,12 +263,12 @@
 #YACC=      byacc
 #YFLAGS +=
 #
-YACC=       bison
+YACC=       LC_ALL=C bison
 YFLAGS +=   -y
 
 MACROPROC=  m4
 MFLAGS=     -P -I$(ASL_COMPILER)
 
-LEX=        flex
+LEX=        LC_ALL=C flex
 LFLAGS +=   -i -s
 DLFLAGS +=   -i
--- a/generate/unix/Makefile.rules
+++ b/generate/unix/Makefile.rules
@@ -12,12 +12,12 @@
 
 $(PROG) : $(INTERMEDIATES) $(MISC) $(OBJECTS)
 	@echo "- Link" $(PROG)
-	@$(LINKPROG)
+	$(LINKPROG)
 	$(RENAMEPROG)
 
 $(OBJDIR)/%.o : %.c $(HEADERS) $(ACPICA_HEADERS)
 	@echo $(PROG)  $<
-	@$(COMPILEOBJ)
+	$(COMPILEOBJ)
 
 clean :
 	@rm -f $(PROG) $(PROG).exe $(OBJECTS) $(OBJDIR)/*.o $(INTERMEDIATES) $(MISC)