diff --git a/eclipse.spec b/eclipse.spec index a00a77b2cac1e95b655c9c2acfd7a57b6c3e6d0d..5d73995f112d8ff490d6adde0490c5f8747a3d2b 100644 --- a/eclipse.spec +++ b/eclipse.spec @@ -11,7 +11,7 @@ Name: eclipse Epoch: 1 Version: 4.11 -Release: 12 +Release: 13 Summary: An open, extensible IDE License: EPL-2.0 URL: http://www.eclipse.org/ @@ -53,6 +53,7 @@ Patch41: Remove-32-bit-code.patch Patch42: Remove-32-bit-from-build-scripts.patch Patch43: Remove-more-32-bit-code.patch Patch44: switch-to-the-new-httpclient45-ECF-provider_2.patch +Patch45: fix-eclipse-startup-failure-on-loongarch64.patch ExcludeArch: s390 %{arm} %{ix86} BuildRequires: maven-local tycho tycho-extras cbi-plugins maven-antrun-plugin BuildRequires: maven-assembly-plugin maven-dependency-plugin maven-enforcer-plugin @@ -223,6 +224,7 @@ pushd eclipse.platform.ua popd %ifarch loongarch64 %patch38 -p1 +%patch45 -p1 %endif %ifarch riscv64 %patch39 -p1 @@ -764,6 +766,9 @@ echo "%{version}-%{release}" > %{buildroot}%{_eclipsedir}/.pkgs/Distro%{?dist} %{_eclipsedir}/plugins/org.eclipse.osgi.util_* %changelog +* Tue Jul 23 2024 songliyang - 1:4.11-13 +- fix startup failure on loongarch64 due to cannot load 32-bit SWT librarys on 64-bit JVM + * Tue May 28 2024 Dingli Zhang - 1:4.11-12 - Add support for riscv64 - Disable org.eclipse.releng.tools for non-bootstrap diff --git a/fix-eclipse-startup-failure-on-loongarch64.patch b/fix-eclipse-startup-failure-on-loongarch64.patch new file mode 100644 index 0000000000000000000000000000000000000000..7fc2e611fc97b24d11a85dc631085a12635e6ba8 --- /dev/null +++ b/fix-eclipse-startup-failure-on-loongarch64.patch @@ -0,0 +1,102 @@ +From 45fb4d59d8d853ec58dbf941f2d0a1ad9a27cc6d Mon Sep 17 00:00:00 2001 +From: songliyang +Date: Wed, 10 Jul 2024 10:41:00 +0800 +Subject: [PATCH] fix eclipse startup failure on loongarch64 + +--- + .../buildConfigs/equinox-launchers/build.xml | 1 + + .../rcp.config/build.properties | 3 +++ + .../Eclipse SWT PI/gtk/library/build.sh | 19 +++++++++++++++++-- + .../bundles/org.eclipse.swt/buildFragment.xml | 1 + + 4 files changed, 22 insertions(+), 2 deletions(-) + +diff --git a/eclipse.platform.releng.tychoeclipsebuilder/equinox/buildConfigs/equinox-launchers/build.xml b/eclipse.platform.releng.tychoeclipsebuilder/equinox/buildConfigs/equinox-launchers/build.xml +index da6739c62..76a870f80 100644 +--- a/eclipse.platform.releng.tychoeclipsebuilder/equinox/buildConfigs/equinox-launchers/build.xml ++++ b/eclipse.platform.releng.tychoeclipsebuilder/equinox/buildConfigs/equinox-launchers/build.xml +@@ -15,6 +15,7 @@ + + + ++ + + + +diff --git a/eclipse.platform.releng.tychoeclipsebuilder/rcp.config/build.properties b/eclipse.platform.releng.tychoeclipsebuilder/rcp.config/build.properties +index 259a9a022..b1bca238e 100644 +--- a/eclipse.platform.releng.tychoeclipsebuilder/rcp.config/build.properties ++++ b/eclipse.platform.releng.tychoeclipsebuilder/rcp.config/build.properties +@@ -35,6 +35,9 @@ root.linux.gtk.ppc64le.permissions.755=eclipse + root.linux.gtk.x86_64=rootfiles/linux.gtk.x86_64,../../rt.equinox.binaries/org.eclipse.equinox.executable/bin/gtk/linux/x86_64 + root.linux.gtk.x86_64.permissions.755=eclipse + ++root.linux.gtk.loongarch64=rootfiles/linux.gtk.loongarch64,../../rt.equinox.binaries/org.eclipse.equinox.executable/bin/gtk/linux/loongarch64 ++root.linux.gtk.loongarch64.permissions.755=eclipse ++ + bin.includes = feature.properties + + +diff --git a/eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/build.sh b/eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/build.sh +index c67036574..81764ddd8 100755 +--- a/eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/build.sh ++++ b/eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/build.sh +@@ -112,6 +112,10 @@ case $MODEL in + SWT_ARCH=x86 + AWT_ARCH=i386 + ;; ++ "loongarch64") ++ SWT_ARCH=loongarch64 ++ AWT_ARCH=loongarch64 ++ ;; + *) + SWT_ARCH=$MODEL + AWT_ARCH=$MODEL +@@ -180,6 +184,17 @@ case $SWT_OS.$SWT_ARCH in + export PKG_CONFIG_PATH="/usr/lib64/pkgconfig/" + fi + ;; ++ "linux.loongarch64") ++ if [ "${CC}" = "" ]; then ++ export CC=gcc ++ fi ++ if [ "${JAVA_HOME}" = "" ]; then ++ export JAVA_HOME=`readlink -f /usr/bin/java | sed "s:jre/bin/java::"` ++ fi ++ if [ "${PKG_CONFIG_PATH}" = "" ]; then ++ export PKG_CONFIG_PATH="/usr/lib64/pkgconfig/" ++ fi ++ ;; + "linux.s390x") + if [ "${CC}" = "" ]; then + export CC=gcc +@@ -195,7 +210,7 @@ esac + + + # For 64-bit CPUs, we have a switch +-if [ ${MODEL} = 'x86_64' -o ${MODEL} = 'ia64' -o ${MODEL} = 's390x' -o ${MODEL} = 'ppc64le' -o ${MODEL} = 'aarch64' ]; then ++if [ ${MODEL} = 'x86_64' -o ${MODEL} = 'ia64' -o ${MODEL} = 's390x' -o ${MODEL} = 'ppc64le' -o ${MODEL} = 'aarch64' -o ${MODEL} = 'loongarch64' ]; then + SWT_PTR_CFLAGS=-DJNI64 + if [ -d /lib64 ]; then + XLIB64=-L/usr/X11R6/lib64 +@@ -365,4 +380,4 @@ elif [ "${GTK_VERSION}" = "4.0" ]; then + elif [ "${GTK_VERSION}" = "3.0" -o "${GTK_VERSION}" = "" ]; then + export GTK_VERSION="3.0" + func_build_gtk3 "$@" +-fi +\ No newline at end of file ++fi +diff --git a/eclipse.platform.swt/bundles/org.eclipse.swt/buildFragment.xml b/eclipse.platform.swt/bundles/org.eclipse.swt/buildFragment.xml +index b4944c59d..99daf78bb 100644 +--- a/eclipse.platform.swt/bundles/org.eclipse.swt/buildFragment.xml ++++ b/eclipse.platform.swt/bundles/org.eclipse.swt/buildFragment.xml +@@ -242,6 +242,7 @@ + + + ++ + + + Is64=${is64} +-- +2.43.0 +