Source: qtscript-opensource-src
Version: 5.15.10+dfsg-2
Severity: wishlist
Tags: ftbfs patch
User: debian-loonga...@lists.debian.org
Usertags: loong64
Dear maintainers,
We need to add architectural support for qtscript-opensource-src.
Otherwise it will build failures .
Please consider the patch I have attached.
Would it be possible to include the support for LoongArch in the next
upload?
If you have any questions, you can contact me at any time.
/usr/include/c++/13/bits/unique_ptr.h:65:28: note: declared here
65 | template<typename> class auto_ptr;
| ^~~~~~~~
../3rdparty/javascriptcore/JavaScriptCore/wtf/OwnPtr.h:61:25: warning:
‘template<class> class std::auto_ptr’ is deprecated: use
'std::unique_ptr' instead [-Wdeprecated-declarations]
61 | void adopt(std::auto_ptr<ValueType> autoPtr) {
ASSERT(!autoPtr.get() || m_ptr != autoPtr.get()); deleteOwnedPtr(m_ptr);
m_ptr = autoPtr.release(); }
| ^~~~~~~~
/usr/include/c++/13/bits/unique_ptr.h:65:28: note: declared here
65 | template<typename> class auto_ptr;
| ^~~~~~~~
../3rdparty/javascriptcore/JavaScriptCore/wtf/VectorTraits.h:84:30:
warning: ‘template<class> class std::auto_ptr’ is deprecated: use
'std::unique_ptr' instead [-Wdeprecated-declarations]
84 | struct VectorTraits<std::auto_ptr<P> > :
SimpleClassVectorTraits { };
| ^~~~~~~~
/usr/include/c++/13/bits/unique_ptr.h:65:28: note: declared here
65 | template<typename> class auto_ptr;
| ^~~~~~~~
In file included from
../3rdparty/javascriptcore/JavaScriptCore/runtime/JSCell.h:28:
../3rdparty/javascriptcore/JavaScriptCore/runtime/JSValue.h: In
constructor ‘QTJSC::JSValue::JSValue(QTJSC::JSCell*)’:
../3rdparty/javascriptcore/JavaScriptCore/runtime/JSValue.h:493:28:
error: cast from ‘QTJSC::JSCell*’ to ‘int32_t’ {aka ‘int’} loses
precision [-fpermissive]
493 | u.asBits.payload = reinterpret_cast<int32_t>(ptr);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../3rdparty/javascriptcore/JavaScriptCore/runtime/JSValue.h: In
constructor ‘QTJSC::JSValue::JSValue(const QTJSC::JSCell*)’:
../3rdparty/javascriptcore/JavaScriptCore/runtime/JSValue.h:505:28:
error: cast from ‘QTJSC::JSCell*’ to ‘int32_t’ {aka ‘int’} loses
precision [-fpermissive]
505 | u.asBits.payload =
reinterpret_cast<int32_t>(const_cast<JSCell*>(ptr));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
g++ -c -include .pch/Qt5Script -g -O2 -fstack-protector-strong -Wformat
-Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2
-fno-strict-aliasing -Wall -Wreturn-type -Wcast-align -Wchar-subscripts
-Wformat-security -Wreturn-type -Wno-unused-parameter -Wno-sign-compare
-Wno-switch -Wno-switch-enum -Wundef -Wmissing-noreturn -Winit-self
-fno-stack-protector -g -O2
-ffile-prefix-map=/home/loongson/songd/qt/qtscript-opensource-src/qtscript-opensource-src-5.15.10+dfsg=.
-fstack-protector-strong -Wformat -Werror=format-security -Wdate-time
-D_FORTIFY_SOURCE=2 -Wdate-time -D_FORTIFY_SOURCE=2 -std=c++1y
-fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions
-D_REENTRANT -fPIC -DQT_NO_LINKED_LIST -DQT_NO_FOREACH
-DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_LINKED_LIST -DJSC=QTJSC
-Djscyyparse=qtjscyyparse -Djscyylex=qtjscyylex
-Djscyyerror=qtjscyyerror -DWTF=QTWTF -DQT_NO_USING_NAMESPACE
-DQLALR_NO_QSCRIPTGRAMMAR_DEBUG_INFO -DBUILDING_QT__=1
-DWTF_USE_ACCELERATED_COMPOSITING -DNDEBUG -DLOG_DISABLED=1
-DBUILDING_QT__ -DBUILDING_JavaScriptCore -DBUILDING_WTF
-DWTF_USE_JAVASCRIPTCORE_BINDINGS=1 -DWTF_CHANGES=1 -DJS_NO_EXPORT
-DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BUILD_SCRIPT_LIB
-DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS
-DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS
-DQT_DISABLE_DEPRECATED_BEFORE=0x050000
-DQT_DEPRECATED_WARNINGS_SINCE=0x060000 -DQT_NO_EXCEPTIONS
-D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_CORE_LIB
-I. -I../3rdparty/javascriptcore/JavaScriptCore
-I../3rdparty/javascriptcore
-I../3rdparty/javascriptcore/JavaScriptCore/assembler
-I../3rdparty/javascriptcore/JavaScriptCore/bytecode
-I../3rdparty/javascriptcore/JavaScriptCore/bytecompiler
-I../3rdparty/javascriptcore/JavaScriptCore/debugger
-I../3rdparty/javascriptcore/JavaScriptCore/interpreter
-I../3rdparty/javascriptcore/JavaScriptCore/jit
-I../3rdparty/javascriptcore/JavaScriptCore/parser
-I../3rdparty/javascriptcore/JavaScriptCore/pcre
-I../3rdparty/javascriptcore/JavaScriptCore/profiler
-I../3rdparty/javascriptcore/JavaScriptCore/runtime
-I../3rdparty/javascriptcore/JavaScriptCore/wrec
-I../3rdparty/javascriptcore/JavaScriptCore/wtf
-I../3rdparty/javascriptcore/JavaScriptCore/wtf/symbian
-I../3rdparty/javascriptcore/JavaScriptCore/wtf/unicode
-I../3rdparty/javascriptcore/JavaScriptCore/yarr
-I../3rdparty/javascriptcore/JavaScriptCore/API
-I../3rdparty/javascriptcore/JavaScriptCore/ForwardingHeaders
-I../3rdparty/javascriptcore/JavaScriptCore/generated
-I/home/loongson/songd/qt/qtscript-opensource-src/qtscript-opensource-src-5.15.10+dfsg/src/3rdparty/javascriptcore/WebKit/qt/Api
-I../3rdparty/javascriptcore/JavaScriptCore/pcre
-I/home/loongson/songd/qt/qtscript-opensource-src/qtscript-opensource-src-5.15.10+dfsg/src/3rdparty/javascriptcore/JavaScriptCore/tmp
-I. -Iparser -I../../include -I../../include/QtScript
-I../../include/QtScript/5.15.10
-I../../include/QtScript/5.15.10/QtScript
-I/usr/include/loongarch64-linux-gnu/qt5/QtCore/5.15.10
-I/usr/include/loongarch64-linux-gnu/qt5/QtCore/5.15.10/QtCore
-I/usr/include/loongarch64-linux-gnu/qt5
-I/usr/include/loongarch64-linux-gnu/qt5/QtCore -I.moc
-I/usr/lib/loongarch64-linux-gnu/qt5/mkspecs/linux-g++ -o
obj/release/JSCallbackConstructor.o
../3rdparty/javascriptcore/JavaScriptCore/API/JSCallbackConstructor.cpp
In file included from
../3rdparty/javascriptcore/JavaScriptCore/interpreter/Register.h:32,
from
../3rdparty/javascriptcore/JavaScriptCore/runtime/ArgList.h:25,
from
../3rdparty/javascriptcore/JavaScriptCore/runtime/JSObject.h:26,
from
../3rdparty/javascriptcore/JavaScriptCore/API/JSCallbackConstructor.h:30,
from
../3rdparty/javascriptcore/JavaScriptCore/API/JSCallbackConstructor.cpp:27:
../3rdparty/javascriptcore/JavaScriptCore/runtime/JSValue.h: In
constructor ‘QTJSC::JSValue::JSValue(QTJSC::JSCell*)’:
../3rdparty/javascriptcore/JavaScriptCore/runtime/JSValue.h:493:28:
error: cast from ‘QTJSC::JSCell*’ to ‘int32_t’ {aka ‘int’} loses
precision [-fpermissive]
493 | u.asBits.payload = reinterpret_cast<int32_t>(ptr);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../3rdparty/javascriptcore/JavaScriptCore/runtime/JSValue.h: In
constructor ‘QTJSC::JSValue::JSValue(const QTJSC::JSCell*)’:
../3rdparty/javascriptcore/JavaScriptCore/runtime/JSValue.h:505:28:
error: cast from ‘QTJSC::JSCell*’ to ‘int32_t’ {aka ‘int’} loses
precision [-fpermissive]
505 | u.asBits.payload =
reinterpret_cast<int32_t>(const_cast<JSCell*>(ptr));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from
../3rdparty/javascriptcore/JavaScriptCore/wtf/VectorTraits.h:24,
from
../3rdparty/javascriptcore/JavaScriptCore/interpreter/Register.h:35:
../3rdparty/javascriptcore/JavaScriptCore/wtf/OwnPtr.h: At global scope:
../3rdparty/javascriptcore/JavaScriptCore/wtf/OwnPtr.h:43:21: warning:
‘template<class> class std::auto_ptr’ is deprecated: use
'std::unique_ptr' instead [-Wdeprecated-declarations]
43 | OwnPtr(std::auto_ptr<ValueType> autoPtr) :
m_ptr(autoPtr.release()) { }
| ^~~~~~~~
In file included from /usr/include/c++/13/memory:78,
from
/usr/include/loongarch64-linux-gnu/qt5/QtCore/qsharedpointer_impl.h:71,
from
/usr/include/loongarch64-linux-gnu/qt5/QtCore/qsharedpointer.h:48,
from
/usr/include/loongarch64-linux-gnu/qt5/QtCore/qdebug.h:54,
from
/usr/include/loongarch64-linux-gnu/qt5/QtCore/qcborcommon.h:45,
from
/usr/include/loongarch64-linux-gnu/qt5/QtCore/qcborvalue.h:45,
from
/usr/include/loongarch64-linux-gnu/qt5/QtCore/qcborarray.h:43,
from
/usr/include/loongarch64-linux-gnu/qt5/QtCore/QtCore:38,
from ../../include/QtScript/QtScriptDepends:3:
/usr/include/c++/13/bits/unique_ptr.h:65:28: note: declared here
65 | template<typename> class auto_ptr;
| ^~~~~~~~
../3rdparty/javascriptcore/JavaScriptCore/wtf/OwnPtr.h:61:25: warning:
‘template<class> class std::auto_ptr’ is deprecated: use
'std::unique_ptr' instead [-Wdeprecated-declarations]
61 | void adopt(std::auto_ptr<ValueType> autoPtr) {
ASSERT(!autoPtr.get() || m_ptr != autoPtr.get()); deleteOwnedPtr(m_ptr);
m_ptr = autoPtr.release(); }
| ^~~~~~~~
/usr/include/c++/13/bits/unique_ptr.h:65:28: note: declared here
65 | template<typename> class auto_ptr;
| ^~~~~~~~
../3rdparty/javascriptcore/JavaScriptCore/wtf/VectorTraits.h:84:30:
warning: ‘template<class> class std::auto_ptr’ is deprecated: use
'std::unique_ptr' instead [-Wdeprecated-declarations]
84 | struct VectorTraits<std::auto_ptr<P> > :
SimpleClassVectorTraits { };
| ^~~~~~~~
/usr/include/c++/13/bits/unique_ptr.h:65:28: note: declared here
65 | template<typename> class auto_ptr;
| ^~~~~~~~
make[3]: *** [Makefile:1515:obj/release/JSBase.o] 错误 1
make[3]: *** 正在等待未完成的任务....
make[3]: *** [Makefile:1632:obj/release/JSCallbackConstructor.o] 错误 1
make[3]:
离开目录“/home/loongson/songd/qt/qtscript-opensource-src/qtscript-opensource-src-5.15.10+dfsg/src/script”
make[2]: *** [Makefile:48:sub-script-make_first-ordered] 错误 2
make[2]:
离开目录“/home/loongson/songd/qt/qtscript-opensource-src/qtscript-opensource-src-5.15.10+dfsg/src”
make[1]: *** [Makefile:49:sub-src-make_first] 错误 2
make[1]:
离开目录“/home/loongson/songd/qt/qtscript-opensource-src/qtscript-opensource-src-5.15.10+dfsg”
dh_auto_build: error: make -j4 returned exit code 2
make: *** [debian/rules:13:binary] 错误 2
dpkg-buildpackage: error: debian/rules binary subprocess returned exit
status 2
loongson@loongson:~/songd/qt/qtscript-opensource-src/qtscript-opensource-src-5.15.10+dfsg$
>From e150ec15724d0cc9d1a245ade2ae3faa9f5b7626 Mon Sep 17 00:00:00 2001
From: Ding Song <songd...@loongson.cn>
Date: Tue, 20 Feb 2024 14:11:37 +0800
Subject: [PATCH] Add loongarch64 support
---
src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h
index 4bf2a5d..50944b0 100644
--- a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h
@@ -387,6 +387,11 @@
#endif /* ARM */
+/* CPU(LOONGARCH64) - LOONGARCH 64-bit */
+#if defined(__loongarch64)
+#define WTF_CPU_LOONGARCH64 1
+#endif
+
#if (defined(mips) || defined(__mips__) || defined(MIPS) || defined(_MIPS_))
#define WTF_CPU_MIPS 1
#include <sgidefs.h>
@@ -970,7 +975,7 @@
#endif
#if !defined(WTF_USE_JSVALUE64) && !defined(WTF_USE_JSVALUE32) && !defined(WTF_USE_JSVALUE32_64)
-#if (CPU(X86_64) && !CPU(X32) && (OS(UNIX) || OS(WINDOWS) || OS(SOLARIS) || OS(HPUX))) || (CPU(IA64) && !CPU(IA64_32)) || CPU(ALPHA) || CPU(AIX64) || CPU(SPARC64) || CPU(MIPS64) || CPU(AARCH64) || CPU(RISCV64) || CPU(S390X)
+#if (CPU(X86_64) && !CPU(X32) && (OS(UNIX) || OS(WINDOWS) || OS(SOLARIS) || OS(HPUX))) || (CPU(IA64) && !CPU(IA64_32)) || CPU(ALPHA) || CPU(AIX64) || CPU(SPARC64) || CPU(MIPS64) || CPU(AARCH64) || CPU(RISCV64) || CPU(S390X) || CPU(LOONGARCH64)
#define WTF_USE_JSVALUE64 1
#elif CPU(ARM) || CPU(PPC64) || CPU(RISCV32)
#define WTF_USE_JSVALUE32 1
--
2.20.1