[Pkg-javascript-devel] Bug#1057697: nodejs:please enable loong64

2023-12-10 Thread Jérémy Lal
Le sam. 9 déc. 2023 à 16:27, Bo YU  a écrit :

> Source: nodejs
> Followup-For: Bug #1057697
> Version: 18.19.0+dfsg-6
> Tags: patch
>
> >>It seems we need to merge the patch[0] from #1054259 to finish the first
> >>stage for bootstraping nodejs on any arches if based on 18.19.0.
>
> >>From my side it's like this.
>
> >Right, I overlooked those patches - because I only read the first one,
> which was very wrong.
> >The actual fixes those patches were proposing are now applied.
>
> >However now I'm a bit worried that this is all in vain, because nodejs
> unconditionally requires cjs-module-lexer,
> >so one cannot execute anything without it (that wasn't the case when only
> acorn was an external builtin).
> ^
> (Copied txt from #1054259)
>
> To be honest, I do not understand the first patch from #1054259.
> Based on past bootstrap riscv64 experiences, I easily bootstrap nodejs
> for loong64 following the debian/README.source.
>
> Just for your convenience, I attach the debdiff for bootstrap nodejs for
> loong64 after finishing the first stage bootstrap.


Good news, the first stage build now works pretty well,
meaning it produces a nodejs binary that can be useful.
It even pass most of its testsuite, except of course everything that needs
- the command line repl (acorn)
- fetch (undici)
- commonjs modules (cjs-module-lexer)

It is on current master-18.x branch, and i double-checked it builds fine.

Jérémy
-- 
Pkg-javascript-devel mailing list
Pkg-javascript-devel@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-javascript-devel


[Pkg-javascript-devel] Bug#1057697: nodejs:please enable loong64

2023-12-07 Thread Shi Pujin

On Thu, 7 Dec 2023 08:30:09 +0800 Shi Pujin  wrote:
> Package: nodejs
> Version: 18.19.0
> Severity: wishlist
> Tags: patch
> User: debian-loonga...@lists.debian.org
> X-Debbugs-Cc: shipu...@loongson.cn
> Usertags: loong64
>
> Hi,
>
> Nodejs upstream supports loong64 starting from nodejs-17.5.0 version,
>
> it'd be nice to have loong64 enabled,nodejs is in the Build-Depend 
chain

> for many packages.
>
>
> I test compile nodejs locally, ignoring the build dependency
> he(--no-check-builddeps), close the test phase,debian-nodejs was
> successfully compiled.
>
> ```
> debootstrap --no-check-gpg --arch=loong64 --variant=buildd
> --extra-suites=unreleased unstable sid-loong64-rootfs
> http://ftp.ports.debian.org/debian-ports
> ```
>
> --
> thanks,
> Shi Pujin
>

Hi,

I added loong64 to the "debian/control" and "debian/rule" files.


thanks,
Shi Pujin
diff --git a/nodejs-18.19.0+dfsg/debian/control b/nodejs-18.19.0+dfsg/debian/control
index 7272ae4d..35dd05f4 100644
--- a/nodejs-18.19.0+dfsg/debian/control
+++ b/nodejs-18.19.0+dfsg/debian/control
@@ -51,7 +51,7 @@ Rules-Requires-Root: no
 
 Package: libnode-dev
 Section: libdevel
-Architecture: amd64 arm64 armel armhf i386 kfreebsd-i386 kfreebsd-amd64 mips mips64el mips64r6el mipsel powerpc ppc64 ppc64el riscv64 s390x
+Architecture: amd64 arm64 armel armhf i386 kfreebsd-i386 kfreebsd-amd64 mips mips64el mips64r6el mipsel loong64 loong64 powerpc ppc64 ppc64el riscv64 s390x
 Depends: ${misc:Depends},
  libssl-dev (>= 1.1.1~),
  libuv1-dev (>= 1.33.0~),
@@ -71,7 +71,7 @@ Description: evented I/O for V8 javascript (development files)
  This package provides development headers for libnode108
 
 Package: nodejs
-Architecture: amd64 arm64 armel armhf i386 kfreebsd-i386 kfreebsd-amd64 mips mips64el mips64r6el mipsel powerpc ppc64 ppc64el riscv64 s390x
+Architecture: amd64 arm64 armel armhf i386 kfreebsd-i386 kfreebsd-amd64 mips mips64el mips64r6el mipsel loong64 powerpc ppc64 ppc64el riscv64 s390x
 Multi-Arch: allowed
 Depends:
  ${shlibs:Depends},
@@ -107,7 +107,7 @@ Description: evented I/O for V8 javascript - runtime executable
 
 Package: libnode108
 Section: libs
-Architecture: amd64 arm64 armel armhf i386 kfreebsd-i386 kfreebsd-amd64 mips mips64el mips64r6el mipsel powerpc ppc64 ppc64el riscv64 s390x
+Architecture: amd64 arm64 armel armhf i386 kfreebsd-i386 kfreebsd-amd64 mips mips64el mips64r6el mipsel loong64 powerpc ppc64 ppc64el riscv64 s390x
 Multi-Arch: same
 Depends: ${shlibs:Depends},
  ${misc:Depends},
diff --git a/nodejs-18.19.0+dfsg/debian/rules b/nodejs-18.19.0+dfsg/debian/rules
index 4a6b8f68..692cfbf3 100755
--- a/nodejs-18.19.0+dfsg/debian/rules
+++ b/nodejs-18.19.0+dfsg/debian/rules
@@ -13,7 +13,7 @@ builtins := /usr/share/nodejs/node
 ABI = $(shell awk '/^#define NODE_MODULE_VERSION/ {print $$3}' src/node_version.h)
 
 # archs
-ARCHS := amd64 arm64 armel armhf i386 kfreebsd-i386 kfreebsd-amd64 mips mips64el mips64r6el mipsel ppc64 ppc64el riscv64 s390x
+ARCHS := amd64 arm64 armel armhf i386 kfreebsd-i386 kfreebsd-amd64 mips mips64el mips64r6el mipsel loong64 ppc64 ppc64el riscv64 s390x
 
 # branch
 BRANCH := $(word 1, $(subst .,$(space), $(DEB_UPSTREAM_VERSION)))
@@ -63,6 +63,7 @@ destCpu := $(or $(destCpu),$(if $(filter mipsel,$(DEB_HOST_ARCH)),mipsel))
 destCpu := $(or $(destCpu),$(if $(filter mips64el,$(DEB_HOST_ARCH)),mips64el))
 destCpu := $(or $(destCpu),$(if $(filter mips64r6el,$(DEB_HOST_ARCH)),mips64el))
 destCpu := $(or $(destCpu),$(if $(filter mips,$(DEB_HOST_ARCH)),mips))
+destCpu := $(or $(destCpu),$(if $(filter loong64,$(DEB_HOST_ARCH)),loong64))
 destCpu := $(or $(destCpu),$(if $(filter powerpc,$(DEB_HOST_ARCH)),ppc))
 destCpu := $(or $(destCpu),$(if $(filter ppc64,$(DEB_HOST_ARCH)),ppc64))
 destCpu := $(or $(destCpu),$(if $(filter riscv64,$(DEB_HOST_ARCH)),riscv64))
-- 
Pkg-javascript-devel mailing list
Pkg-javascript-devel@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-javascript-devel


[Pkg-javascript-devel] Bug#1057697: nodejs:please enable loong64

2023-12-07 Thread Shi Pujin

Package: nodejs
Version: 18.19.0
Severity: wishlist
Tags: patch
User: debian-loonga...@lists.debian.org
X-Debbugs-Cc: shipu...@loongson.cn
Usertags: loong64

Hi,

Nodejs upstream supports loong64 starting from nodejs-17.5.0 version,

it'd be nice to have loong64 enabled,nodejs is in the Build-Depend chain 
for many packages.



I test compile nodejs locally, ignoring the build dependency 
he(--no-check-builddeps), close the test phase,debian-nodejs was 
successfully compiled.


```
debootstrap --no-check-gpg --arch=loong64 --variant=buildd 
--extra-suites=unreleased unstable sid-loong64-rootfs 
http://ftp.ports.debian.org/debian-ports

```

--
thanks,
Shi Pujin

--
Pkg-javascript-devel mailing list
Pkg-javascript-devel@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-javascript-devel