Bug 578950 - Add LoongArch64 support

Change-Id: I7ffa12f3aa08e6001a6fa85831bdc28c0f549a05
Reviewed-on: https://git.eclipse.org/r/c/platform/eclipse.platform.resources/+/191179
Tested-by: Platform Bot <platform-bot@eclipse.org>
Reviewed-by: Alexander Kurtakov <akurtako@redhat.com>
diff --git a/bundles/org.eclipse.core.filesystem.linux.loongarch64/.project b/bundles/org.eclipse.core.filesystem.linux.loongarch64/.project
new file mode 100644
index 0000000..f0f504d
--- /dev/null
+++ b/bundles/org.eclipse.core.filesystem.linux.loongarch64/.project
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.core.filesystem.linux.loongarch64</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+	</natures>
+</projectDescription>
diff --git a/bundles/org.eclipse.core.filesystem.linux.loongarch64/.settings/org.eclipse.core.runtime.prefs b/bundles/org.eclipse.core.filesystem.linux.loongarch64/.settings/org.eclipse.core.runtime.prefs
new file mode 100644
index 0000000..5a0ad22
--- /dev/null
+++ b/bundles/org.eclipse.core.filesystem.linux.loongarch64/.settings/org.eclipse.core.runtime.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+line.separator=\n
diff --git a/bundles/org.eclipse.core.filesystem.linux.loongarch64/META-INF/MANIFEST.MF b/bundles/org.eclipse.core.filesystem.linux.loongarch64/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..f24728e
--- /dev/null
+++ b/bundles/org.eclipse.core.filesystem.linux.loongarch64/META-INF/MANIFEST.MF
@@ -0,0 +1,9 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %fragmentName
+Bundle-SymbolicName: org.eclipse.core.filesystem.linux.loongarch64;singleton:=true
+Bundle-Version: 1.4.100.qualifier
+Bundle-Vendor: %providerName
+Fragment-Host: org.eclipse.core.filesystem;bundle-version="[1.1.0,2.0.0)"
+Bundle-Localization: fragment
+Eclipse-PlatformFilter: (& (osgi.os=linux) (osgi.arch=loongarch64))
diff --git a/bundles/org.eclipse.core.filesystem.linux.loongarch64/about.html b/bundles/org.eclipse.core.filesystem.linux.loongarch64/about.html
new file mode 100644
index 0000000..164f781
--- /dev/null
+++ b/bundles/org.eclipse.core.filesystem.linux.loongarch64/about.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>About</title>
+</head>
+<body lang="EN-US">
+	<h2>About This Content</h2>
+
+	<p>November 30, 2017</p>
+	<h3>License</h3>
+
+	<p>
+		The Eclipse Foundation makes available all content in this plug-in
+		(&quot;Content&quot;). Unless otherwise indicated below, the Content
+		is provided to you under the terms and conditions of the Eclipse
+		Public License Version 2.0 (&quot;EPL&quot;). A copy of the EPL is
+		available at <a href="http://www.eclipse.org/legal/epl-2.0">http://www.eclipse.org/legal/epl-2.0</a>.
+		For purposes of the EPL, &quot;Program&quot; will mean the Content.
+	</p>
+
+	<p>
+		If you did not receive this Content directly from the Eclipse
+		Foundation, the Content is being redistributed by another party
+		(&quot;Redistributor&quot;) and different terms and conditions may
+		apply to your use of any object code in the Content. Check the
+		Redistributor's license that was provided with the Content. If no such
+		license exists, contact the Redistributor. Unless otherwise indicated
+		below, the terms and conditions of the EPL still apply to any source
+		code in the Content and such source code may be obtained at <a
+			href="http://www.eclipse.org/">http://www.eclipse.org</a>.
+	</p>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/bundles/org.eclipse.core.filesystem.linux.loongarch64/build.properties b/bundles/org.eclipse.core.filesystem.linux.loongarch64/build.properties
new file mode 100644
index 0000000..f4b485d
--- /dev/null
+++ b/bundles/org.eclipse.core.filesystem.linux.loongarch64/build.properties
@@ -0,0 +1,19 @@
+###############################################################################
+# Copyright (c) 2022 Loongson Technology Co.Ltd and others.
+#
+# This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License 2.0
+# which accompanies this distribution, and is available at
+# https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
+#
+# Contributors:
+#     Loongson Technology Co.Ltd - initial API and implementation
+###############################################################################
+bin.includes = META-INF/,\
+               about.html,\
+               os/,\
+               fragment.properties
+src.includes = about.html
+generateSourceBundle=false
diff --git a/bundles/org.eclipse.core.filesystem.linux.loongarch64/fragment.properties b/bundles/org.eclipse.core.filesystem.linux.loongarch64/fragment.properties
new file mode 100644
index 0000000..f2b43db
--- /dev/null
+++ b/bundles/org.eclipse.core.filesystem.linux.loongarch64/fragment.properties
@@ -0,0 +1,15 @@
+###############################################################################
+# Copyright (c) 2022 Loongson Technology Co.Ltd and others.
+#
+# This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License 2.0
+# which accompanies this distribution, and is available at
+# https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
+#
+# Contributors:
+#     Loongson Technology Co.Ltd - initial API and implementation
+###############################################################################
+fragmentName = Core File System for Linux LoongArch64 bit
+providerName = Eclipse.org
diff --git a/bundles/org.eclipse.core.filesystem.linux.loongarch64/os/linux/loongarch64/libunixfile_1_0_0.so b/bundles/org.eclipse.core.filesystem.linux.loongarch64/os/linux/loongarch64/libunixfile_1_0_0.so
new file mode 100755
index 0000000..6bb6746
--- /dev/null
+++ b/bundles/org.eclipse.core.filesystem.linux.loongarch64/os/linux/loongarch64/libunixfile_1_0_0.so
Binary files differ
diff --git a/bundles/org.eclipse.core.filesystem.linux.loongarch64/pom.xml b/bundles/org.eclipse.core.filesystem.linux.loongarch64/pom.xml
new file mode 100644
index 0000000..c00e980
--- /dev/null
+++ b/bundles/org.eclipse.core.filesystem.linux.loongarch64/pom.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright (c) 2022 Loongson Technology Co.Ltd and others.
+  All rights reserved. This program and the accompanying materials
+  are made available under the terms of the Eclipse Distribution License v1.0
+  which accompanies this distribution, and is available at
+  http://www.eclipse.org/org/documents/edl-v10.php
+ 
+  Contributors:
+     Loongson Technology Co.Ltd - initial implementation
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <artifactId>eclipse.platform.resources</artifactId>
+    <groupId>org.eclipse.platform</groupId>
+    <version>4.23.0-SNAPSHOT</version>
+    <relativePath>../../</relativePath>
+  </parent>
+  <artifactId>org.eclipse.core.filesystem.linux.loongarch64</artifactId>
+  <version>1.4.100-SNAPSHOT</version>
+  <packaging>eclipse-plugin</packaging>
+
+  <properties>
+    <skipAPIAnalysis>true</skipAPIAnalysis>
+  </properties>
+
+  <build>
+    <plugins>
+      <!-- tycho is not able to automatically determine os/ws/arch of this bundle -->
+      <plugin>
+        <groupId>org.eclipse.tycho</groupId>
+        <artifactId>target-platform-configuration</artifactId>
+        <version>${tycho.version}</version>
+        <configuration>
+          <resolver>p2</resolver>
+          <environments>
+            <environment>
+              <os>linux</os>
+              <ws>gtk</ws>
+              <arch>loongarch64</arch>
+            </environment>
+          </environments>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>