Bug 572096 - Build core.filesystem library for arm64

Make file changes to build Mac arm64 + x86_64 universal library

XCode 12.2 or newer is required to build the universal binary, but
JavaVM framework is not available since XCode 12.2.
Removed JavaVM from Makefile.

Built the universal library on Jenkins mac slave

Change-Id: Id0228abbd3559bd42d57c811ddb97517f15a7b30
diff --git a/bundles/org.eclipse.core.filesystem.macosx/BUILD_INFO.txt b/bundles/org.eclipse.core.filesystem.macosx/BUILD_INFO.txt
index 9f56ba7..293d667 100644
--- a/bundles/org.eclipse.core.filesystem.macosx/BUILD_INFO.txt
+++ b/bundles/org.eclipse.core.filesystem.macosx/BUILD_INFO.txt
@@ -1,10 +1,10 @@
 Native Build Info:
 ------------------
 
-Platform:         iMac
-Built by:         pawel.pogorzelski@pl.ibm.com
-Build date:       21-Jan-2010
-OS Name:          Mac OS X
-OS Version:       10.5.7
-Compiler version: gcc version 4.0.1
-Java version:     Standard Edition (build 1.5.0_19-137)
\ No newline at end of file
+Platform:         Jenkins Mac slave (b9h15-macos10.15)
+Build date:       22-Mar-2021
+OS Name:          macOS
+OS Version:       10.15.7
+Compiler version: Apple clang version 12.0.0
+Java version:     jdk1.8.0_192
+Architecture:	  x86_64 and arm64 (universal binary)
\ No newline at end of file
diff --git a/bundles/org.eclipse.core.filesystem.macosx/os/macosx/libunixfile_1_0_0.jnilib b/bundles/org.eclipse.core.filesystem.macosx/os/macosx/libunixfile_1_0_0.jnilib
old mode 100644
new mode 100755
index 945bbb7..76a7420
--- a/bundles/org.eclipse.core.filesystem.macosx/os/macosx/libunixfile_1_0_0.jnilib
+++ b/bundles/org.eclipse.core.filesystem.macosx/os/macosx/libunixfile_1_0_0.jnilib
Binary files differ
diff --git a/bundles/org.eclipse.core.filesystem/natives/unix/README.TXT b/bundles/org.eclipse.core.filesystem/natives/unix/README.TXT
index 8bf350b..b0b1c8c 100644
--- a/bundles/org.eclipse.core.filesystem/natives/unix/README.TXT
+++ b/bundles/org.eclipse.core.filesystem/natives/unix/README.TXT
@@ -1,3 +1,10 @@
 This directory contains the source code for Unix-based platforms,
 including Linux and Mac OS X. These platforms
-all share the same C source, but have different makefiles.
\ No newline at end of file
+all share the same C source, but have different makefiles.
+
+The macOS library in the macosx fragment is a Mach-O universal binary with 
+2 architectures: [x86_64:Mach-O 64-bit bundle x86_64] [arm64:Mach-O 64-bit bundle arm64]
+XCode 12.2 or newer is required to build this.
+
+Command to run:
+make -f Makefile clean install
\ No newline at end of file
diff --git a/bundles/org.eclipse.core.filesystem/natives/unix/macosx/Makefile b/bundles/org.eclipse.core.filesystem/natives/unix/macosx/Makefile
old mode 100644
new mode 100755
index 4b37821..e996bb6
--- a/bundles/org.eclipse.core.filesystem/natives/unix/macosx/Makefile
+++ b/bundles/org.eclipse.core.filesystem/natives/unix/macosx/Makefile
@@ -19,12 +19,14 @@
 
 JAVA_HOME=$(shell /usr/libexec/java_home)
 
+$(info JAVA_HOME is $(JAVA_HOME))
+
 JDK_INCLUDE=-I $(JAVA_HOME)/include -I $(JAVA_HOME)/include/darwin
 MACOSX_DEPLOYMENT_TARGET=10.10
 
-FRAMEWORKS=-framework JavaVM -framework CoreServices
+FRAMEWORKS=-framework CoreServices
 # define MACOSX to include Mac OS X specific code
-CC_FLAGS=-arch x86_64 -mmacosx-version-min=10.10 -DMACOSX
+CC_FLAGS=-arch x86_64 -arch arm64 -mmacosx-version-min=10.10 -DMACOSX
 
 core:
 	cc $(JDK_INCLUDE) $(CORE.C) -o $(LIB_NAME_FULL) -bundle $(FRAMEWORKS) $(CC_FLAGS)
@@ -32,6 +34,6 @@
 clean:
 	rm -f $(LIB_NAME_FULL)
 
-install:
+install: core
 	rm -f ../../../../org.eclipse.core.filesystem.macosx/os/macosx/$(LIB_NAME_FULL)
 	mv $(LIB_NAME_FULL) ../../../../org.eclipse.core.filesystem.macosx/os/macosx/