-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add codesigning and full ARM support
- Loading branch information
Showing
12 changed files
with
239 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,5 @@ project.xcworkspace | |
xcuserdata | ||
clang-analyze | ||
build | ||
Dist/acpica | ||
Dist/iasl-*.* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,136 @@ | ||
diff --git a/generate/unix/Makefile.config b/generate/unix/Makefile.config | ||
index 63be0df86..fd262fe9b 100644 | ||
--- a/generate/unix/Makefile.config | ||
+++ b/generate/unix/Makefile.config | ||
@@ -11,7 +11,7 @@ | ||
# Configuration | ||
# | ||
HOST = _CYGWIN | ||
-CC = gcc-4 | ||
+CC = gcc | ||
ACPICA_SRC = ../../../source | ||
DIRS = acpiexec acpisrc acpixtract iasl | ||
|
||
@@ -24,13 +24,13 @@ ACPICA_CORE = $(ACPICA_SRC)/components | ||
ACPICA_TOOLS = $(ACPICA_SRC)/tools | ||
ACPICA_OSL = $(ACPICA_SRC)/os_specific/service_layers | ||
COMPILE = $(CC) -c $(CFLAGS) $(CWARNINGFLAGS) -o$@ $? | ||
-COPYPROG = @mkdir -p ../bin; rm -f ../bin/$(PROG); cp --remove-destination $(PROG) ../bin | ||
+COPYPROG = @mkdir -p ../bin; rm -f ../bin/$(PROG); cp $(PROG) ../bin | ||
|
||
# | ||
# Common compiler flags. The warning flags in addition to -Wall are not | ||
# automatically included in -Wall. | ||
# | ||
-CFLAGS+= -Os -D$(HOST) -I$(ACPICA_SRC)/include | ||
+CFLAGS+= -D$(HOST) -I$(ACPICA_SRC)/include | ||
CWARNINGFLAGS = \ | ||
-ansi -D_ANSI \ | ||
-Wall \ | ||
@@ -54,14 +54,13 @@ CWARNINGFLAGS+= \ | ||
-Waggregate-return \ | ||
-Wchar-subscripts \ | ||
-Wempty-body \ | ||
- -Wlogical-op \ | ||
-Wmissing-declarations \ | ||
-Wmissing-field-initializers \ | ||
- -Wmissing-parameter-type \ | ||
-Wnested-externs \ | ||
- -Wold-style-declaration \ | ||
-Wold-style-definition \ | ||
-Wredundant-decls \ | ||
+ -Wno-format-nonliteral \ | ||
+ -Wno-deprecated-declarations \ | ||
-Wtype-limits | ||
|
||
# | ||
diff --git a/generate/unix/iasl/Makefile b/generate/unix/iasl/Makefile | ||
index 9da637c67..ea79b519c 100644 | ||
--- a/generate/unix/iasl/Makefile | ||
+++ b/generate/unix/iasl/Makefile | ||
@@ -149,7 +149,7 @@ aslcompilerlex.c : $(ASL_COMPILER)/aslcompiler.l | ||
|
||
aslcompilerparse.c : $(ASL_COMPILER)/aslcompiler.y | ||
${YACC} ${YFLAGS} -o$@ $? | ||
- @mv -f aslcompilerparse.h aslcompiler.y.h | ||
+ @cp aslcompilerparse.h aslcompiler.y.h | ||
|
||
# | ||
# Parser and Lexer - final object files | ||
diff --git a/source/include/platform/accygwin.h b/source/include/platform/accygwin.h | ||
index 693602483..cf6ae9061 100644 | ||
--- a/source/include/platform/accygwin.h | ||
+++ b/source/include/platform/accygwin.h | ||
@@ -116,6 +116,8 @@ | ||
#ifndef __ACCYGWIN_H__ | ||
#define __ACCYGWIN_H__ | ||
|
||
+#include <pthread.h> | ||
+ | ||
/* | ||
* ACPICA configuration | ||
*/ | ||
@@ -136,7 +138,7 @@ | ||
#include <ctype.h> | ||
#include <unistd.h> | ||
|
||
-#if defined(__ia64__) || defined(__x86_64__) | ||
+#if defined(__ia64__) || defined(__x86_64__) || defined(__arm64__) | ||
#define ACPI_MACHINE_WIDTH 64 | ||
#define COMPILER_DEPENDENT_INT64 long | ||
#define COMPILER_DEPENDENT_UINT64 unsigned long | ||
diff --git a/source/os_specific/service_layers/osunixxf.c b/source/os_specific/service_layers/osunixxf.c | ||
index e62ed738b..8cf0657d6 100644 | ||
--- a/source/os_specific/service_layers/osunixxf.c | ||
+++ b/source/os_specific/service_layers/osunixxf.c | ||
@@ -528,8 +528,23 @@ AcpiOsCreateSemaphore ( | ||
return (AE_BAD_PARAMETER); | ||
} | ||
|
||
- Sem = AcpiOsAllocate (sizeof (sem_t)); | ||
+#ifdef __APPLE__ | ||
+ { | ||
+ static int SemaphoreCount = 0; | ||
+ char SemaphoreName[32]; | ||
|
||
+ snprintf (SemaphoreName, sizeof (SemaphoreName), "acpi_sem_%d", | ||
+ SemaphoreCount++); | ||
+ Sem = sem_open (SemaphoreName, O_EXCL|O_CREAT, 0755, InitialUnits); | ||
+ if (!Sem) | ||
+ { | ||
+ return (AE_NO_MEMORY); | ||
+ } | ||
+ sem_unlink (SemaphoreName); /* This just deletes the name */ | ||
+ } | ||
+ | ||
+#else | ||
+ Sem = AcpiOsAllocate (sizeof (sem_t)); | ||
if (!Sem) | ||
{ | ||
return (AE_NO_MEMORY); | ||
@@ -540,6 +555,7 @@ AcpiOsCreateSemaphore ( | ||
AcpiOsFree (Sem); | ||
return (AE_BAD_PARAMETER); | ||
} | ||
+#endif | ||
|
||
*OutHandle = (ACPI_HANDLE) Sem; | ||
return (AE_OK); | ||
@@ -570,10 +586,17 @@ AcpiOsDeleteSemaphore ( | ||
return (AE_BAD_PARAMETER); | ||
} | ||
|
||
+#ifdef __APPLE__ | ||
+ if (sem_close (Sem) == -1) | ||
+ { | ||
+ return (AE_BAD_PARAMETER); | ||
+ } | ||
+#else | ||
if (sem_destroy (Sem) == -1) | ||
{ | ||
return (AE_BAD_PARAMETER); | ||
} | ||
+#endif | ||
|
||
return (AE_OK); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#!/bin/bash | ||
|
||
rm -rf acpica iasl* | ||
|
||
git clone https://github.com/acpica/acpica || exit 1 | ||
cd acpica || exit 1 | ||
git checkout 6afc9c9921265a74062861718087e3321082ca3a || exit 1 | ||
git apply ../acpica-legacy.diff || exit 1 | ||
cd generate/unix/iasl || exit 1 | ||
CC=clang CFLAGS="-mmacosx-version-min=10.7 -O3" \ | ||
LDFLAGS="-mmacosx-version-min=10.7" make || exit 1 | ||
cp iasl ../../../../iasl-legacy.x86_64 || exit 1 | ||
CC=clang CFLAGS="-mmacosx-version-min=10.7 -O3" \ | ||
LDFLAGS="-mmacosx-version-min=10.7" make clean || exit 1 | ||
CFLAGS="-mmacosx-version-min=10.7 -O3 -target arm64-apple-darwin" \ | ||
LDFLAGS="-mmacosx-version-min=10.7 -target arm64-apple-darwin" make || exit 1 | ||
cp iasl ../../../../iasl-legacy.arm64 || exit 1 | ||
cd ../../../../ || exit 1 | ||
lipo -create iasl-legacy.x86_64 iasl-legacy.arm64 -output iasl-legacy || exit 1 | ||
|
||
rm -rf acpica || exit 1 | ||
|
||
git clone https://github.com/acpica/acpica || exit 1 | ||
cd acpica || exit 1 | ||
git checkout R09_25_20 || exit 1 | ||
CC=clang CFLAGS="-mmacosx-version-min=10.7 -O3" \ | ||
LDFLAGS="-mmacosx-version-min=10.7" make iasl || exit 1 | ||
cp generate/unix/bin/iasl ../iasl-stable.x86_64 || exit 1 | ||
CC=clang CFLAGS="-mmacosx-version-min=10.7 -O3" \ | ||
LDFLAGS="-mmacosx-version-min=10.7" make clean || exit 1 | ||
CFLAGS="-mmacosx-version-min=10.7 -O3 -target arm64-apple-darwin" \ | ||
LDFLAGS="-mmacosx-version-min=10.7 -target arm64-apple-darwin" make iasl || exit 1 | ||
cp generate/unix/bin/iasl ../iasl-stable.arm64 || exit 1 | ||
cd .. || exit 1 | ||
lipo -create iasl-stable.x86_64 iasl-stable.arm64 -output iasl-stable || exit 1 | ||
|
||
rm -rf acpica || exit 1 | ||
|
||
git clone https://github.com/acpica/acpica || exit 1 | ||
cd acpica || exit 1 | ||
git checkout R03_31_21 || exit 1 | ||
CC=clang CFLAGS="-mmacosx-version-min=10.7 -O3" \ | ||
LDFLAGS="-mmacosx-version-min=10.7" make iasl || exit 1 | ||
cp generate/unix/bin/iasl ../iasl-dev.x86_64 || exit 1 | ||
CC=clang CFLAGS="-mmacosx-version-min=10.7 -O3" \ | ||
LDFLAGS="-mmacosx-version-min=10.7" make clean || exit 1 | ||
CFLAGS="-mmacosx-version-min=10.7 -O3 -target arm64-apple-darwin" \ | ||
LDFLAGS="-mmacosx-version-min=10.7 -target arm64-apple-darwin" make iasl || exit 1 | ||
cp generate/unix/bin/iasl ../iasl-dev.arm64 || exit 1 | ||
cd .. || exit 1 | ||
lipo -create iasl-dev.x86_64 iasl-dev.arm64 -output iasl-dev || exit 1 |
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters