mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Bug 576533: Add support for Mac M1
-framework JavaVM is no longer needed for a while and in latest Xcode is removed as an option x86 on macOS is no longer supported by recent Xcode, so drop it from CDT. x86 hasn't been supported in Platform for a while, so it wasn't actually usable. Change-Id: I149722b168fe9819ee334d4afd25ae624b1664c5
This commit is contained in:
parent
fa8a6279d2
commit
13cdd8ada7
12 changed files with 36 additions and 21 deletions
BIN
core/org.eclipse.cdt.core.macosx/os/macosx/aarch64/libpty.jnilib
Executable file
BIN
core/org.eclipse.cdt.core.macosx/os/macosx/aarch64/libpty.jnilib
Executable file
Binary file not shown.
BIN
core/org.eclipse.cdt.core.macosx/os/macosx/aarch64/libspawner.jnilib
Executable file
BIN
core/org.eclipse.cdt.core.macosx/os/macosx/aarch64/libspawner.jnilib
Executable file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -40,6 +40,11 @@
|
|||
<ws>cocoa</ws>
|
||||
<arch>x86_64</arch>
|
||||
</environment>
|
||||
<environment>
|
||||
<os>macosx</os>
|
||||
<ws>cocoa</ws>
|
||||
<arch>aarch64</arch>
|
||||
</environment>
|
||||
</environments>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
|
|
@ -24,7 +24,7 @@ OS_DIR_LINUX_X86_64 := ../../org.eclipse.cdt.core.linux.x86_64/os/linux/x86_64
|
|||
OS_DIR_LINUX_AARCH64 := ../../org.eclipse.cdt.core.linux.aarch64/os/linux/aarch64
|
||||
OS_DIR_LINUX_PPC64LE := ../../org.eclipse.cdt.core.linux.ppc64le/os/linux/ppc64le
|
||||
OS_DIR_MACOS_X86_64 := ../../org.eclipse.cdt.core.macosx/os/macosx/x86_64
|
||||
OS_DIR_MACOS_X86 := ../../org.eclipse.cdt.core.macosx/os/macosx/x86
|
||||
OS_DIR_MACOS_AARCH64 := ../../org.eclipse.cdt.core.macosx/os/macosx/aarch64
|
||||
|
||||
COMMON_CFLAGS := -Wall -pedantic -Werror
|
||||
|
||||
|
@ -42,15 +42,15 @@ LIBS = \
|
|||
$(OS_DIR_LINUX_PPC64LE)/libpty.so \
|
||||
$(OS_DIR_MACOS_X86_64)/libspawner.jnilib \
|
||||
$(OS_DIR_MACOS_X86_64)/libpty.jnilib \
|
||||
$(OS_DIR_MACOS_X86)/libspawner.jnilib \
|
||||
$(OS_DIR_MACOS_X86)/libpty.jnilib
|
||||
$(OS_DIR_MACOS_AARCH64)/libspawner.jnilib \
|
||||
$(OS_DIR_MACOS_AARCH64)/libpty.jnilib
|
||||
else
|
||||
ifeq ($(UNAME),Darwin)
|
||||
LIBS = \
|
||||
$(OS_DIR_MACOS_X86_64)/libspawner.jnilib \
|
||||
$(OS_DIR_MACOS_X86_64)/libpty.jnilib \
|
||||
$(OS_DIR_MACOS_X86)/libspawner.jnilib \
|
||||
$(OS_DIR_MACOS_X86)/libpty.jnilib
|
||||
$(OS_DIR_MACOS_AARCH64)/libspawner.jnilib \
|
||||
$(OS_DIR_MACOS_AARCH64)/libpty.jnilib
|
||||
else
|
||||
LIBS = \
|
||||
$(OS_DIR_WIN32_X86_64)/starter.exe \
|
||||
|
@ -68,8 +68,8 @@ rebuild: clean all
|
|||
|
||||
MAC_TO_SIGN=$(OS_DIR_MACOS_X86_64)/libspawner.jnilib \
|
||||
$(OS_DIR_MACOS_X86_64)/libpty.jnilib \
|
||||
$(OS_DIR_MACOS_X86)/libspawner.jnilib \
|
||||
$(OS_DIR_MACOS_X86)/libpty.jnilib
|
||||
$(OS_DIR_MACOS_AARCH64)/libspawner.jnilib \
|
||||
$(OS_DIR_MACOS_AARCH64)/libpty.jnilib
|
||||
WIN_TO_SIGN=$(OS_DIR_WIN32_X86_64)/starter.exe \
|
||||
$(OS_DIR_WIN32_X86_64)/spawner.dll \
|
||||
$(OS_DIR_WIN32_X86_64)/pty.dll
|
||||
|
@ -169,29 +169,29 @@ $(OS_DIR_LINUX_PPC64LE)/libpty.so: unix/openpty.c unix/pty.c unix/ptyio.c
|
|||
# macos x86_64
|
||||
$(OS_DIR_MACOS_X86_64)/libspawner.jnilib: unix/spawner.c unix/io.c unix/exec_unix.c unix/exec_pty.c unix/openpty.c unix/pfind.c
|
||||
mkdir -p $(dir $@) && \
|
||||
x86_64-apple-darwin17-clang $(COMMON_CFLAGS) -o $@ -arch x86_64 -Iinclude -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/darwin -fPIC \
|
||||
x86_64-apple-darwin21.1-clang $(COMMON_CFLAGS) -o $@ -arch x86_64 -Iinclude -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/darwin -fPIC \
|
||||
-D_REENTRANT \
|
||||
$^ \
|
||||
-dynamiclib -lc -framework JavaVM
|
||||
-dynamiclib -lc
|
||||
|
||||
$(OS_DIR_MACOS_X86_64)/libpty.jnilib: unix/openpty.c unix/pty.c unix/ptyio.c
|
||||
mkdir -p $(dir $@) && \
|
||||
x86_64-apple-darwin17-clang $(COMMON_CFLAGS) -o $@ -arch x86_64 -Iinclude -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/darwin -fPIC \
|
||||
x86_64-apple-darwin21.1-clang $(COMMON_CFLAGS) -o $@ -arch x86_64 -Iinclude -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/darwin -fPIC \
|
||||
-D_REENTRANT \
|
||||
$^ \
|
||||
-dynamiclib -lc -framework JavaVM
|
||||
-dynamiclib -lc
|
||||
|
||||
# macos x86
|
||||
$(OS_DIR_MACOS_X86)/libspawner.jnilib: unix/spawner.c unix/io.c unix/exec_unix.c unix/exec_pty.c unix/openpty.c unix/pfind.c
|
||||
# macos aarch64
|
||||
$(OS_DIR_MACOS_AARCH64)/libspawner.jnilib: unix/spawner.c unix/io.c unix/exec_unix.c unix/exec_pty.c unix/openpty.c unix/pfind.c
|
||||
mkdir -p $(dir $@) && \
|
||||
x86_64-apple-darwin17-clang $(COMMON_CFLAGS) -o $@ -arch i386 -Iinclude -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/darwin -fPIC \
|
||||
arm64-apple-darwin21.1-clang $(COMMON_CFLAGS) -o $@ -arch arm64 -Iinclude -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/darwin -fPIC \
|
||||
-D_REENTRANT \
|
||||
$^ \
|
||||
-dynamiclib -lc -framework JavaVM
|
||||
-dynamiclib -lc
|
||||
|
||||
$(OS_DIR_MACOS_X86)/libpty.jnilib: unix/openpty.c unix/pty.c unix/ptyio.c
|
||||
$(OS_DIR_MACOS_AARCH64)/libpty.jnilib: unix/openpty.c unix/pty.c unix/ptyio.c
|
||||
mkdir -p $(dir $@) && \
|
||||
x86_64-apple-darwin17-clang $(COMMON_CFLAGS) -o $@ -arch i386 -Iinclude -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/darwin -fPIC \
|
||||
arm64-apple-darwin21.1-clang $(COMMON_CFLAGS) -o $@ -arch arm64 -Iinclude -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/darwin -fPIC \
|
||||
-D_REENTRANT \
|
||||
$^ \
|
||||
-dynamiclib -lc -framework JavaVM
|
||||
-dynamiclib -lc
|
||||
|
|
|
@ -31,7 +31,8 @@ LIBS = \
|
|||
$(OS_DIR)/linux/x86_64/libserial.so \
|
||||
$(OS_DIR)/linux/aarch64/libserial.so \
|
||||
$(OS_DIR)/linux/ppc64le/libserial.so \
|
||||
$(OS_DIR)/macosx/x86_64/libserial.jnilib
|
||||
$(OS_DIR)/macosx/x86_64/libserial.jnilib \
|
||||
$(OS_DIR)/macosx/aarch64/libserial.jnilib
|
||||
else
|
||||
ifeq ($(UNAME),Darwin)
|
||||
LIBS = \
|
||||
|
@ -47,7 +48,7 @@ all: $(LIBS)
|
|||
clean :
|
||||
$(RM) $(LIBS)
|
||||
|
||||
MAC_TO_SIGN=$(OS_DIR)/macosx/x86_64/libserial.jnilib
|
||||
MAC_TO_SIGN=$(OS_DIR)/macosx/x86_64/libserial.jnilib $(OS_DIR)/macosx/aarch64/libserial.jnilib
|
||||
WIN_TO_SIGN=$(OS_DIR)/win32/x86_64/serial.dll
|
||||
### This block of code also exists in core/org.eclipse.cdt.core.native/native_src/Makefile
|
||||
TMPDIR := $(shell mktemp -d -t production-XXXXXXXXXX)
|
||||
|
@ -93,4 +94,8 @@ $(OS_DIR)/linux/ppc64le/libserial.so: serial.c
|
|||
|
||||
$(OS_DIR)/macosx/x86_64/libserial.jnilib: serial.c
|
||||
mkdir -p $(dir $@) && \
|
||||
x86_64-apple-darwin17-clang $(COMMON_CFLAGS) $(CFLAGS) -Iinclude -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/darwin $(LDFLAGS) -dynamiclib -o $@ $^
|
||||
x86_64-apple-darwin21.1-clang $(COMMON_CFLAGS) $(CFLAGS) -Iinclude -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/darwin $(LDFLAGS) -dynamiclib -o $@ $^
|
||||
|
||||
$(OS_DIR)/macosx/aarch64/libserial.jnilib: serial.c
|
||||
mkdir -p $(dir $@) && \
|
||||
arm64-apple-darwin21.1-clang $(COMMON_CFLAGS) $(CFLAGS) -Iinclude -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/darwin $(LDFLAGS) -dynamiclib -o $@ $^
|
||||
|
|
BIN
native/org.eclipse.cdt.native.serial/os/macosx/aarch64/libserial.jnilib
Executable file
BIN
native/org.eclipse.cdt.native.serial/os/macosx/aarch64/libserial.jnilib
Executable file
Binary file not shown.
Binary file not shown.
5
pom.xml
5
pom.xml
|
@ -673,6 +673,11 @@
|
|||
<ws>cocoa</ws>
|
||||
<arch>x86_64</arch>
|
||||
</environment>
|
||||
<environment>
|
||||
<os>macosx</os>
|
||||
<ws>cocoa</ws>
|
||||
<arch>aarch64</arch>
|
||||
</environment>
|
||||
</environments>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
|
Loading…
Add table
Reference in a new issue