iasl-20230331-Makefile.patch 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. --- a/generate/unix/acpiexec/Makefile
  2. +++ b/generate/unix/acpiexec/Makefile
  3. @@ -256,12 +256,12 @@
  4. endif
  5. ifneq ($(ACPI_HOST),_QNX)
  6. -LDFLAGS += -lpthread
  7. +LIBS += -lpthread
  8. endif
  9. ifneq ($(ACPI_HOST),_APPLE)
  10. ifneq ($(ACPI_HOST),_QNX)
  11. -LDFLAGS += -lrt
  12. +LIBS += -lrt
  13. endif
  14. endif
  15. --- a/generate/unix/Makefile.config
  16. +++ b/generate/unix/Makefile.config
  17. @@ -35,15 +35,14 @@
  18. .SUFFIXES :
  19. PROGS = acpibin acpidump acpiexamples acpiexec acpihelp acpinames acpisrc acpixtract iasl
  20. ACPI_HOST ?= _CYGWIN
  21. -CC ?= gcc
  22. #
  23. # Common defines
  24. #
  25. OBJDIR = obj
  26. BINDIR = bin
  27. -COMPILEOBJ = $(CC) -c $(CFLAGS) $(OPT_CFLAGS) -o $@ $<
  28. -LINKPROG = $(CC) $(OBJECTS) -o $(PROG) $(LDFLAGS) $(OPT_LDFLAGS)
  29. +COMPILEOBJ = $(CC) -c $(CFLAGS) $(CPPFLAGS) $(OPT_CFLAGS) -o $@ $<
  30. +LINKPROG = $(CC) $(LDFLAGS) $(OBJECTS) -o $(PROG) $(LIBS)
  31. PREFIX ?= /usr
  32. INSTALLDIR = $(PREFIX)/bin
  33. UNAME_S := $(shell uname -s)
  34. @@ -76,7 +75,7 @@
  35. INSTALLFLAGS ?= -f
  36. else
  37. INSTALL = install
  38. -INSTALLFLAGS ?= -m 555 -s
  39. +INSTALLFLAGS ?= -m 555
  40. endif
  41. INSTALLPROG = \
  42. @@ -161,26 +160,18 @@
  43. #
  44. ifeq ($(M32),TRUE)
  45. CFLAGS +=-m32
  46. -LDFLAGS +=-m32
  47. +LIBS +=-m32
  48. endif
  49. #
  50. # Optionally disable optimizations. Optimization causes problems on
  51. # some compilers such as gcc 4.4
  52. #
  53. -ifneq ($(NOOPT),TRUE)
  54. -OPT_CFLAGS += -O2
  55. -else
  56. -OPT_CFLAGS += -O0
  57. -endif
  58. #
  59. # Optionally disable fortify source. This option can cause
  60. # compile errors in toolchains where it is already defined.
  61. #
  62. -ifneq ($(NOFORTIFY),TRUE)
  63. -OPT_CFLAGS += -D_FORTIFY_SOURCE=2
  64. -endif
  65. CFLAGS += \
  66. -D$(ACPI_HOST)\
  67. @@ -272,12 +263,12 @@
  68. #YACC= byacc
  69. #YFLAGS +=
  70. #
  71. -YACC= bison
  72. +YACC= LC_ALL=C bison
  73. YFLAGS += -y
  74. MACROPROC= m4
  75. MFLAGS= -P -I$(ASL_COMPILER)
  76. -LEX= flex
  77. +LEX= LC_ALL=C flex
  78. LFLAGS += -i -s
  79. DLFLAGS += -i
  80. --- a/generate/unix/Makefile.rules
  81. +++ b/generate/unix/Makefile.rules
  82. @@ -12,12 +12,12 @@
  83. $(PROG) : $(INTERMEDIATES) $(MISC) $(OBJECTS)
  84. @echo "- Link" $(PROG)
  85. - @$(LINKPROG)
  86. + $(LINKPROG)
  87. $(RENAMEPROG)
  88. $(OBJDIR)/%.o : %.c $(HEADERS) $(ACPICA_HEADERS)
  89. @echo $(PROG) $<
  90. - @$(COMPILEOBJ)
  91. + $(COMPILEOBJ)
  92. clean :
  93. @rm -f $(PROG) $(PROG).exe $(OBJECTS) $(OBJDIR)/*.o $(INTERMEDIATES) $(MISC)