add miss file ,and sync kernel to 1e2e6bbbc

This commit is contained in:
loongson
2024-06-27 09:34:17 +08:00
parent 75e64c9ee9
commit c40a6b0873
2459 changed files with 110021 additions and 7 deletions
+3 -3
View File
@@ -786,11 +786,11 @@ endif
mkdir -p $(TARGET_DIR)/etc
( \
echo "NAME=LoongOS(GD)"; \
echo "NAME=Buildroot"; \
echo "VERSION=$(BR2_VERSION_FULL)"; \
echo "ID=LoongOS"; \
echo "ID=buildroot"; \
echo "VERSION_ID=$(BR2_VERSION)"; \
echo "PRETTY_NAME=\"LoongOS $(BR2_VERSION)\"" \
echo "PRETTY_NAME=\"Buildroot $(BR2_VERSION)\"" \
) > $(TARGET_DIR)/usr/lib/os-release
ln -sf ../usr/lib/os-release $(TARGET_DIR)/etc
+31
View File
@@ -0,0 +1,31 @@
loongson LA64 ls2k300
Intro
=====
This default configuration will allow you to start experimenting with the
buildroot environment for the ls2k300. With the current configuration
it will bring-up the board, and allow access through the serial console.
How to build it
===============
Configure Buildroot:
$ make loongson2k300_mini_dp_defconfig (this will use rootfs_overlay)
Compile everything and build the system:
$ make
or
$ make -j4 (run in 4 core PC)
How to install the system
========================
you can use
{buildroot_path}/output/images/rootfs.tar.gz
or
{buildroot_path}/output/images/rootfs.ubi
to install to SSD or nand by uboot function
remember rootfs.ext4.gz rename to rootfs.img
@@ -0,0 +1,117 @@
# $OpenBSD: sshd_config,v 1.103 2018/04/09 20:41:22 tj Exp $
# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.
# This sshd was compiled with PATH=/bin:/sbin:/usr/bin:/usr/sbin
# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented. Uncommented options override the
# default value.
#Port 22
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::
#HostKey /etc/ssh/ssh_host_rsa_key
#HostKey /etc/ssh/ssh_host_ecdsa_key
#HostKey /etc/ssh/ssh_host_ed25519_key
# Ciphers and keying
#RekeyLimit default none
# Logging
#SyslogFacility AUTH
#LogLevel INFO
# Authentication:
#LoginGraceTime 2m
#PermitRootLogin prohibit-password
PermitRootLogin yes
#StrictModes yes
#MaxAuthTries 6
#MaxSessions 10
#PubkeyAuthentication yes
# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
# but this is overridden so installations will only check .ssh/authorized_keys
AuthorizedKeysFile .ssh/authorized_keys
#AuthorizedPrincipalsFile none
#AuthorizedKeysCommand none
#AuthorizedKeysCommandUser nobody
# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
#HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# HostbasedAuthentication
#IgnoreUserKnownHosts no
# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes
# To disable tunneled clear text passwords, change to no here!
#PasswordAuthentication yes
#PermitEmptyPasswords no
# Change to no to disable s/key passwords
#ChallengeResponseAuthentication yes
# Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
#KerberosGetAFSToken no
# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes
# Set this to 'yes' to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the ChallengeResponseAuthentication and
# PasswordAuthentication. Depending on your PAM configuration,
# PAM authentication via ChallengeResponseAuthentication may bypass
# the setting of "PermitRootLogin without-password".
# If you just want the PAM account and session checks to run without
# PAM authentication, then enable this but set PasswordAuthentication
# and ChallengeResponseAuthentication to 'no'.
#UsePAM no
#AllowAgentForwarding yes
#AllowTcpForwarding yes
#GatewayPorts no
#X11Forwarding no
#X11DisplayOffset 10
#X11UseLocalhost yes
#PermitTTY yes
#PrintMotd yes
#PrintLastLog yes
#TCPKeepAlive yes
#PermitUserEnvironment no
#Compression delayed
#ClientAliveInterval 0
#ClientAliveCountMax 3
#UseDNS no
#PidFile /var/run/sshd.pid
#MaxStartups 10:30:100
#PermitTunnel no
#ChrootDirectory none
#VersionAddendum none
# no default banner path
#Banner none
# override default of no subsystems
Subsystem sftp /usr/libexec/sftp-server
# Example of overriding settings on a per-user basis
#Match User anoncvs
# X11Forwarding no
# AllowTcpForwarding no
# PermitTTY no
# ForceCommand cvs server
+1 -1
View File
@@ -16,7 +16,7 @@ BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"
BR2_SYSTEM_DEFAULT_PATH="/bin:/sbin:/usr/bin:/usr/sbin"
BR2_SYSTEM_ENABLE_NLS=y
BR2_TARGET_LOCALTIME="Asia/Shanghai"
BR2_ROOTFS_OVERLAY="board/loongson/ls2k1000la/rootfs_overlay"
BR2_ROOTFS_OVERLAY="board/loongson/ls2k300/rootfs_overlay"
BR2_PACKAGE_ALSA_UTILS=y
BR2_PACKAGE_ALSA_UTILS_AMIXER=y
BR2_PACKAGE_ALSA_UTILS_APLAY=y
+1 -1
View File
@@ -16,7 +16,7 @@ BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"
BR2_SYSTEM_DEFAULT_PATH="/bin:/sbin:/usr/bin:/usr/sbin"
BR2_SYSTEM_ENABLE_NLS=y
BR2_TARGET_LOCALTIME="Asia/Shanghai"
BR2_ROOTFS_OVERLAY="board/loongson/ls2k1000la/rootfs_overlay"
BR2_ROOTFS_OVERLAY="board/loongson/ls2k300/rootfs_overlay"
BR2_PACKAGE_ALSA_UTILS=y
BR2_PACKAGE_ALSA_UTILS_AMIXER=y
BR2_PACKAGE_ALSA_UTILS_APLAY=y
+5
View File
@@ -29,6 +29,11 @@ config BR2_TARGET_ROOTFS_EXT2_4
endchoice
config BR2_TARGET_ROOTFS_IMG
bool "img root filesystem"
depends on BR2_TARGET_ROOTFS_EXT2_4
default y
config BR2_TARGET_ROOTFS_EXT2_GEN
int
default 2 if BR2_TARGET_ROOTFS_EXT2_2
+9
View File
@@ -40,7 +40,16 @@ ifneq ($(BR2_TARGET_ROOTFS_EXT2_GEN),2)
define ROOTFS_EXT2_SYMLINK
ln -sf rootfs.ext2$(ROOTFS_EXT2_COMPRESS_EXT) $(BINARIES_DIR)/rootfs.ext$(BR2_TARGET_ROOTFS_EXT2_GEN)$(ROOTFS_EXT2_COMPRESS_EXT)
endef
ROOTFS_EXT2_POST_GEN_HOOKS += ROOTFS_EXT2_SYMLINK
endif
ifeq ($(BR2_TARGET_ROOTFS_IMG), y)
define ROOTFS_IMG
ln -sf rootfs.ext2$(ROOTFS_EXT2_COMPRESS_EXT) $(BINARIES_DIR)/rootfs.img
endef
ROOTFS_EXT2_POST_GEN_HOOKS += ROOTFS_IMG
endif
$(eval $(rootfs))
+2
View File
@@ -1266,6 +1266,8 @@ menu "External python modules"
source "package/python-zc-lockfile/Config.in"
source "package/python-zeroconf/Config.in"
source "package/python-zope-interface/Config.in"
source "package/python-pyftdi/Config.in"
source "package/python-smbus2/Config.in"
endmenu
endif
source "package/quickjs/Config.in"
+1 -2
View File
@@ -8,8 +8,7 @@ LOONGSON_KERNEL_SITE = $(TOPDIR)/package/loongson_kernel/loongson_kernel.tar.gz
LOONGSON_KERNEL_SITE_METHOD = file
define LOONGSON_KERNEL_EXTRACT_CMDS
tar -xzf $(LOONGSON_KERNEL_SITE) -C $(@D)/
cd $(@D) && ./loongson_kernel.sh $(BR2_PACKAGE_LOONGSON_KERNEL_HOSTSITE) $(BR2_PACKAGE_LOONGSON_KERNEL_USER) $(BR2_PACKAGE_LOONGSON_KERNEL_PASSWORD) $(BR2_PACKAGE_LOONGSON_KERNEL_PATH)
tar -xzf $(LOONGSON_KERNEL_SITE) -C $(@D)/ --strip-components 1 --wildcards */uImage
endef
define LOONGSON_KERNEL_INSTALL_TARGET_CMDS
Binary file not shown.
+15
View File
@@ -0,0 +1,15 @@
#!/bin/sh
#
case "$1" in
start)
/etc/profile.d/resizerootfs.sh
;;
stop)
;;
restart|reload)
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
+56
View File
@@ -0,0 +1,56 @@
#!/bin/sh
#
FLAG=/etc/init.d/resizerootfs
ROOTDEV_P=`cat /proc/cmdline | sed 's/ /\n/g' | grep root= | cut -d = -f 2`
ROOTDEV="/dev/"
PARTNUM=0
# /dev/sdax
choose_ssd_root(){
ROOTDEV=`echo ${ROOTDEV_P} | sed 's/[1-9]//g'`
if [[ "${ROOTDEV_P}" == "${ROOTDEV}" ]]; then
return
else
PARTNUM=`echo ${ROOTDEV_P#${ROOTDEV}}`
fi
}
# /dev/mmcblkxpx
choose_mmc_root(){
ROOTDEV=`echo ${ROOTDEV_P} | cut -d p -f 1`
if [[ "${ROOTDEV_P}" == "${ROOTDEV}" ]]; then
return
else
PARTNUM=`echo ${ROOTDEV_P} | cut -d p -f 2`
fi
}
do_resize(){
if [[ ${PARTNUM} == 0 ]]; then
echo "Don't resize partition"
else
echo "Partition resizing..."
parted ${ROOTDEV} --script -- resizepart ${PARTNUM} -0
fi
resize2fs ${ROOTDEV_P}
echo 1 > $FLAG
}
if [ -f ${FLAG} ]; then
echo "Rootfs Resized."
else
echo "Rootfs Resizing..."
if [[ ${ROOTDEV_P} == *"/dev/sd"* ]]; then
choose_ssd_root
do_resize
elif [[ ${ROOTDEV_P} == *"/dev/mmcblk"* ]]; then
choose_mmc_root
do_resize
else
echo "${ROOTDEV_P} cannot resize"
fi
fi
+63
View File
@@ -0,0 +1,63 @@
#! /bin/bash
file_name="keep-nmcli.sh"
gen_file="./$file_name"
gen_single_nmcli()
{
# $1 name $2 ip4/24
connection_name=$1"-connection"
echo "exist=\$(nmcli c show | grep $connection_name | wc -l)" >> $gen_file
echo "if [ \$exist -ne 1 ]; then" >> $gen_file
echo " nmcli c add type ethernet con-name $connection_name ifname $1 ip4 $2/24" >> $gen_file
echo "fi" >> $gen_file
echo "" >> $gen_file
}
gen_all()
{
single_content=$(echo $1 | grep ' ')
single_param=0
if [[ -z "$single_content" ]]; then
single_param=1
fi
loopp=1
index=1
while [ $loopp -eq 1 ];
do
ethname=$(echo $1 | cut -d ' ' -f$index)
ethip=$(echo $2 | cut -d ' ' -f$index)
if [[ -z $ethname ]]; then
loopp=0
elif [[ -z $ethip ]]; then
loopp=0
else
echo "$ethname <======> $ethip"
gen_single_nmcli $ethname $ethip
index=$(($index + 1))
fi
if [ $single_param -eq 1 ]; then
break;
fi
done
}
if [ $# -ne 2 ]; then
echo "param not full! exit 0"
exit 0
fi
echo "#! /bin/sh" > $gen_file
echo "sleep 2" >> $gen_file
echo "" >> $gen_file
gen_all "$1" "$2"
echo "systemctl disable keep-nmcli" >> $gen_file
echo "rm /usr/lib/systemd/system/multi-user.target.wants/keep-nmcli.service" >> $gen_file
echo "rm /usr/lib/systemd/system/keep-nmcli.service" >> $gen_file
echo "rm /root/$file_name" >> $gen_file
chmod a+x $gen_file
+59
View File
@@ -0,0 +1,59 @@
#! /bin/bash
file_name="interfaces"
gen_file="./interfaces"
gen_single_nmcli()
{
# $1 name $2 ip4/24
echo "auto $1" >> $gen_file
echo "iface $1 inet static" >> $gen_file
echo "address $2" >> $gen_file
echo "netmask 255.255.255.0" >> $gen_file
echo "#gateway " >> $gen_file
echo "" >> $gen_file
}
gen_all()
{
single_content=$(echo $1 | grep ' ')
single_param=0
if [[ -z "$single_content" ]]; then
single_param=1
fi
loopp=1
index=1
while [ $loopp -eq 1 ];
do
ethname=$(echo $1 | cut -d ' ' -f$index)
ethip=$(echo $2 | cut -d ' ' -f$index)
if [[ -z $ethname ]]; then
loopp=0
elif [[ -z $ethip ]]; then
loopp=0
else
echo "$ethname <======> $ethip"
gen_single_nmcli $ethname $ethip
index=$(($index + 1))
fi
if [ $single_param -eq 1 ]; then
break;
fi
done
}
if [ $# -ne 2 ]; then
echo "param not full! exit 0"
exit 0
fi
echo "# interface file auto-generated by buildroot" > $gen_file
echo "" >> $gen_file
echo "auto lo" >> $gen_file
echo "iface lo inet loopback" >> $gen_file
echo "" >> $gen_file
gen_all "$1" "$2"
@@ -0,0 +1,12 @@
[Unit]
Description=config default eth ip by nmcli when system first boot and delete all service and shell script after config
After=NetworkManager@.service
[Service]
Type=oneshot
ExecStart=/root/keep-nmcli.sh
TimeoutSec=0
RemainAfterExit=no
[Install]
WantedBy=multi-user.target
+6
View File
@@ -0,0 +1,6 @@
config BR2_PACKAGE_PYTHON_PYFTDI
bool "python-pyftdi"
help
FTDI device driver (pure Python)
https://pypi.org/project/pyftdi
+12
View File
@@ -0,0 +1,12 @@
################################################################################
#
# python-pyftdi
#
################################################################################
PYTHON_PYFTDI_VERSION = 0.55.4
PYTHON_PYFTDI_SOURCE = pyftdi-$(PYTHON_PYFTDI_VERSION).tar.gz
PYTHON_PYFTDI_SITE = https://files.pythonhosted.org/packages/8f/b4/8578b8e4c1e69faa8297cb1e1fd0c86de03bb7eeb3e7cb63157e1e72abfb
PYTHON_PYFTDI_SETUP_TYPE = setuptools
$(eval $(python-package))
+6
View File
@@ -0,0 +1,6 @@
config BR2_PACKAGE_PYTHON_SMBUS2
bool "python-smbus2"
help
smbus2 is a drop-in replacement for smbus-cffi/smbus-python in pure Python
https://pypi.org/project/smbus2
+12
View File
@@ -0,0 +1,12 @@
################################################################################
#
# python-smbus2
#
################################################################################
PYTHON_SMBUS2_VERSION = 0.4.3
PYTHON_SMBUS2_SOURCE = smbus2-$(PYTHON_SMBUS2_VERSION).tar.gz
PYTHON_SMBUS2_SITE = https://files.pythonhosted.org/packages/98/17/9663936e52a348b3ad1c85e6ca6071d2abf00a5f64f2df50bec8dcca6e16
PYTHON_SMBUS2_SETUP_TYPE = setuptools
$(eval $(python-package))
Binary file not shown.
+26
View File
@@ -0,0 +1,26 @@
Make SoX support uclibc-based toolchains, from:
http://sourceforge.net/p/sox/bugs/179/
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Index: sox-14.4.1/src/formats.c
===================================================================
--- sox-14.4.1.orig/src/formats.c
+++ sox-14.4.1/src/formats.c
@@ -409,7 +409,7 @@ static void UNUSED rewind_pipe(FILE * fp
#if defined _FSTDIO || defined _NEWLIB_VERSION || defined __APPLE__
fp->_p -= PIPE_AUTO_DETECT_SIZE;
fp->_r += PIPE_AUTO_DETECT_SIZE;
-#elif defined __GLIBC__
+#elif defined __GLIBC__ && ! defined __UCLIBC__
fp->_IO_read_ptr = fp->_IO_read_base;
#elif defined _MSC_VER || defined _WIN32 || defined _WIN64 || defined _ISO_STDIO_ISO_H
fp->_ptr = fp->_base;
@@ -417,7 +417,6 @@ static void UNUSED rewind_pipe(FILE * fp
/* To fix this #error, either simply remove the #error line and live without
* file-type detection with pipes, or add support for your compiler in the
* lines above. Test with cat monkey.wav | ./sox --info - */
- #error FIX NEEDED HERE
#define NO_REWIND_PIPE
(void)fp;
#endif
@@ -0,0 +1,45 @@
From 18ace560a15207503805d4df25b90c7a756bcbf6 Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Tue, 2 Feb 2021 23:53:39 +0100
Subject: [PATCH] configure.ac: put back --disable-stack-protector
Put back --disable-stack-protector which has been removed by commit
70c85915eace83142b84e4f65f5db421cf0c09e3. This will allow the user to
disable it or to let a higher buildsystem such as buildroot to finely
configure it.
Indeed, without this patch, build can fail as some compilers (such as
uclibc) could missed the needed library (-lssp or -lssp_nonshared) at
linking step:
CCLD libsox.la
/home/fabrice/br-test-pkg/br-arm-full/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/5.5.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: cannot find -lssp_nonshared
/home/fabrice/br-test-pkg/br-arm-full/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/5.5.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: cannot find -lssp
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
[Upstream status: https://sourceforge.net/p/sox/patches/122/]
---
configure.ac | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 39306398..a1665467 100644
--- a/configure.ac
+++ b/configure.ac
@@ -32,7 +32,12 @@ AC_PROG_LN_S
PKG_PROG_PKG_CONFIG
PKG_INSTALLDIR
-AX_APPEND_COMPILE_FLAGS([-fstack-protector-strong])
+AC_ARG_ENABLE([stack-protector],
+ AS_HELP_STRING([--disable-stack-protector], [Disable -fstack-protector-strong]),
+ [enable_stack_protector=$enableval], [enable_stack_protector=yes])
+AS_IF([test x"$enable_stack_protector" = "xyes"],
+ [AX_APPEND_COMPILE_FLAGS([-fstack-protector-strong])])
+
AX_APPEND_COMPILE_FLAGS([-Wall -Wmissing-prototypes -Wstrict-prototypes])
AX_APPEND_LINK_FLAGS([-Wl,--as-needed])
--
2.29.2
@@ -0,0 +1,47 @@
From 8df3a56cfb104c84d4701562ae2e3c9dc4686798 Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Sat, 6 Feb 2021 11:08:45 +0100
Subject: [PATCH] configure.ac: fix static linking with id3tag
Put back -lz (i.e. ZLIB_LIBS) when searching for id3tag which was
wrongly removed by commit 6ff0e9322f9891f5a6ac6c9b3bceffbfca16bec3. This
will fix the following static build failure:
configure:15290: checking for id3_file_open in -lid3tag
configure:15315: /home/buildroot/autobuild/instance-0/output-1/host/bin/arm-linux-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -static -Wall -Wmissing-prototypes -Wstrict-prototypes -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -static -Wl,--as-needed conftest.c -lid3tag >&5
conftest.c:60:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]
60 | char id3_file_open ();
| ^~~~
conftest.c:62:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]
62 | main ()
| ^~~~
/home/buildroot/autobuild/instance-0/output-1/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/9.3.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: /home/buildroot/autobuild/instance-0/output-1/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libid3tag.a(util.o): in function `id3_util_compress':
util.c:(.text+0x1ac): undefined reference to `compress2'
/home/buildroot/autobuild/instance-0/output-1/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/9.3.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: /home/buildroot/autobuild/instance-0/output-1/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libid3tag.a(util.o): in function `id3_util_decompress':
util.c:(.text+0x240): undefined reference to `uncompress'
Fixes:
- http://autobuild.buildroot.org/results/73efdacf237e3d567fa66f3b3f68e624f5e35bc7
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
[Upstream status: https://sourceforge.net/p/sox/patches/123]
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 39306398..896714f5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -83,7 +83,7 @@ dnl Various libraries
SOX_WITH_LIB([magic], [magic.h], [magic], [magic_open])
SOX_CHECK_LIB([ZLIB], [zlib.h], [z], [uncompress])
SOX_WITH_LIB([png], [png.h], [png], [png_set_rows], [], [], [], [$ZLIB_LIBS])
-SOX_WITH_LIB([id3tag], [id3tag.h], [id3tag], [id3_file_open])
+SOX_WITH_LIB([id3tag], [id3tag.h], [id3tag], [id3_file_open], [], [], [], [$ZLIB_LIBS])
SOX_WITH_LIB([libgsm], [gsm/gsm.h gsm.h], [gsm], [gsm_create])
dnl Optional formats
--
2.29.2
@@ -0,0 +1,48 @@
From 4630e574e6c0269b94fd910e7c72b8ad1ee62ce7 Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Wed, 3 Mar 2021 16:48:57 +0100
Subject: [PATCH] configure.ac: fix static linking with magic
Use SOX_FMT_PKG to retrieve magic dependencies (e.g. bzip2 or zlib)
indeed -lz (i.e. ZLIB_LIBS) was wrongly removed by commit
6ff0e9322f9891f5a6ac6c9b3bceffbfca16bec3. This will fix the following
static build failure:
configure:11677: checking for magic_open in -lmagic
configure:11702: /srv/storage/autobuild/run/instance-0/output-1/host/bin/arm-linux-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -static -Wall -Wmissing-prototypes -Wstrict-prototypes -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -static -Wl,--as-needed conftest.c -lmagic >&5
conftest.c:53:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]
53 | char magic_open ();
| ^~~~
conftest.c:55:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]
55 | main ()
| ^~~~
/srv/storage/autobuild/run/instance-0/output-1/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/9.3.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: /srv/storage/autobuild/run/instance-0/output-1/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libmagic.a(compress.o): in function `uncompresszlib':
compress.c:(.text+0x1d0): undefined reference to `inflateInit_'
/srv/storage/autobuild/run/instance-0/output-1/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/9.3.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: compress.c:(.text+0x1e4): undefined reference to `inflate'
/srv/storage/autobuild/run/instance-0/output-1/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/9.3.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: compress.c:(.text+0x1fc): undefined reference to `inflateEnd'
Fixes:
- http://autobuild.buildroot.org/results/d96f27cd96926060046e2e1115777f5bceda3741
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
[Upstream status: not sent yet (waiting for feedback on third patch)]
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 896714f5..8ae3202c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -80,7 +80,7 @@ SOX_REPORT([other], [LADSPA effect plugins], [$HAVE_LADSPA])
dnl Various libraries
-SOX_WITH_LIB([magic], [magic.h], [magic], [magic_open])
+SOX_FMT_PKG([magic], [libmagic])
SOX_CHECK_LIB([ZLIB], [zlib.h], [z], [uncompress])
SOX_WITH_LIB([png], [png.h], [png], [png_set_rows], [], [], [], [$ZLIB_LIBS])
SOX_WITH_LIB([id3tag], [id3tag.h], [id3tag], [id3_file_open], [], [], [], [$ZLIB_LIBS])
--
2.30.1
+12
View File
@@ -0,0 +1,12 @@
config BR2_PACKAGE_SOX
bool "sox"
help
SoX is a cross-platform (Windows, Linux, MacOS X, etc.)
command line utility that can convert various formats of
computer audio files into other formats.
It can also apply various effects to these sound files, and,
as an added bonus, SoX can play and record audio files on
most platforms.
http://sox.sourceforge.net/
+4
View File
@@ -0,0 +1,4 @@
# Locally computed
sha256 3d06ba8fc39ac92f16da73593be48afe0a704fe4dc4f6eca2e5137ef77cd5115 sox-7524160b29a476f7e87bc14fddf12d349f9a3c5e-br1.tar.gz
sha256 ab15fd526bd8dd18a9e77ebc139656bf4d33e97fc7238cd11bf60e2b9b8666c6 LICENSE.GPL
sha256 5df07007198989c622f5d41de8d703e7bef3d0e79d62e24332ee739a452af62a LICENSE.LGPL
+140
View File
@@ -0,0 +1,140 @@
################################################################################
#
# sox
#
################################################################################
SOX_VERSION = 7524160b29a476f7e87bc14fddf12d349f9a3c5e
SOX_SITE = git://git.code.sf.net/p/sox/code
SOX_SITE_METHOD = git
SOX_DEPENDENCIES = host-autoconf-archive host-pkgconf
SOX_LICENSE = GPL-2.0+ (sox binary), LGPL-2.1+ (libraries)
SOX_LICENSE_FILES = LICENSE.GPL LICENSE.LGPL
SOX_CPE_ID_VENDOR = sound_exchange_project
SOX_CPE_ID_PRODUCT = sound_exchange
# From git and we're patching configure.ac
SOX_AUTORECONF = YES
SOX_AUTORECONF_OPTS = --include=$(HOST_DIR)/share/autoconf-archive
SOX_IGNORE_CVES += CVE-2017-11332 CVE-2017-11358 CVE-2017-11359 \
CVE-2017-15370 CVE-2017-15371 CVE-2017-15372 CVE-2017-15642 \
CVE-2017-18189 CVE-2019-8354 CVE-2019-8355 CVE-2019-8356 \
CVE-2019-8357 CVE-2019-13590
SOX_CONF_OPTS = \
--with-distro="Buildroot" \
--disable-stack-protector
ifeq ($(BR2_PACKAGE_ALSA_LIB_PCM),y)
SOX_DEPENDENCIES += alsa-lib
SOX_CONF_OPTS += --enable-alsa
else
SOX_CONF_OPTS += --disable-alsa
endif
ifeq ($(BR2_PACKAGE_FILE),y)
SOX_DEPENDENCIES += file
SOX_CONF_OPTS += --enable-magic
else
SOX_CONF_OPTS += --disable-magic
endif
ifeq ($(BR2_PACKAGE_FLAC),y)
SOX_DEPENDENCIES += flac
SOX_CONF_OPTS += --enable-flac
else
SOX_CONF_OPTS += --disable-flac
endif
ifeq ($(BR2_PACKAGE_LAME),y)
SOX_DEPENDENCIES += lame
SOX_CONF_OPTS += --with-lame
else
SOX_CONF_OPTS += --without-lame
endif
ifeq ($(BR2_PACKAGE_LIBAO),y)
SOX_DEPENDENCIES += libao
SOX_CONF_OPTS += --enable-ao
else
SOX_CONF_OPTS += --disable-ao
endif
ifeq ($(BR2_PACKAGE_LIBGSM),y)
SOX_DEPENDENCIES += libgsm
SOX_CONF_OPTS += --enable-gsm
else
SOX_CONF_OPTS += --disable-gsm
endif
ifeq ($(BR2_PACKAGE_LIBID3TAG),y)
SOX_DEPENDENCIES += libid3tag
SOX_CONF_OPTS += --with-id3tag
else
SOX_CONF_OPTS += --without-id3tag
endif
ifeq ($(BR2_PACKAGE_LIBMAD),y)
SOX_DEPENDENCIES += libmad
SOX_CONF_OPTS += --with-mad
else
SOX_CONF_OPTS += --without-mad
endif
ifeq ($(BR2_PACKAGE_LIBPNG),y)
SOX_DEPENDENCIES += libpng
SOX_CONF_OPTS += --with-png
else
SOX_CONF_OPTS += --without-png
endif
ifeq ($(BR2_PACKAGE_LIBSNDFILE),y)
SOX_DEPENDENCIES += libsndfile
SOX_CONF_OPTS += --enable-sndfile
else
SOX_CONF_OPTS += --disable-sndfile
endif
ifeq ($(BR2_PACKAGE_LIBVORBIS),y)
SOX_DEPENDENCIES += libvorbis
SOX_CONF_OPTS += --enable-oggvorbis
else
SOX_CONF_OPTS += --disable-oggvorbis
endif
ifeq ($(BR2_PACKAGE_OPENCORE_AMR),y)
SOX_DEPENDENCIES += opencore-amr
SOX_CONF_OPTS += --enable-amrwb --enable-amrnb
else
SOX_CONF_OPTS += --disable-amrwb --disable-amrnb
endif
ifeq ($(BR2_PACKAGE_OPUSFILE),y)
SOX_DEPENDENCIES += opusfile
SOX_CONF_OPTS += --enable-opus
else
SOX_CONF_OPTS += --disable-opus
endif
ifeq ($(BR2_PACKAGE_PULSEAUDIO),y)
SOX_DEPENDENCIES += pulseaudio
SOX_CONF_OPTS += --enable-pulseaudio
else
SOX_CONF_OPTS += --disable-pulseaudio
endif
ifeq ($(BR2_PACKAGE_TWOLAME),y)
SOX_DEPENDENCIES += twolame
SOX_CONF_OPTS += --with-twolame
else
SOX_CONF_OPTS += --without-twolame
endif
ifeq ($(BR2_PACKAGE_WAVPACK),y)
SOX_DEPENDENCIES += wavpack
SOX_CONF_OPTS += --enable-wavpack
else
SOX_CONF_OPTS += --disable-wavpack
endif
$(eval $(autotools-package))
@@ -0,0 +1,22 @@
Fetch from: https://github.com/Schischu/ptxdist_sh/tree/master/patches/sp-oops-extract-0.0.7
From: Bernhard Walle <walle@corscience.de>
Date: Wed, 21 Mar 2012 15:55:06 +0100
Subject: [PATCH] Make the Makefile more cross-compiler friendly
Signed-off-by: Bernhard Walle <walle@corscience.de>
---
src/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/Makefile b/src/Makefile
index cf5b550..e05eb1f 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -9,4 +9,4 @@ distclean: clean
$(RM) $(TARGETS)
sp-oops-extract: oopslog.c
- gcc -Wall -s -o $@ $^
+ $(CC) $(LDFLAGS) $(CPPFLAGS) $(CFLAGS) -Wall -o $@ $^
@@ -0,0 +1,33 @@
consolidate use of stdint types
Change u_int*_t to uint*_t for compatibility with a larger number of C
libraries.
Signed-off-by: Doug Kehn <rdkehn@yahoo.com>
Index: sp-oops-extract-0.0.7-1/src/oopslog.c
===================================================================
--- sp-oops-extract-0.0.7-1.orig/src/oopslog.c
+++ sp-oops-extract-0.0.7-1/src/oopslog.c
@@ -64,8 +64,8 @@ static int try_to_check_for_bad_blocks(v
int main(const int argc, const char *argv[])
{
- u_int32_t *count, maxcount = 0xffffffff;
- u_int32_t *magic_ptr, magic_value = 0x5d005d00;
+ uint32_t *count, maxcount = 0xffffffff;
+ uint32_t *magic_ptr, magic_value = 0x5d005d00;
unsigned char *charbuf;
unsigned long size;
@@ -137,8 +137,8 @@ int main(const int argc, const char *arg
errx(-1, "%s is something weird", device);
charbuf = buf;
- count = (u_int32_t *) buf;
- magic_ptr = (u_int32_t *) (buf + sizeof(u_int32_t));
+ count = (uint32_t *) buf;
+ magic_ptr = (uint32_t *) (buf + sizeof(uint32_t));
for (i = 0; i < (size / OOPS_PAGE_SIZE); i++) {
pread(fd, buf, OOPS_PAGE_SIZE, i * OOPS_PAGE_SIZE);
+6
View File
@@ -0,0 +1,6 @@
config BR2_PACKAGE_SP_OOPS_EXTRACT
bool "sp-oops-extract"
help
A tool for extracting OOPS/panic logs from MTD.
http://maemo.org/packages/view/sp-oops-extract/
@@ -0,0 +1,3 @@
# Locally computed:
sha256 85601a569af1f4584db75fad21d3a70e377ce12d1bccad7dbe1112abd3b43d93 sp-oops-extract_0.0.7-1.tar.gz
sha256 c38aee9e3c8c4d5d594ff548a1be05453023016d6286931f6512db215ec1fd42 COPYING
@@ -0,0 +1,22 @@
################################################################################
#
# sp-oops-extract
#
################################################################################
SP_OOPS_EXTRACT_VERSION = 0.0.7-1
SP_OOPS_EXTRACT_SITE = http://repository.maemo.org/pool/maemo5.0/free/s/sp-oops-extract
SP_OOPS_EXTRACT_SOURCE = sp-oops-extract_$(SP_OOPS_EXTRACT_VERSION).tar.gz
SP_OOPS_EXTRACT_LICENSE = GPL-2.0
SP_OOPS_EXTRACT_LICENSE_FILES = COPYING
define SP_OOPS_EXTRACT_BUILD_CMDS
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS)
endef
define SP_OOPS_EXTRACT_INSTALL_TARGET_CMDS
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install \
DESTDIR=$(TARGET_DIR)
endef
$(eval $(generic-package))
@@ -0,0 +1,60 @@
From e7330bfe63efd0062fa51d50a4aaa0f1abd5ff75 Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Sun, 22 Nov 2020 17:02:43 +0100
Subject: [PATCH] configure.ac: fix AVX, SSE and MMX options
AVX, SSE and MMX options are broken since
https://github.com/freeswitch/spandsp/commit/87a900c70df73e128a5926587047f529105f5f64
For example, when the user enables SSE, it will also enable MMX and the
user can't disable MMX
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
[Upstream status: https://github.com/freeswitch/spandsp/pull/20]
---
configure.ac | 8 --------
1 file changed, 8 deletions(-)
diff --git a/configure.ac b/configure.ac
index 83fb3fd..ac2592e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -486,35 +486,27 @@ armv7[bl] | armv7-*)
x86_64-* | i386-* | i686-*)
if test "$enable_avx2" = "yes" ; then
AC_DEFINE([SPANDSP_USE_AVX2], [1], [Use the AVX2 instruction set (i386 and x86_64 only).])
- enable_avx="yes"
fi
if test "$enable_avx" = "yes" ; then
AC_DEFINE([SPANDSP_USE_AVX], [1], [Use the AVX instruction set (i386 and x86_64 only).])
- enable_sse4_2="yes"
fi
if test "$enable_sse4_2" = "yes" ; then
AC_DEFINE([SPANDSP_USE_SSE4_2], [1], [Use the SSE4.2 instruction set (i386 and x86_64 only).])
- enable_sse4_1="yes"
fi
if test "$enable_sse4_1" = "yes" ; then
AC_DEFINE([SPANDSP_USE_SSE4_1], [1], [Use the SSE4.1 instruction set (i386 and x86_64 only).])
- enable_ssse3="yes"
fi
if test "$enable_ssse3" = "yes" ; then
AC_DEFINE([SPANDSP_USE_SSSE3], [1], [Use the SSSE3 instruction set (i386 and x86_64 only).])
- enable_sse3="yes"
fi
if test "$enable_sse3" = "yes" ; then
AC_DEFINE([SPANDSP_USE_SSE3], [1], [Use the SSE3 instruction set (i386 and x86_64 only).])
- enable_sse2="yes"
fi
if test "$enable_sse2" = "yes" ; then
AC_DEFINE([SPANDSP_USE_SSE2], [1], [Use the SSE2 instruction set (i386 and x86_64 only).])
- enable_sse="yes"
fi
if test "$enable_sse" = "yes" ; then
AC_DEFINE([SPANDSP_USE_SSE], [1], [Use the SSE instruction set (i386 and x86_64 only).])
- enable_mmx="yes"
fi
if test "$enable_mmx" = "yes" ; then
AC_DEFINE([SPANDSP_USE_MMX], [1], [Use the MMX instruction set (i386 and x86_64 only).])
--
2.29.2
+10
View File
@@ -0,0 +1,10 @@
config BR2_PACKAGE_SPANDSP
bool "spandsp"
select BR2_PACKAGE_TIFF
select BR2_PACKAGE_TIFF_JPEG
help
Spandsp is a library of many DSP functions for telephony.
These range from simple modules, such as DTMF detection, to
a complete software FAX machine.
https://github.com/freeswitch/spandsp
+3
View File
@@ -0,0 +1,3 @@
# sha256 locally computed
sha256 a11beed46b488a4cac3b0c42042ad28448bcee4c0027a82d5449180bbb178836 spandsp-3.0.0-6ec23e5a7e.tar.gz
sha256 366576cb0b869cd9e95a4882878607314650488ac635e5df0692180382e9666a COPYING
+29
View File
@@ -0,0 +1,29 @@
################################################################################
#
# spandsp
#
################################################################################
SPANDSP_VERSION = 3.0.0-6ec23e5a7e
SPANDSP_SITE = https://files.freeswitch.org/downloads/libs
SPANDSP_LICENSE = LGPL-2.1 (library), GPL-2.0 (test suite)
SPANDSP_LICENSE_FILES = COPYING
# We're patching configure.ac
SPANDSP_AUTORECONF = YES
SPANDSP_DEPENDENCIES = tiff host-pkgconf
SPANDSP_INSTALL_STAGING = YES
SPANDSP_CONF_ENV = LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs libtiff-4`"
# MMX on i686 raises a build failure
SPANDSP_CONF_OPTS = \
--disable-builtin-tiff \
$(if $(BR2_x86_64),--enable-mmx,--disable-mmx) \
$(if $(BR2_X86_CPU_HAS_SSE),--enable-sse,--disable-sse) \
$(if $(BR2_X86_CPU_HAS_SSE2),--enable-sse2,--disable-sse2) \
$(if $(BR2_X86_CPU_HAS_SSE3),--enable-sse3,--disable-sse3) \
$(if $(BR2_X86_CPU_HAS_SSSE3),--enable-ssse3,--disable-ssse3) \
$(if $(BR2_X86_CPU_HAS_SSE4),--enable-sse4-1,--disable-sse4-1) \
$(if $(BR2_X86_CPU_HAS_SSE42),--enable-sse4-2,--disable-sse4-2)
$(eval $(autotools-package))
+8
View File
@@ -0,0 +1,8 @@
config BR2_PACKAGE_SPAWN_FCGI
bool "spawn-fcgi"
depends on BR2_USE_MMU # fork()
help
FastCGI process spawner.
Project split from lighttpd.
http://redmine.lighttpd.net/projects/spawn-fcgi
+4
View File
@@ -0,0 +1,4 @@
# From http://redmine.lighttpd.net/news/9
sha256 a3cfc7c9581b6ddc31084b379c9160323fa345d357ace6cd2d3d3af3593e2873 spawn-fcgi-1.6.4.tar.bz2
# Locally computed
sha256 5c98cad2fbaf5c5e2562bcbab401a7c557c1bb1bac9914ecc63730925052fb13 COPYING
+14
View File
@@ -0,0 +1,14 @@
################################################################################
#
# spawn-fcgi
#
################################################################################
SPAWN_FCGI_VERSION = 1.6.4
SPAWN_FCGI_SITE = http://www.lighttpd.net/download
SPAWN_FCGI_SOURCE = spawn-fcgi-$(SPAWN_FCGI_VERSION).tar.bz2
SPAWN_FCGI_LICENSE = BSD-3-Clause
SPAWN_FCGI_LICENSE_FILES = COPYING
SPAWN_FCGI_CPE_ID_VENDOR = lighttpd
$(eval $(autotools-package))
+14
View File
@@ -0,0 +1,14 @@
config BR2_PACKAGE_SPDLOG
bool "spdlog"
depends on BR2_INSTALL_LIBSTDCPP
depends on BR2_TOOLCHAIN_HAS_THREADS
depends on BR2_USE_WCHAR # fmt
select BR2_PACKAGE_FMT
help
Very fast, header-only/compiled, C++ logging library.
https://github.com/gabime/spdlog
comment "spdlog needs a toolchain w/ C++, threads, wchar"
depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS \
|| !BR2_USE_WCHAR
+3
View File
@@ -0,0 +1,3 @@
# Locally calculated
sha256 e20e6bd8f57e866eaf25a5417f0a38a116e537f1a77ac7b5409ca2b180cec0d5 spdlog-1.8.2.tar.gz
sha256 a7241a379cb98d37788f82c2fc2e484c3ae85dae881fd3406f0637644850926f LICENSE
+25
View File
@@ -0,0 +1,25 @@
################################################################################
#
# spdlog
#
################################################################################
SPDLOG_VERSION = 1.8.2
SPDLOG_SITE = $(call github,gabime,spdlog,v$(SPDLOG_VERSION))
SPDLOG_LICENSE = MIT
SPDLOG_LICENSE_FILES = LICENSE
SPDLOG_INSTALL_STAGING = YES
SPDLOG_DEPENDENCIES = fmt
SPDLOG_CONF_OPTS += \
-DSPDLOG_BUILD_TESTS=OFF \
-DSPDLOG_BUILD_EXAMPLE=OFF \
-DSPDLOG_BUILD_BENCH=OFF \
-DSPDLOG_FMT_EXTERNAL=ON
ifeq ($(BR2_STATIC_LIBS),y)
SPDLOG_CONF_OPTS += -DSPDLOG_BUILD_SHARED=OFF
else
SPDLOG_CONF_OPTS += -DSPDLOG_BUILD_SHARED=ON
endif
$(eval $(cmake-package))
+222
View File
@@ -0,0 +1,222 @@
Make speex Thumb2 compatible
Patch written by Michael Hope from Linaro, available at
http://lists.xiph.org/pipermail/speex-dev/2010-November/008041.html.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
[Bernd: rebased for 1.2.0]
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
diff --git a/libspeex/filters_arm4.h b/libspeex/filters_arm4.h
index 7a74042..6ec1f75 100644
--- a/libspeex/filters_arm4.h
+++ b/libspeex/filters_arm4.h
@@ -47,8 +47,10 @@ int normalize16(const spx_sig_t *x, spx_word16_t *y, spx_sig_t max_scale, int le
"\tldr %4, [%0], #4 \n"
"\tcmp %4, %1 \n"
+ "\tit gt \n"
"\tmovgt %1, %4 \n"
"\tcmp %4, %3 \n"
+ "\tit lt \n"
"\tmovlt %3, %4 \n"
"\tsubs %2, %2, #1 \n"
@@ -56,6 +58,7 @@ int normalize16(const spx_sig_t *x, spx_word16_t *y, spx_sig_t max_scale, int le
"\trsb %3, %3, #0 \n"
"\tcmp %1, %3 \n"
+ "\tit lt \n"
"\tmovlt %1, %3 \n"
: "=r" (dead1), "=r" (max_val), "=r" (dead3), "=r" (dead4),
"=r" (dead5), "=r" (dead6)
diff --git a/libspeex/fixed_arm4.h b/libspeex/fixed_arm4.h
index b6981ca..b6218ca 100644
--- a/libspeex/fixed_arm4.h
+++ b/libspeex/fixed_arm4.h
@@ -69,72 +69,90 @@ static inline short DIV32_16(int a, int b)
__asm__ __volatile__ (
"\teor %5, %0, %1\n"
"\tmovs %4, %0\n"
+ "\tit mi \n"
"\trsbmi %0, %0, #0 \n"
"\tmovs %4, %1\n"
+ "\tit mi \n"
"\trsbmi %1, %1, #0 \n"
"\tmov %4, #1\n"
"\tsubs %3, %0, %1, asl #14 \n"
+ "\titt pl \n"
"\tmovpl %0, %3 \n"
"\torrpl %2, %2, %4, asl #14 \n"
"\tsubs %3, %0, %1, asl #13 \n"
+ "\titt pl \n"
"\tmovpl %0, %3 \n"
"\torrpl %2, %2, %4, asl #13 \n"
"\tsubs %3, %0, %1, asl #12 \n"
+ "\titt pl \n"
"\tmovpl %0, %3 \n"
"\torrpl %2, %2, %4, asl #12 \n"
"\tsubs %3, %0, %1, asl #11 \n"
+ "\titt pl \n"
"\tmovpl %0, %3 \n"
"\torrpl %2, %2, %4, asl #11 \n"
"\tsubs %3, %0, %1, asl #10 \n"
+ "\titt pl \n"
"\tmovpl %0, %3 \n"
"\torrpl %2, %2, %4, asl #10 \n"
"\tsubs %3, %0, %1, asl #9 \n"
+ "\titt pl \n"
"\tmovpl %0, %3 \n"
"\torrpl %2, %2, %4, asl #9 \n"
"\tsubs %3, %0, %1, asl #8 \n"
+ "\titt pl \n"
"\tmovpl %0, %3 \n"
"\torrpl %2, %2, %4, asl #8 \n"
"\tsubs %3, %0, %1, asl #7 \n"
+ "\titt pl \n"
"\tmovpl %0, %3 \n"
"\torrpl %2, %2, %4, asl #7 \n"
"\tsubs %3, %0, %1, asl #6 \n"
+ "\titt pl \n"
"\tmovpl %0, %3 \n"
"\torrpl %2, %2, %4, asl #6 \n"
"\tsubs %3, %0, %1, asl #5 \n"
+ "\titt pl \n"
"\tmovpl %0, %3 \n"
"\torrpl %2, %2, %4, asl #5 \n"
"\tsubs %3, %0, %1, asl #4 \n"
+ "\titt pl \n"
"\tmovpl %0, %3 \n"
"\torrpl %2, %2, %4, asl #4 \n"
"\tsubs %3, %0, %1, asl #3 \n"
+ "\titt pl \n"
"\tmovpl %0, %3 \n"
"\torrpl %2, %2, %4, asl #3 \n"
"\tsubs %3, %0, %1, asl #2 \n"
+ "\titt pl \n"
"\tmovpl %0, %3 \n"
"\torrpl %2, %2, %4, asl #2 \n"
"\tsubs %3, %0, %1, asl #1 \n"
+ "\titt pl \n"
"\tmovpl %0, %3 \n"
"\torrpl %2, %2, %4, asl #1 \n"
"\tsubs %3, %0, %1 \n"
+ "\titt pl \n"
"\tmovpl %0, %3 \n"
"\torrpl %2, %2, %4 \n"
"\tmovs %5, %5, lsr #31 \n"
+ "\tit ne \n"
"\trsbne %2, %2, #0 \n"
: "=r" (dead1), "=r" (dead2), "=r" (res),
"=r" (dead3), "=r" (dead4), "=r" (dead5)
diff --git a/libspeex/fixed_arm5e.h b/libspeex/fixed_arm5e.h
index 9b4861c..bdadd02 100644
--- a/libspeex/fixed_arm5e.h
+++ b/libspeex/fixed_arm5e.h
@@ -97,72 +97,90 @@ static inline short DIV32_16(int a, int b)
__asm__ __volatile__ (
"\teor %5, %0, %1\n"
"\tmovs %4, %0\n"
+ "\tit mi \n"
"\trsbmi %0, %0, #0 \n"
"\tmovs %4, %1\n"
+ "\tit mi \n"
"\trsbmi %1, %1, #0 \n"
"\tmov %4, #1\n"
"\tsubs %3, %0, %1, asl #14 \n"
+ "\titt pl \n"
"\torrpl %2, %2, %4, asl #14 \n"
"\tmovpl %0, %3 \n"
"\tsubs %3, %0, %1, asl #13 \n"
+ "\titt pl \n"
"\torrpl %2, %2, %4, asl #13 \n"
"\tmovpl %0, %3 \n"
"\tsubs %3, %0, %1, asl #12 \n"
+ "\titt pl \n"
"\torrpl %2, %2, %4, asl #12 \n"
"\tmovpl %0, %3 \n"
"\tsubs %3, %0, %1, asl #11 \n"
+ "\titt pl \n"
"\torrpl %2, %2, %4, asl #11 \n"
"\tmovpl %0, %3 \n"
"\tsubs %3, %0, %1, asl #10 \n"
+ "\titt pl \n"
"\torrpl %2, %2, %4, asl #10 \n"
"\tmovpl %0, %3 \n"
"\tsubs %3, %0, %1, asl #9 \n"
+ "\titt pl \n"
"\torrpl %2, %2, %4, asl #9 \n"
"\tmovpl %0, %3 \n"
"\tsubs %3, %0, %1, asl #8 \n"
+ "\titt pl \n"
"\torrpl %2, %2, %4, asl #8 \n"
"\tmovpl %0, %3 \n"
"\tsubs %3, %0, %1, asl #7 \n"
+ "\titt pl \n"
"\torrpl %2, %2, %4, asl #7 \n"
"\tmovpl %0, %3 \n"
"\tsubs %3, %0, %1, asl #6 \n"
+ "\titt pl \n"
"\torrpl %2, %2, %4, asl #6 \n"
"\tmovpl %0, %3 \n"
"\tsubs %3, %0, %1, asl #5 \n"
+ "\titt pl \n"
"\torrpl %2, %2, %4, asl #5 \n"
"\tmovpl %0, %3 \n"
"\tsubs %3, %0, %1, asl #4 \n"
+ "\titt pl \n"
"\torrpl %2, %2, %4, asl #4 \n"
"\tmovpl %0, %3 \n"
"\tsubs %3, %0, %1, asl #3 \n"
+ "\titt pl \n"
"\torrpl %2, %2, %4, asl #3 \n"
"\tmovpl %0, %3 \n"
"\tsubs %3, %0, %1, asl #2 \n"
+ "\titt pl \n"
"\torrpl %2, %2, %4, asl #2 \n"
"\tmovpl %0, %3 \n"
"\tsubs %3, %0, %1, asl #1 \n"
+ "\titt pl \n"
"\torrpl %2, %2, %4, asl #1 \n"
"\tmovpl %0, %3 \n"
"\tsubs %3, %0, %1 \n"
+ "\titt pl \n"
"\torrpl %2, %2, %4 \n"
"\tmovpl %0, %3 \n"
"\tmovs %5, %5, lsr #31 \n"
+ "\tit ne \n"
"\trsbne %2, %2, #0 \n"
: "=r" (dead1), "=r" (dead2), "=r" (res),
"=r" (dead3), "=r" (dead4), "=r" (dead5)
+23
View File
@@ -0,0 +1,23 @@
config BR2_PACKAGE_SPEEX
bool "speex"
select BR2_PACKAGE_LIBOGG
help
Speex is an Open Source/Free Software patent-free
audio compression format designed for speech.
It can be used for Voice over IP
http://www.speex.org/
if BR2_PACKAGE_SPEEX
config BR2_PACKAGE_SPEEX_ARM4
bool
default y
depends on BR2_ARM_CPU_ARMV4
config BR2_PACKAGE_SPEEX_ARM5E
bool
default y
depends on BR2_arm && !BR2_PACKAGE_SPEEX_ARM4
endif
+6
View File
@@ -0,0 +1,6 @@
# From https://downloads.xiph.org/releases/speex/SHA256SUMS.txt
sha256 eaae8af0ac742dc7d542c9439ac72f1f385ce838392dc849cae4536af9210094 speex-1.2.0.tar.gz
# From https://downloads.xiph.org/releases/speex/MD5SUMS
md5 8ab7bb2589110dfaf0ed7fa7757dc49c speex-1.2.0.tar.gz
# Locally computed
sha256 671bb5d8fd3c6b05a2e831d90f978ac27965c92bd8ea6d16b3df76e3440c0e9f COPYING
+35
View File
@@ -0,0 +1,35 @@
################################################################################
#
# speex
#
################################################################################
SPEEX_VERSION = 1.2.0
SPEEX_SITE = https://downloads.xiph.org/releases/speex
SPEEX_LICENSE = BSD-3-Clause
SPEEX_LICENSE_FILES = COPYING
SPEEX_INSTALL_STAGING = YES
SPEEX_DEPENDENCIES = host-pkgconf libogg
SPEEX_CONF_OPTS = \
--enable-fixed-point
ifeq ($(BR2_PACKAGE_SPEEXDSP),y)
SPEEX_DEPENDENCIES += speexdsp
endif
ifeq ($(BR2_PACKAGE_SPEEX_ARM4),y)
SPEEX_CONF_OPTS += --enable-arm4-asm
endif
ifeq ($(BR2_PACKAGE_SPEEX_ARM5E),y)
SPEEX_CONF_OPTS += --enable-arm5e-asm
endif
define SPEEX_LIBTOOL_FIXUP
$(SED) 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' $(@D)/libtool
$(SED) 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' $(@D)/libtool
endef
SPEEX_POST_CONFIGURE_HOOKS += SPEEX_LIBTOOL_FIXUP
$(eval $(autotools-package))
+6
View File
@@ -0,0 +1,6 @@
config BR2_PACKAGE_SPEEXDSP
bool "speexdsp"
help
DSP library derived from speex.
https://www.speex.org
+3
View File
@@ -0,0 +1,3 @@
# Locally computed
sha256 c92c7e428cb5ca11b4e6f13118ff288332f330b6fefc93cb39bf7b43b13cb1f7 speexdsp-SpeexDSP-1.2.0-br1.tar.gz
sha256 671bb5d8fd3c6b05a2e831d90f978ac27965c92bd8ea6d16b3df76e3440c0e9f COPYING
+16
View File
@@ -0,0 +1,16 @@
################################################################################
#
# speexdsp
#
################################################################################
SPEEXDSP_VERSION = SpeexDSP-1.2.0
SPEEXDSP_SITE = https://gitlab.xiph.org/xiph/speexdsp.git
SPEEXDSP_SITE_METHOD = git
SPEEXDSP_LICENSE = BSD-3-Clause
SPEEXDSP_LICENSE_FILES = COPYING
SPEEXDSP_INSTALL_STAGING = YES
SPEEXDSP_DEPENDENCIES = host-pkgconf
SPEEXDSP_AUTORECONF = YES
$(eval $(autotools-package))
+13
View File
@@ -0,0 +1,13 @@
config BR2_PACKAGE_SPHINXBASE
bool "sphinxbase"
depends on BR2_TOOLCHAIN_HAS_THREADS
help
CMUSphinx toolkit is a leading speech recognition toolkit
with various tools used to build speech applications. CMU
Sphinx toolkit has a number of packages for different tasks
and applications.
http://cmusphinx.sourceforge.net/
comment "sphinxbase needs a toolchain with threads"
depends on !BR2_TOOLCHAIN_HAS_THREADS
+3
View File
@@ -0,0 +1,3 @@
# Locally computed
sha256 06971dbe272d2f73bde0ef7b3538c0c8f8ea885cb171fd6b17a5975bced66e64 sphinxbase-5prealpha.tar.gz
sha256 26f12e0152a5d58c69904e439761a1b2fbb9267b5f04674dbf93667e3e6dd043 src/libsphinxbase/util/bio.c
+19
View File
@@ -0,0 +1,19 @@
################################################################################
#
# sphinxbase
#
################################################################################
SPHINXBASE_VERSION = 5prealpha
SPHINXBASE_SITE = http://downloads.sourceforge.net/project/cmusphinx/sphinxbase/5prealpha
SPHINXBASE_LICENSE = BSD-2-Clause
# Note http://sourceforge.net/p/cmusphinx/bugs/441/ "LICENSE file missing in"
# 5prealpha tarballs". The license is contained in the copyright notice at the
# top of each source file. For example:
SPHINXBASE_LICENSE_FILES = src/libsphinxbase/util/bio.c
SPHINXBASE_DEPENDENCIES = host-bison
SPHINXBASE_CONF_OPTS = --without-python --without-lapack
$(eval $(autotools-package))
+7
View File
@@ -0,0 +1,7 @@
config BR2_PACKAGE_SPI_TOOLS
bool "spi-tools"
help
This package contains some simple command line tools to help
using Linux spidev devices.
https://github.com/cpb-/spi-tools
+3
View File
@@ -0,0 +1,3 @@
# locally computed hash
sha256 319ad6ab296111109ea4a820e216cef392429295de7e10e76f7146677337cf09 spi-tools-0.8.6.tar.gz
sha256 a01259a1b522cf0de95824f9860613b453153eebac468e96196d5d7dba84786c LICENSE
+14
View File
@@ -0,0 +1,14 @@
################################################################################
#
# spi-tools
#
################################################################################
SPI_TOOLS_VERSION = 0.8.6
SPI_TOOLS_SITE = $(call github,cpb-,spi-tools,$(SPI_TOOLS_VERSION))
# autoreconf must be run as specified in package documentation
SPI_TOOLS_AUTORECONF = YES
SPI_TOOLS_LICENSE = GPL-2.0
SPI_TOOLS_LICENSE_FILES = LICENSE
$(eval $(autotools-package))
+12
View File
@@ -0,0 +1,12 @@
config BR2_PACKAGE_SPICE_PROTOCOL
bool "spice protocol"
help
The Spice project aims to provide a complete open source
solution for interaction with virtualized desktop devices.
The Spice project deals with both the virtualized devices
and the front-end. Interaction between front-end and
back-end is done using VD-Interfaces.
This package implements the protocol-part of Spice.
http://www.spice-space.org/
@@ -0,0 +1,5 @@
# From https://www.spice-space.org/download/releases/spice-protocol-0.14.3.tar.xz.sha256sum
sha256 f986e5bc2a1598532c4897f889afb0df9257ac21c160c083703ae7c8de99487a spice-protocol-0.14.3.tar.xz
# Hash for license file
sha256 eb55ea746be694c449224c7ddce6340648b075fd377281712a19094e7fb7ef92 COPYING
+14
View File
@@ -0,0 +1,14 @@
################################################################################
#
# spice-protocol
#
################################################################################
SPICE_PROTOCOL_VERSION = 0.14.3
SPICE_PROTOCOL_SOURCE = spice-protocol-$(SPICE_PROTOCOL_VERSION).tar.xz
SPICE_PROTOCOL_SITE = http://www.spice-space.org/download/releases
SPICE_PROTOCOL_LICENSE = BSD-3-Clause
SPICE_PROTOCOL_LICENSE_FILES = COPYING
SPICE_PROTOCOL_INSTALL_STAGING = YES
$(eval $(meson-package))
+24
View File
@@ -0,0 +1,24 @@
comment "spice server needs a toolchain w/ wchar, threads"
depends on BR2_i386 || BR2_x86_64
depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS
config BR2_PACKAGE_SPICE
bool "spice server"
depends on BR2_i386 || BR2_x86_64
depends on BR2_USE_WCHAR # libglib2
depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2
select BR2_PACKAGE_JPEG
select BR2_PACKAGE_LIBGLIB2
select BR2_PACKAGE_OPENSSL
select BR2_PACKAGE_PIXMAN
select BR2_PACKAGE_SPICE_PROTOCOL
help
The Spice project aims to provide a complete open source
solution for interaction with virtualized desktop devices.
The Spice project deals with both the virtualized devices
and the front-end. Interaction between front-end and
back-end is done using VD-Interfaces.
This package implements the server-part of Spice.
http://www.spice-space.org/
+3
View File
@@ -0,0 +1,3 @@
# Locally calculated
sha256 b320cf8f4bd2852750acb703c15b72856027e5a8554f8217dfbb3cc09deba0f5 spice-0.15.0.tar.bz2
sha256 dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551 COPYING
+72
View File
@@ -0,0 +1,72 @@
################################################################################
#
# spice
#
################################################################################
SPICE_VERSION = 0.15.0
SPICE_SOURCE = spice-$(SPICE_VERSION).tar.bz2
SPICE_SITE = http://www.spice-space.org/download/releases/spice-server
SPICE_LICENSE = LGPL-2.1+
SPICE_LICENSE_FILES = COPYING
SPICE_CPE_ID_VENDOR = spice_project
SPICE_INSTALL_STAGING = YES
SPICE_DEPENDENCIES = \
host-pkgconf \
jpeg \
libglib2 \
openssl \
pixman \
spice-protocol
# We disable everything for now, because the dependency tree can become
# quite deep if we try to enable some features, and I have not tested that.
SPICE_CONF_OPTS = \
--disable-gstreamer \
--disable-opengl \
--disable-smartcard \
--without-sasl \
--disable-manual \
--disable-tests
SPICE_DEPENDENCIES += host-pkgconf
ifeq ($(BR2_PACKAGE_LZ4),y)
SPICE_CONF_OPTS += --enable-lz4
SPICE_DEPENDENCIES += lz4
else
SPICE_CONF_OPTS += --disable-lz4
endif
ifeq ($(BR2_PACKAGE_OPUS),y)
SPICE_CONF_OPTS += --enable-opus
SPICE_DEPENDENCIES += opus
else
SPICE_CONF_OPTS += --disable-opus
endif
# We need to tweak spice.pc because it /forgets/ (for static linking) that
# it should link against libz and libjpeg. libz is pkg-config-aware, while
# libjpeg isn't, hence the two-line tweak
define SPICE_POST_INSTALL_STAGING_FIX_PC
$(SED) 's/^\(Requires.private:.*\)$$/\1 zlib/; s/^\(Libs.private:.*\)$$/\1 -ljpeg/;' \
"$(STAGING_DIR)/usr/lib/pkgconfig/spice-server.pc"
endef
SPICE_POST_INSTALL_STAGING_HOOKS += SPICE_POST_INSTALL_STAGING_FIX_PC
# It is currently not possible to detect if stack-protection is available
# or not, because it requires support from both the compiler *and* the
# C library, but the C library (eg. uClibc) can be compiled without that
# support, even if gcc accepts the -fstack-protector-all option.
# spice's ./configure only checks for gcc's -fstack-protector-all option,
# so it misses the case where the C library doe not provide the requires
# support.
# A correct fix would be to fix spice's ./configure to also check the C
# library, but it might be much more involved.
# So, we simply disable it for now. After all, as uClibc's help puts it:
# Note that NOEXECSTACK on a kernel with address space randomization
# is generally sufficient to prevent most buffer overflow exploits
# without increasing code size.
SPICE_CONF_OPTS += gl_cv_warn__fstack_protector_all=no
$(eval $(autotools-package))
@@ -0,0 +1,61 @@
From 646a78262b18e19721cd41ee515215221dd241b6 Mon Sep 17 00:00:00 2001
From: Hongxu Jia <hongxu.jia@windriver.com>
Date: Thu, 12 Jul 2018 18:12:42 +0800
Subject: [PATCH] allow newer autoconf versions
Spidermonkey is hardcoded to use Autoconf 2.13, which is from 1999!
The reasoning behind using 2.13 is because newer versions of Autoconf at the
time did not work correctly with the custom m4 macros in the source code.
However: Because we are building just the spidermonkey engine instead of the
entire firefox package, and we are using a tarball with a pre-setup
old-configure file, there is no need for the old version of autoconf.
See: https://bugzilla.mozilla.org/show_bug.cgi?id=104642
Upstream-Status: Inappropriate [embedded specific]
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Adam Duskett <aduskett@gmail.com>
---
build/moz.configure/old.configure | 4 ++--
js/src/old-configure | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/build/moz.configure/old.configure b/build/moz.configure/old.configure
index 17d0c5bf..436fcc5e 100644
--- a/build/moz.configure/old.configure
+++ b/build/moz.configure/old.configure
@@ -33,7 +33,7 @@ def autoconf(mozconfig, autoconf):
autoconf = autoconf[0] if autoconf else None
for ac in (mozconfig_autoconf, autoconf, 'autoconf-2.13', 'autoconf2.13',
- 'autoconf213'):
+ 'autoconf213', 'autoconf'):
if ac:
autoconf = find_program(ac)
if autoconf:
@@ -87,7 +87,7 @@ def prepare_configure(old_configure, mozconfig, autoconf, build_env, shell,
old_configure = os.path.join(old_configure_dir, 'js', 'src',
os.path.basename(old_configure))
- refresh = True
+ refresh = False
if exists(old_configure):
mtime = getmtime(old_configure)
aclocal = os.path.join(build_env.topsrcdir, 'build', 'autoconf',
diff --git a/js/src/old-configure b/js/src/old-configure
index 58cc646f..ebd2646e 100644
--- a/js/src/old-configure
+++ b/js/src/old-configure
@@ -587,7 +587,7 @@ if test -z "$srcdir"; then
ac_prog=$0
ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
- srcdir=$ac_confdir
+ srcdir="$ac_confdir/../../"
if test ! -r $srcdir/$ac_unique_file; then
srcdir=..
fi
--
2.23.0
@@ -0,0 +1,47 @@
From 07d40f72e1ed1d84a5ddd98ae8490d41a2e19c46 Mon Sep 17 00:00:00 2001
From: Arjan van de Ven <arjan@linux.intel.com>
Date: Wed, 5 Sep 2018 11:39:01 +0000
Subject: [PATCH] allow building in tree
By default, spidermonkey must be configured and built out-of-tree,
otherwise the following error occurs:
FATAL ERROR PROCESSING MOZBUILD FILE
==============================
The error occurred while processing the following file or one of the files it
includes:
js/src/shell/moz.build
The error occurred when validating the result of the execution. The reported
error is:
Path specified in LOCAL_INCLUDES is not allowed:
.. (resolved to js/src)
Remove this check, as spidermonkey builds without issue in-tree.
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Adam Duskett <aduskett@gmail.com>
---
python/mozbuild/mozbuild/frontend/emitter.py | 5 -----
1 file changed, 5 deletions(-)
diff --git a/python/mozbuild/mozbuild/frontend/emitter.py b/python/mozbuild/mozbuild/frontend/emitter.py
index 642b381c..c37fbf5d 100644
--- a/python/mozbuild/mozbuild/frontend/emitter.py
+++ b/python/mozbuild/mozbuild/frontend/emitter.py
@@ -1127,11 +1127,6 @@ class TreeMetadataEmitter(LoggingMixin):
raise SandboxValidationError('Path specified in LOCAL_INCLUDES '
'does not exist: %s (resolved to %s)' % (local_include,
full_path), context)
- if (full_path == context.config.topsrcdir or
- full_path == context.config.topobjdir):
- raise SandboxValidationError('Path specified in LOCAL_INCLUDES '
- 'is not allowed: %s (resolved to %s)' % (local_include,
- full_path), context)
include_obj = LocalInclude(context, local_include)
local_includes.append(include_obj.path.full_path)
yield include_obj
--
2.23.0
@@ -0,0 +1,35 @@
From 4a06a1a6a71293decb83aee7adb74bc709493106 Mon Sep 17 00:00:00 2001
From: Philip Chimento <philip.chimento@gmail.com>
Date: Wed, 5 Jul 2017 22:57:09 -0700
Subject: [PATCH] allow unknown configuration options
By default, if an unknown parameter is passed to configure, an error is raised.
Replace the raise with a pass and continue.
Fixes: https://bugzilla.mozilla.org/show_bug.cgi?id=1379540
Signed-off-by: Philip Chimento <philip.chimento@gmail.com>
Signed-off-by: Adam Duskett <aduskett@gmail.com>
---
js/src/configure | 9 +++++++++
python/mozbuild/mozbuild/configure/__init__.py | 2 +-
python/mozbuild/mozbuild/configure/options.py | 6 +++++-
3 files changed, 15 insertions(+), 2 deletions(-)
create mode 100755 js/src/configure
diff --git a/python/mozbuild/mozbuild/configure/__init__.py b/python/mozbuild/mozbuild/configure/__init__.py
index 0fe640ca..09b460d3 100644
--- a/python/mozbuild/mozbuild/configure/__init__.py
+++ b/python/mozbuild/mozbuild/configure/__init__.py
@@ -421,7 +421,7 @@ def run(self, path=None):
# All options should have been removed (handled) by now.
for arg in self._helper:
without_value = arg.split('=', 1)[0]
- raise InvalidOptionError('Unknown option: %s' % without_value)
+ pass
# Run the execution queue
for func, args in self._execution_queue:
--
2.23.0
@@ -0,0 +1,133 @@
From 0c9e8f586ba52a9aef5ed298e8315b2598b8fb72 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 25 May 2019 16:54:45 -0700
Subject: [PATCH] fix building with musl
The MIPS specific header <sgidefs.h> is not provided by musl
linux kernel headers provide <asm/sgidefs.h> which has same definitions
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Adam Duskett <aduskett@gmail.com>
---
---
js/src/jsmath.cpp | 2 +-
memory/build/Mutex.h | 4 ++--
mozglue/misc/TimeStamp_darwin.cpp | 1 -
mozglue/misc/TimeStamp_posix.cpp | 1 -
nsprpub/pr/src/misc/prsystem.c | 1 -
third_party/python/psutil/psutil/_psutil_bsd.c | 1 -
third_party/python/psutil/psutil/_psutil_osx.c | 1 -
third_party/python/psutil/psutil/arch/osx/process_info.c | 1 -
8 files changed, 3 insertions(+), 9 deletions(-)
diff --git a/js/src/jsmath.cpp b/js/src/jsmath.cpp
index a28968be..8facaa81 100644
--- a/js/src/jsmath.cpp
+++ b/js/src/jsmath.cpp
@@ -71,7 +71,7 @@
#elif defined(__s390__)
#define GETRANDOM_NR 349
#elif defined(__mips__)
-#include <sgidefs.h>
+#include <asm/sgidefs.h>
#if _MIPS_SIM == _MIPS_SIM_ABI32
#define GETRANDOM_NR 4353
#elif _MIPS_SIM == _MIPS_SIM_ABI64
diff --git a/memory/build/Mutex.h b/memory/build/Mutex.h
index cb8b1e7d..7b9eb1de 100644
--- a/memory/build/Mutex.h
+++ b/memory/build/Mutex.h
@@ -42,7 +42,7 @@ struct Mutex {
if (pthread_mutexattr_init(&attr) != 0) {
return false;
}
- pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ADAPTIVE_NP);
+ pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_STALLED);
if (pthread_mutex_init(&mMutex, &attr) != 0) {
pthread_mutexattr_destroy(&attr);
return false;
@@ -102,7 +102,7 @@ typedef Mutex StaticMutex;
#if defined(XP_DARWIN)
#define STATIC_MUTEX_INIT OS_SPINLOCK_INIT
-#elif defined(XP_LINUX) && !defined(ANDROID)
+#elif defined(XP_LINUX) && !defined(ANDROID) && defined(__GLIBC__)
#define STATIC_MUTEX_INIT PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP
#else
#define STATIC_MUTEX_INIT PTHREAD_MUTEX_INITIALIZER
diff --git a/mozglue/misc/TimeStamp_darwin.cpp b/mozglue/misc/TimeStamp_darwin.cpp
index d2abe9a5..d065649c 100644
--- a/mozglue/misc/TimeStamp_darwin.cpp
+++ b/mozglue/misc/TimeStamp_darwin.cpp
@@ -19,7 +19,6 @@
#include <mach/mach_time.h>
#include <sys/time.h>
-#include <sys/sysctl.h>
#include <time.h>
#include <unistd.h>
diff --git a/mozglue/misc/TimeStamp_posix.cpp b/mozglue/misc/TimeStamp_posix.cpp
index 86c7609a..a37bd93a 100644
--- a/mozglue/misc/TimeStamp_posix.cpp
+++ b/mozglue/misc/TimeStamp_posix.cpp
@@ -21,7 +21,6 @@
#if defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || \
defined(__OpenBSD__)
#include <sys/param.h>
-#include <sys/sysctl.h>
#endif
#if defined(__DragonFly__) || defined(__FreeBSD__)
diff --git a/nsprpub/pr/src/misc/prsystem.c b/nsprpub/pr/src/misc/prsystem.c
index eba85fb0..54b57bb9 100644
--- a/nsprpub/pr/src/misc/prsystem.c
+++ b/nsprpub/pr/src/misc/prsystem.c
@@ -27,7 +27,6 @@
|| defined(OPENBSD) || defined(DRAGONFLY) || defined(DARWIN)
#define _PR_HAVE_SYSCTL
#include <sys/param.h>
-#include <sys/sysctl.h>
#endif
#if defined(DARWIN)
diff --git a/third_party/python/psutil/psutil/_psutil_bsd.c b/third_party/python/psutil/psutil/_psutil_bsd.c
index 9a2ed04b..9e0d34cb 100644
--- a/third_party/python/psutil/psutil/_psutil_bsd.c
+++ b/third_party/python/psutil/psutil/_psutil_bsd.c
@@ -29,7 +29,6 @@
#include <paths.h>
#include <sys/types.h>
#include <sys/param.h>
-#include <sys/sysctl.h>
#include <sys/user.h>
#include <sys/proc.h>
#include <sys/file.h>
diff --git a/third_party/python/psutil/psutil/_psutil_osx.c b/third_party/python/psutil/psutil/_psutil_osx.c
index 55dd64ca..ec356339 100644
--- a/third_party/python/psutil/psutil/_psutil_osx.c
+++ b/third_party/python/psutil/psutil/_psutil_osx.c
@@ -13,7 +13,6 @@
#include <stdlib.h>
#include <stdio.h>
#include <utmpx.h>
-#include <sys/sysctl.h>
#include <sys/vmmeter.h>
#include <libproc.h>
#include <sys/proc_info.h>
diff --git a/third_party/python/psutil/psutil/arch/osx/process_info.c b/third_party/python/psutil/psutil/arch/osx/process_info.c
index 40c79a2c..8de0dcbd 100644
--- a/third_party/python/psutil/psutil/arch/osx/process_info.c
+++ b/third_party/python/psutil/psutil/arch/osx/process_info.c
@@ -16,7 +16,6 @@
#include <stdlib.h>
#include <stdio.h>
#include <signal.h>
-#include <sys/sysctl.h>
#include <libproc.h>
#include "process_info.h"
--
2.23.0
@@ -0,0 +1,121 @@
From 64ad80e6d95871f17be4cd01da15581f41ac0b2b Mon Sep 17 00:00:00 2001
From: Stefan O'Rear <sorear2@gmail.com>
Date: Fri, 11 Nov 2016 21:10:34 -0700
Subject: [PATCH] Add RISC-V support
These changes allow spidermonkey to cross-compile for riscv64 and riscv32.
Upstream-status: Submitted
See: https://bugzilla.mozilla.org/show_bug.cgi?id=1318905
Signed-off-by: Stefan O'Rear <sorear2@gmail.com>
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
Signed-off-by: Adam Duskett <aduskett@gmail.com>
---
build/autoconf/config.guess | 3 +++
build/moz.configure/init.configure | 3 +++
js/src/jit/AtomicOperations.h | 2 ++
js/src/jit/none/AtomicOperations-feeling-lucky.h | 8 ++++++++
mfbt/tests/TestPoisonArea.cpp | 3 +++
python/mozbuild/mozbuild/configure/constants.py | 4 ++++
6 files changed, 23 insertions(+)
diff --git a/build/autoconf/config.guess b/build/autoconf/config.guess
index d5d667d4..1277a862 100755
--- a/build/autoconf/config.guess
+++ b/build/autoconf/config.guess
@@ -1029,6 +1029,9 @@ EOF
ppcle:Linux:*:*)
echo powerpcle-unknown-linux-${LIBC}
exit ;;
+ riscv32:Linux:*:* | riscv64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
s390:Linux:*:* | s390x:Linux:*:*)
echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
exit ;;
diff --git a/build/moz.configure/init.configure b/build/moz.configure/init.configure
index 83b8d705..ef33db50 100644
--- a/build/moz.configure/init.configure
+++ b/build/moz.configure/init.configure
@@ -676,6 +676,9 @@ def split_triplet(triplet, allow_unknown=False):
elif cpu == 'sh4':
canonical_cpu = 'sh4'
endianness = 'little'
+ elif cpu in ('riscv32', 'riscv64'):
+ canonical_cpu = cpu
+ endianness = 'little'
elif allow_unknown:
canonical_cpu = cpu
endianness = 'unknown'
diff --git a/js/src/jit/AtomicOperations.h b/js/src/jit/AtomicOperations.h
index 3501e65b..fda0b148 100644
--- a/js/src/jit/AtomicOperations.h
+++ b/js/src/jit/AtomicOperations.h
@@ -393,6 +393,8 @@ inline bool AtomicOperations::isLockfreeJS(int32_t size) {
#include "jit/none/AtomicOperations-feeling-lucky.h"
#elif defined(__s390__) || defined(__s390x__)
#include "jit/none/AtomicOperations-feeling-lucky.h"
+#elif defined(__riscv)
+#include "jit/none/AtomicOperations-feeling-lucky.h"
#else
#error "No AtomicOperations support provided for this platform"
#endif
diff --git a/js/src/jit/none/AtomicOperations-feeling-lucky.h b/js/src/jit/none/AtomicOperations-feeling-lucky.h
index c0b43699..42b1f3e0 100644
--- a/js/src/jit/none/AtomicOperations-feeling-lucky.h
+++ b/js/src/jit/none/AtomicOperations-feeling-lucky.h
@@ -80,6 +80,14 @@
#define GNUC_COMPATIBLE
#endif
+#ifdef __riscv
+#define GNUC_COMPATIBLE
+#ifdef __riscv_xlen == 64
+#define HAS_64BIT_ATOMICS
+#define HAS_64BIT_LOCKFREE
+#endif
+#endif
+
// The default implementation tactic for gcc/clang is to use the newer
// __atomic intrinsics added for use in C++11 <atomic>. Where that
// isn't available, we use GCC's older __sync functions instead.
diff --git a/mfbt/tests/TestPoisonArea.cpp b/mfbt/tests/TestPoisonArea.cpp
index 06c24ed0..fba9263c 100644
--- a/mfbt/tests/TestPoisonArea.cpp
+++ b/mfbt/tests/TestPoisonArea.cpp
@@ -168,6 +168,9 @@ static const ia64_instr _return_instr =
#define RETURN_INSTR _return_instr
#define RETURN_INSTR_TYPE ia64_instr
+#elif defined __riscv
+#define RETURN_INSTR 0x80828082 /* ret; ret */
+
#else
#error "Need return instruction for this architecture"
#endif
diff --git a/python/mozbuild/mozbuild/configure/constants.py b/python/mozbuild/mozbuild/configure/constants.py
index 33ae5a45..1067b6a4 100644
--- a/python/mozbuild/mozbuild/configure/constants.py
+++ b/python/mozbuild/mozbuild/configure/constants.py
@@ -50,6 +50,8 @@ CPU_bitness = {
'mips64': 64,
'ppc': 32,
'ppc64': 64,
+ 'riscv32': 32,
+ 'riscv64': 64,
's390': 32,
's390x': 64,
'sh4': 32,
@@ -82,6 +84,8 @@ CPU_preprocessor_checks = OrderedDict((
('s390', '__s390__'),
('ppc64', '__powerpc64__'),
('ppc', '__powerpc__'),
+ ('riscv32', '__riscv && __SIZEOF_POINTER__ == 4'),
+ ('riscv64', '__riscv && __SIZEOF_POINTER__ == 8'),
('Alpha', '__alpha__'),
('hppa', '__hppa__'),
('sparc64', '__sparc__ && __arch64__'),
--
2.23.0
@@ -0,0 +1,34 @@
From 903a79a1efff18fc7cc50db09a3fe5d768adc9a8 Mon 19 Mar 2018 09:58:06 +0100
From: Rico Tzschichholz <ricotz@ubuntu.com>
Date: Wed, 5 Jul 2017 22:45:59 -0700
Subject: build: Copy headers on install instead of symlinking
Patch ported from mozjs52 by Philip Chimento
Signed-off-by: Rico Tzschichholz <ricotz@ubuntu.com>
Signed-off-by: Adam Duskett <aduskett@gmail.com>
---
python/mozbuild/mozbuild/backend/recursivemake.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/python/mozbuild/mozbuild/backend/recursivemake.py b/python/mozbuild/mozbuild/backend/recursivemake.py
index dd9020d..6918ef8 100644
--- a/python/mozbuild/mozbuild/backend/recursivemake.py
+++ b/python/mozbuild/mozbuild/backend/recursivemake.py
@@ -1427,11 +1427,11 @@ class RecursiveMakeBackend(CommonBackend):
raise Exception("Wildcards are only supported in the filename part of "
"srcdir-relative or absolute paths.")
- install_manifest.add_pattern_link(basepath, wild, path)
+ install_manifest.add_pattern_copy(basepath, wild, path)
else:
- install_manifest.add_pattern_link(f.srcdir, f, path)
+ install_manifest.add_pattern_copy(f.srcdir, f, path)
else:
- install_manifest.add_link(f.full_path, dest)
+ install_manifest.add_copy(f.full_path, dest)
else:
install_manifest.add_optional_exists(dest)
backend_file.write('%s_FILES += %s\n' % (
--
2.23.0
@@ -0,0 +1,144 @@
From f66d410f3ba767efb91c6b9545d373267cd975f2 Mon Sep 17 00:00:00 2001
From: Philip Chimento <philip@endlessm.com>
Date: Sat, 7 Sep 2019 20:43:40 +0200
Subject: [PATCH] ensure proper running on 64-bit and 32-bit BE platforms
See: https://salsa.debian.org/gnome-team/mozjs60/blob/debian/master/debian/patches/jsproperty-endian.patch
Signed-off-by: Philip Chimento <philip@endlessm.com>
Signed-off-by: Adam Duskett <aduskett@gmail.com>
---
js/src/gc/Marking-inl.h | 16 ++++++++++++++++
js/src/gc/RelocationOverlay.h | 13 ++++++++++++-
js/src/jsfriendapi.h | 8 ++++++++
js/src/vm/StringType.h | 13 +++++++++++++
4 files changed, 49 insertions(+), 1 deletion(-)
diff --git a/js/src/gc/Marking-inl.h b/js/src/gc/Marking-inl.h
index 6d2a4c7..c773c21 100644
--- a/js/src/gc/Marking-inl.h
+++ b/js/src/gc/Marking-inl.h
@@ -82,12 +82,28 @@ inline void RelocationOverlay::forwardTo(Cell* cell) {
MOZ_ASSERT(!isForwarded());
// The location of magic_ is important because it must never be valid to see
// the value Relocated there in a GC thing that has not been moved.
+#if MOZ_LITTLE_ENDIAN || JS_BITS_PER_WORD == 32
+ // On 32-bit, the magic_ aliases with whatever comes after the first
+ // pointer; on little-endian 64-bit, the magic_ aliases with the
+ // 32 most significant bits of the pointer, which are the second half.
static_assert(offsetof(RelocationOverlay, magic_) ==
offsetof(JSObject, group_) + sizeof(uint32_t),
"RelocationOverlay::magic_ is in the wrong location");
static_assert(offsetof(RelocationOverlay, magic_) ==
offsetof(js::Shape, base_) + sizeof(uint32_t),
"RelocationOverlay::magic_ is in the wrong location");
+#elif JS_BITS_PER_WORD == 64
+ // On big-endian 64-bit, the magic_ aliases with the 32 most
+ // significant bits of the pointer, but now that's the first half.
+ static_assert(offsetof(RelocationOverlay, magic_) ==
+ offsetof(JSObject, group_),
+ "RelocationOverlay::magic_ is in the wrong location");
+ static_assert(offsetof(RelocationOverlay, magic_) ==
+ offsetof(js::Shape, base_),
+ "RelocationOverlay::magic_ is in the wrong location");
+#else
+# error "Unknown endianness or word size"
+#endif
static_assert(
offsetof(RelocationOverlay, magic_) == offsetof(JSString, d.u1.length),
"RelocationOverlay::magic_ is in the wrong location");
diff --git a/js/src/gc/RelocationOverlay.h b/js/src/gc/RelocationOverlay.h
index a568843..399a541 100644
--- a/js/src/gc/RelocationOverlay.h
+++ b/js/src/gc/RelocationOverlay.h
@@ -33,14 +33,25 @@ class RelocationOverlay {
/* See comment in js/public/HeapAPI.h. */
static const uint32_t Relocated = js::gc::Relocated;
+#if MOZ_LITTLE_ENDIAN || JS_BITS_PER_WORD == 32
/*
- * Keep the low 32 bits untouched. Use them to distinguish strings from
+ * Keep the first 32 bits untouched. Use them to distinguish strings from
* objects in the nursery.
*/
uint32_t preserve_;
/* Set to Relocated when moved. */
uint32_t magic_;
+#elif JS_BITS_PER_WORD == 64
+ /*
+ * On big-endian, we need to reorder to keep preserve_ lined up with the
+ * low 32 bits of the aligned group_ pointer in JSObject.
+ */
+ uint32_t magic_;
+ uint32_t preserve_;
+#else
+# error "Unknown endianness or word size"
+#endif
/* The location |this| was moved to. */
Cell* newLocation_;
diff --git a/js/src/jsfriendapi.h b/js/src/jsfriendapi.h
index 4b8d18a..70ce0a1 100644
--- a/js/src/jsfriendapi.h
+++ b/js/src/jsfriendapi.h
@@ -9,6 +9,7 @@
#include "mozilla/Atomics.h"
#include "mozilla/Casting.h"
+#include "mozilla/EndianUtils.h"
#include "mozilla/Maybe.h"
#include "mozilla/MemoryReporting.h"
#include "mozilla/UniquePtr.h"
@@ -609,8 +610,15 @@ struct String {
static const uint32_t LATIN1_CHARS_BIT = JS_BIT(6);
static const uint32_t EXTERNAL_FLAGS = LINEAR_BIT | NON_ATOM_BIT | JS_BIT(5);
static const uint32_t TYPE_FLAGS_MASK = JS_BIT(6) - 1;
+#if MOZ_LITTLE_ENDIAN || JS_BITS_PER_WORD == 32
uint32_t flags;
uint32_t length;
+#elif JS_BITS_PER_WORD == 64
+ uint32_t length;
+ uint32_t flags;
+#else
+# error "Unknown endianness or word size"
+#endif
union {
const JS::Latin1Char* nonInlineCharsLatin1;
const char16_t* nonInlineCharsTwoByte;
diff --git a/js/src/vm/StringType.h b/js/src/vm/StringType.h
index cde3427..c3400db 100644
--- a/js/src/vm/StringType.h
+++ b/js/src/vm/StringType.h
@@ -7,6 +7,7 @@
#ifndef vm_StringType_h
#define vm_StringType_h
+#include "mozilla/EndianUtils.h"
#include "mozilla/MemoryReporting.h"
#include "mozilla/PodOperations.h"
#include "mozilla/Range.h"
@@ -168,8 +169,20 @@ class JSString : public js::gc::Cell {
struct Data {
union {
struct {
+#if MOZ_LITTLE_ENDIAN || JS_BITS_PER_WORD == 32
uint32_t flags; /* JSString */
uint32_t length; /* JSString */
+#elif JS_BITS_PER_WORD == 64
+ /*
+ * On big-endian, we need to reorder to keep flags lined up
+ * with the low 32 bits of the aligned group_ pointer in
+ * JSObject.
+ */
+ uint32_t length; /* JSString */
+ uint32_t flags; /* JSString */
+#else
+# error "Unknown endianness or word size"
+#endif
};
uintptr_t flattenData; /* JSRope (temporary while flattening) */
} u1;
--
2.23.0
@@ -0,0 +1,66 @@
From 903a79a1efff18fc7cc50db09a3fe5d768adc9a8 Mon 19 Mar 2018 09:58:06 +0100
From: Lars T Hansen <lhansen@mozilla.com>
Date: Fri, 23 Mar 2018 22:01:33 +0000
Subject: [PATCH] save and restore non-volatile x28 on ARM64 for generated unboxed object constructor
Fixes: https://bugzilla.mozilla.org/show_bug.cgi?id=1375074
Upsream-status: Applied
See: https://hg.mozilla.org/mozilla-central/rev/800abe66894d
Signed-off-by: Lars T Hansen <lhansen@mozilla.com>
Signed-off-by: Adam Duskett <aduskett@gmail.com>
---
js/src/vm/UnboxedObject.cpp | 30 ++++++++++++++++++++++++++----
1 file changed, 26 insertions(+), 4 deletions(-)
diff --git a/js/src/vm/UnboxedObject.cpp b/js/src/vm/UnboxedObject.cpp
index 35ca20d7405f..1c20a1093d13 100644
--- a/js/src/vm/UnboxedObject.cpp
+++ b/js/src/vm/UnboxedObject.cpp
@@ -86,9 +86,16 @@ static const uintptr_t CLEAR_CONSTRUCTOR_CODE_TOKEN = 0x1;
#endif
#ifdef JS_CODEGEN_ARM64
- // ARM64 communicates stack address via sp, but uses a pseudo-sp for
- // addressing.
- masm.initStackPtr();
+ // ARM64 communicates stack address via sp, but uses a pseudo-sp (PSP) for
+ // addressing. The register we use for PSP may however also be used by
+ // calling code, and it is nonvolatile, so save it. Do this as a special
+ // case first because the generic save/restore code needs the PSP to be
+ // initialized already.
+ MOZ_ASSERT(PseudoStackPointer64.Is(masm.GetStackPointer64()));
+ masm.Str(PseudoStackPointer64, vixl::MemOperand(sp, -16, vixl::PreIndex));
+
+ // Initialize the PSP from the SP.
+ masm.initStackPtr();
#endif
MOZ_ASSERT(propertiesReg.volatile_());
@@ -239,7 +246,22 @@ static const uintptr_t CLEAR_CONSTRUCTOR_CODE_TOKEN = 0x1;
if (ScratchDoubleReg.volatile_()) masm.pop(ScratchDoubleReg);
masm.PopRegsInMask(savedNonVolatileRegisters);
- masm.abiret();
+#ifdef JS_CODEGEN_ARM64
+ // Now restore the value that was in the PSP register on entry, and return.
+
+ // Obtain the correct SP from the PSP.
+ masm.Mov(sp, PseudoStackPointer64);
+
+ // Restore the saved value of the PSP register, this value is whatever the
+ // caller had saved in it, not any actual SP value, and it must not be
+ // overwritten subsequently.
+ masm.Ldr(PseudoStackPointer64, vixl::MemOperand(sp, 16, vixl::PostIndex));
+
+ // Perform a plain Ret(), as abiret() will move SP <- PSP and that is wrong.
+ masm.Ret(vixl::lr);
+#else
+ masm.abiret();
+#endif
masm.bind(&failureStoreOther);
--
2.23.0
@@ -0,0 +1,100 @@
From 903a79a1efff18fc7cc50db09a3fe5d768adc9a8 Mon 19 Mar 2018 09:58:06 +0100
From: Lars T Hansen <lhansen@mozilla.com>
Date: Fri, 23 Mar 2018 22:01:33 +0000
Subject: [PATCH] save x28 before clobbering it in the regex compiler
Fixes: https://bugzilla.mozilla.org/show_bug.cgi?id=1445907
Upsream-status: Applied
See: https://hg.mozilla.org/mozilla-central/rev/903a79a1efff
Signed-off-by: Lars T Hansen <lhansen@mozilla.com>
Signed-off-by: Adam Duskett <aduskett@gmail.com>
---
diff --git a/js/src/irregexp/NativeRegExpMacroAssembler.cpp b/js/src/irregexp/NativeRegExpMacroAssembler.cpp
--- a/js/src/irregexp/NativeRegExpMacroAssembler.cpp
+++ b/js/src/irregexp/NativeRegExpMacroAssembler.cpp
@@ -118,17 +118,25 @@ NativeRegExpMacroAssembler::GenerateCode
Label return_temp0;
// Finalize code - write the entry point code now we know how many
// registers we need.
masm.bind(&entry_label_);
#ifdef JS_CODEGEN_ARM64
- // ARM64 communicates stack address via sp, but uses a pseudo-sp for addressing.
+ // ARM64 communicates stack address via SP, but uses a pseudo-sp (PSP) for
+ // addressing. The register we use for PSP may however also be used by
+ // calling code, and it is nonvolatile, so save it. Do this as a special
+ // case first because the generic save/restore code needs the PSP to be
+ // initialized already.
+ MOZ_ASSERT(PseudoStackPointer64.Is(masm.GetStackPointer64()));
+ masm.Str(PseudoStackPointer64, vixl::MemOperand(sp, -16, vixl::PreIndex));
+
+ // Initialize the PSP from the SP.
masm.initStackPtr();
#endif
// Push non-volatile registers which might be modified by jitcode.
size_t pushedNonVolatileRegisters = 0;
for (GeneralRegisterForwardIterator iter(savedNonVolatileRegisters); iter.more(); ++iter) {
masm.Push(*iter);
pushedNonVolatileRegisters++;
@@ -416,17 +424,32 @@ NativeRegExpMacroAssembler::GenerateCode
masm.pop(temp0);
masm.movePtr(temp0, StackPointer);
#endif
// Restore non-volatile registers which were saved on entry.
for (GeneralRegisterBackwardIterator iter(savedNonVolatileRegisters); iter.more(); ++iter)
masm.Pop(*iter);
+#ifdef JS_CODEGEN_ARM64
+ // Now restore the value that was in the PSP register on entry, and return.
+
+ // Obtain the correct SP from the PSP.
+ masm.Mov(sp, PseudoStackPointer64);
+
+ // Restore the saved value of the PSP register, this value is whatever the
+ // caller had saved in it, not any actual SP value, and it must not be
+ // overwritten subsequently.
+ masm.Ldr(PseudoStackPointer64, vixl::MemOperand(sp, 16, vixl::PostIndex));
+
+ // Perform a plain Ret(), as abiret() will move SP <- PSP and that is wrong.
+ masm.Ret(vixl::lr);
+#else
masm.abiret();
+#endif
// Backtrack code (branch target for conditional backtracks).
if (backtrack_label_.used()) {
masm.bind(&backtrack_label_);
Backtrack();
}
// Backtrack stack overflow code.
diff --git a/js/src/jit-test/tests/regexp/bug1445907.js b/js/src/jit-test/tests/regexp/bug1445907.js
new file mode 100644
--- /dev/null
+++ b/js/src/jit-test/tests/regexp/bug1445907.js
@@ -0,0 +1,15 @@
+// On ARM64, we failed to save x28 properly when generating code for the regexp
+// matcher.
+//
+// There's wasm and Debugger code here because the combination forces the use of
+// x28 and exposes the bug when running on the simulator.
+
+if (!wasmIsSupported())
+ quit();
+
+var g = newGlobal('');
+var dbg = new Debugger(g);
+g.eval(`var m = new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary('(module (func (export "test")))')))`);
+var re = /./;
+dbg.onEnterFrame = function(frame) { re.exec("x") };
+result = g.eval("m.exports.test()");
--
2.23.0
@@ -0,0 +1,103 @@
From 903a79a1efff18fc7cc50db09a3fe5d768adc9a8 Mon 19 Mar 2018 09:58:06 +0100
From: André Bargull <andrebargull@gmail.com>
Date: Wed, 8 Nov 2017 03:23:41 -0800
Subject: always use the equivalent year to determine the time zone offset and
name
Fixes: https://bugzilla.mozilla.org/show_bug.cgi?id=1415202
Upsream-status: Applied
See: https://hg.mozilla.org/mozilla-central/rev/ce9f1466ec78
Reviewed-by: Jeff Walden
Signed-off-by: André Bargull <andrebargull@gmail.com>
Signed-off-by: Adam Duskett <aduskett@gmail.com>
---
js/src/jsdate.cpp | 11 +++++++----
js/src/vm/Time.cpp | 14 ++++----------
js/src/vm/Time.h | 2 +-
3 files changed, 12 insertions(+), 15 deletions(-)
diff --git a/js/src/jsdate.cpp b/js/src/jsdate.cpp
index 07af3d18c865..ff8fd6c3763c 100644
--- a/js/src/jsdate.cpp
+++ b/js/src/jsdate.cpp
@@ -2353,12 +2353,15 @@ static PRMJTime ToPRMJTime(double localTime, double utcTime) {
static size_t FormatTime(char* buf, int buflen, const char* fmt, double utcTime,
double localTime) {
PRMJTime prtm = ToPRMJTime(localTime, utcTime);
- int eqivalentYear = IsRepresentableAsTime32(utcTime)
- ? prtm.tm_year
- : EquivalentYearForDST(prtm.tm_year);
+ // If an equivalent year was used to compute the date/time components, use
+ // the same equivalent year to determine the time zone name and offset in
+ // PRMJ_FormatTime(...).
+ int timeZoneYear = IsRepresentableAsTime32(utcTime)
+ ? prtm.tm_year
+ : EquivalentYearForDST(prtm.tm_year);
int offsetInSeconds = (int)floor((localTime - utcTime) / msPerSecond);
- return PRMJ_FormatTime(buf, buflen, fmt, &prtm, eqivalentYear,
+ return PRMJ_FormatTime(buf, buflen, fmt, &prtm, timeZoneYear,
offsetInSeconds);
}
diff --git a/js/src/vm/Time.cpp b/js/src/vm/Time.cpp
index f59977f0d0e9..5ee4794b3e83 100644
--- a/js/src/vm/Time.cpp
+++ b/js/src/vm/Time.cpp
@@ -247,7 +247,7 @@ static void PRMJ_InvalidParameterHandler(const wchar_t* expression,
/* Format a time value into a buffer. Same semantics as strftime() */
size_t PRMJ_FormatTime(char* buf, int buflen, const char* fmt,
- const PRMJTime* prtm, int equivalentYear,
+ const PRMJTime* prtm, int timeZoneYear,
int offsetInSeconds) {
size_t result = 0;
#if defined(XP_UNIX) || defined(XP_WIN)
@@ -280,7 +280,8 @@ size_t PRMJ_FormatTime(char* buf, int buflen, const char* fmt,
* Fill out |td| to the time represented by |prtm|, leaving the
* timezone fields zeroed out. localtime_r will then fill in the
* timezone fields for that local time according to the system's
- * timezone parameters.
+ * timezone parameters. Use |timeZoneYear| for the year to ensure the
+ * time zone name matches the time zone offset used by the caller.
*/
struct tm td;
memset(&td, 0, sizeof(td));
@@ -290,19 +291,12 @@ size_t PRMJ_FormatTime(char* buf, int buflen, const char* fmt,
td.tm_mday = prtm->tm_mday;
td.tm_mon = prtm->tm_mon;
td.tm_wday = prtm->tm_wday;
- td.tm_year = prtm->tm_year - 1900;
+ td.tm_year = timeZoneYear - 1900;
td.tm_yday = prtm->tm_yday;
td.tm_isdst = prtm->tm_isdst;
time_t t = mktime(&td);
- // If |prtm| cannot be represented in |time_t| the year is probably
- // out of range, try again with the DST equivalent year.
- if (t == static_cast<time_t>(-1)) {
- td.tm_year = equivalentYear - 1900;
- t = mktime(&td);
- }
-
// If either mktime or localtime_r failed, fill in the fallback time
// zone offset |offsetInSeconds| and set the time zone identifier to
// the empty string.
diff --git a/js/src/vm/Time.h b/js/src/vm/Time.h
index 3a51d869c922..37b7faeec028 100644
--- a/js/src/vm/Time.h
+++ b/js/src/vm/Time.h
@@ -49,7 +49,7 @@ inline void PRMJ_NowShutdown() {}
/* Format a time value into a buffer. Same semantics as strftime() */
extern size_t PRMJ_FormatTime(char* buf, int buflen, const char* fmt,
- const PRMJTime* tm, int equivalentYear,
+ const PRMJTime* tm, int timeZoneYear,
int offsetInSeconds);
/**
--
2.23.0
@@ -0,0 +1,28 @@
From b5e4a9926cf50d12e9c5c05c6d1b161e5b662d62 Mon Sep 17 00:00:00 2001
From: Carlos Santos <unixmania@gmail.com>
Date: Sat, 7 Mar 2020 23:42:02 -0300
Subject: [PATCH] js/src/Makefile.in: install shell only if it's built
Prevents an installation error if we configure with --disable-js-shell.
Signed-off-by: Carlos Santos <unixmania@gmail.com>
---
js/src/Makefile.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/js/src/Makefile.in b/js/src/Makefile.in
index 4ac9f48..9c8fb64 100644
--- a/js/src/Makefile.in
+++ b/js/src/Makefile.in
@@ -136,7 +136,7 @@ endif
install::
$(MAKE) -C build install
- $(MAKE) -C shell install
+ if [ -d shell ]; then $(MAKE) -C shell install; fi
ifdef HAVE_DTRACE
javascript-trace.h: $(srcdir)/devtools/javascript-trace.d
--
2.18.2
+60
View File
@@ -0,0 +1,60 @@
config BR2_PACKAGE_SPIDERMONKEY_ARCH_SUPPORTS
bool
default y if BR2_aarch64
default y if BR2_arm || BR2_armeb
default y if BR2_i386 || BR2_x86_64
default y if BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el
default y if BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le
default y if BR2_riscv
default y if BR2_sh4 || BR2_sh4a
default y if BR2_sparc || BR2_sparc64
depends on BR2_PACKAGE_LIBNSPR_ARCH_SUPPORT # libnspr
config BR2_PACKAGE_SPIDERMONKEY_JIT_ARCH_SUPPORTS
bool
default y if BR2_aarch64 || BR2_arm || BR2_armeb || BR2_i386 || BR2_x86_64
config BR2_PACKAGE_SPIDERMONKEY
bool "spidermonkey"
depends on BR2_HOST_GCC_AT_LEAST_4_9
depends on BR2_INSTALL_LIBSTDCPP
depends on BR2_PACKAGE_SPIDERMONKEY_ARCH_SUPPORTS
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # needs pthread_getattr_np()
depends on BR2_USE_MMU # fork in executable tools.
depends on BR2_USE_WCHAR
depends on !BR2_TOOLCHAIN_USES_UCLIBC # No way to check for fenv support.
depends on !BR2_STATIC_LIBS # dlopen
select BR2_PACKAGE_HOST_PYTHON
select BR2_PACKAGE_HOST_PYTHON_SSL
select BR2_PACKAGE_LIBNSPR
select BR2_PACKAGE_ZLIB
help
SpiderMonkey is the code-name for Mozilla Firefox's C++
implementation of JavaScript. It is intended to be embedded in
other applications that provide host environments for
JavaScript.
https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey
if BR2_PACKAGE_SPIDERMONKEY
config BR2_PACKAGE_SPIDERMONKEY_JS_SHELL
bool "JS shell"
help
Build the JavaScript shell.
WARNING: increases target image size by around 24 MiB.
endif
comment "spidermonkey needs a glibc or musl toolchain with C++, wchar, dynamic library, NPTL, gcc >= 4.9"
depends on BR2_USE_MMU
depends on BR2_PACKAGE_SPIDERMONKEY_ARCH_SUPPORTS
depends on BR2_TOOLCHAIN_USES_UCLIBC || \
!BR2_INSTALL_LIBSTDCPP || \
BR2_STATIC_LIBS || \
!BR2_TOOLCHAIN_HAS_THREADS_NPTL || \
!BR2_HOST_GCC_AT_LEAST_4_9 || \
!BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 || \
!BR2_USE_WCHAR
+3
View File
@@ -0,0 +1,3 @@
# Locally computed
sha256 f51039c997415fd0f13f8e01966b4a8ff80cbf90deb8b14c18827104a369cc0d mozjs-60.5.2.tar.bz2
sha256 aaac93a33bec26d5d1a9c5efc1e7dc6bd215d8a4f1e1a7fc5315a67adfd51338 moz.configure
+64
View File
@@ -0,0 +1,64 @@
################################################################################
#
# spidermonkey
#
################################################################################
# Use a tarball with only the spidermonkey source code and a pre-setup
# old-configure in src/js.This prevents having to use autoconf 2.13 and
# makes the package much 31M instead of 257M
SPIDERMONKEY_VERSION = 60.5.2
SPIDERMONKEY_SOURCE = mozjs-$(SPIDERMONKEY_VERSION).tar.bz2
SPIDERMONKEY_SITE = https://gentoo.osuosl.org/distfiles/9a
SPIDERMONKEY_SUBDIR = js/src
SPIDERMONKEY_LICENSE = MPL-2.0
SPIDERMONKEY_LICENSE_FILES = moz.configure
SPIDERMONKEY_INSTALL_STAGING = YES
SPIDERMONKEY_DEPENDENCIES = \
host-python \
libnspr \
zlib
SPIDERMONKEY_CONF_ENV = \
PYTHON="$(HOST_DIR)/bin/python2"
# spidermonkey mixes up target and host.
# spidermonkey does not allow building against a system jemalloc,
# as it causes a conflict with glibc.
SPIDERMONKEY_CONF_OPTS = \
--host=$(GNU_HOST_NAME) \
--target=$(GNU_TARGET_NAME) \
--disable-jemalloc \
--enable-shared-js \
--with-system-zlib \
--with-system-nspr \
--with-nspr-exec-prefix="$(STAGING_DIR)/usr"
ifeq ($(BR2_PACKAGE_SPIDERMONKEY_JIT_ARCH_SUPPORTS),y)
SPIDERMONKEY_CONF_OPTS += --enable-ion
else
SPIDERMONKEY_CONF_OPTS += --disable-ion
endif
ifeq ($(BR2_PACKAGE_SPIDERMONKEY_JS_SHELL),y)
SPIDERMONKEY_CONF_OPTS += --enable-js-shell
else
SPIDERMONKEY_CONF_OPTS += --disable-js-shell
endif
ifeq ($(BR2_PACKAGE_READLINE),y)
SPIDERMONKEY_CONF_OPTS += --enable-readline
SPIDERMONKEY_DEPENDENCIES += readline
else
SPIDERMONKEY_CONF_OPTS += --disable-readline
endif
# Remove unneeded files
define SPIDERMONKEY_CLEANUP
rm -rf $(TARGET_DIR)/usr/lib/libjs_static.ajs
rm -rf $(TARGET_DIR)/usr/bin/js60-config
endef
SPIDERMONKEY_POST_INSTALL_TARGET_HOOKS += SPIDERMONKEY_CLEANUP
$(eval $(autotools-package))
+17
View File
@@ -0,0 +1,17 @@
config BR2_PACKAGE_SPIDEV_TEST
bool "spidev_test"
help
SPI testing utility (using spidev driver).
This package builds and installs the userspace 'spidev_test'
command. It is up to the user to ensure that the kernel
configuration has all suitable options enabled to allow a
proper operation of 'spidev_test'.
The version used is based on your toolchain headers version,
if it's older than 3.15 then 3.0 is used, otherwise 3.15
is used.
This means you won't have quad-pumped SPI support if your
toolchain is too old.
https://www.kernel.org/doc/html/latest/spi/index.html
+3
View File
@@ -0,0 +1,3 @@
# Locally calculated
sha256 80471c330d8c0bf5ba6479c434a54a54bdd2dc59a703b9c76c2541ec04cfb8c3 spidev_test.c?id=v3.0
sha256 3cf76b15d9a8644f3f5cbc0387cc02a7d4a392ade39788cbc6367cce98552e2f spidev_test.c?id=v4.10
+48
View File
@@ -0,0 +1,48 @@
################################################################################
#
# spidev_test
#
################################################################################
# Build the latest version that is compatible with the toolchain's kernel headers
# v3.15+ requires SPI_TX_QUAD/SPI_RX_QUAD to build
# Normally kernel headers can't be newer than kernel so switch based on that.
# If you need quad-pumped spi support you need to upgrade your toolchain.
# Note that the location of spidev_test.c changes from v4.5 onwards.
ifeq ($(BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15),y)
SPIDEV_TEST_VERSION = 4.10
SPIDEV_TEST_PATH = tools/spi
else
SPIDEV_TEST_VERSION = 3.0
SPIDEV_TEST_PATH = Documentation/spi
endif
SPIDEV_TEST_SITE = http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/plain/$(SPIDEV_TEST_PATH)
SPIDEV_TEST_SOURCE = spidev_test.c?id=v$(SPIDEV_TEST_VERSION)
SPIDEV_TEST_LICENSE = GPL-2.0
# musl libc requires linux/ioctl.h for _IOC_SIZEBITS. Do a sed patch to keep
# compatibility with different spidev_test.c versions that we support.
define SPIDEV_ADD_LINUX_IOCTL
$(SED) 's~^#include <sys/ioctl.h>~#include <sys/ioctl.h>\n#include <linux/ioctl.h>~' \
$(@D)/spidev_test.c
endef
SPIDEV_TEST_POST_PATCH_HOOKS += SPIDEV_ADD_LINUX_IOCTL
define SPIDEV_TEST_EXTRACT_CMDS
cp $(SPIDEV_TEST_DL_DIR)/$(SPIDEV_TEST_SOURCE) $(@D)/spidev_test.c
endef
define SPIDEV_TEST_BUILD_CMDS
$(TARGET_MAKE_ENV) $(TARGET_CC) $(TARGET_CFLAGS) \
-o $(@D)/spidev_test $(@D)/spidev_test.c
endef
define SPIDEV_TEST_INSTALL_TARGET_CMDS
$(INSTALL) -D -m 755 $(@D)/spidev_test \
$(TARGET_DIR)/usr/sbin/spidev_test
endef
$(eval $(generic-package))
+37
View File
@@ -0,0 +1,37 @@
config BR2_PACKAGE_SQLCIPHER
bool "sqlcipher"
depends on !BR2_PACKAGE_SQLITE
depends on BR2_TOOLCHAIN_HAS_THREADS
select BR2_PACKAGE_OPENSSL
help
SQLCipher is an SQLite extension that provides 256 bits AES
encryption of database files. Note that it is a fork of
SQLite and they cannot be installed side-by-side.
http://sqlcipher.net
if BR2_PACKAGE_SQLCIPHER
config BR2_PACKAGE_SQLCIPHER_READLINE
bool "Command-line editing"
select BR2_PACKAGE_NCURSES
select BR2_PACKAGE_READLINE
help
Enable command-line editing. This requires ncurses and
readline.
config BR2_PACKAGE_SQLCIPHER_STAT3
bool "Additional query optimizations (stat3)"
help
Adds additional logic to the ANALYZE command and to the
query planner that can help SQLite to choose a better query
plan under certain situations.
endif
comment "sqlcipher conflicts with sqlite"
depends on BR2_PACKAGE_SQLITE
comment "sqlcipher needs a toolchain w/ threads"
depends on !BR2_PACKAGE_SQLITE
depends on !BR2_TOOLCHAIN_HAS_THREADS
+3
View File
@@ -0,0 +1,3 @@
# locally computed
sha256 b8df69b998c042ce7f8a99f07cf11f45dfebe51110ef92de95f1728358853133 sqlcipher-4.4.3.tar.gz
sha256 3eee3c7964a9becc94d747bd36703d31fc86eb994680b06a61bfd4f2661eaac8 LICENSE
+43
View File
@@ -0,0 +1,43 @@
################################################################################
#
# sqlcipher
#
################################################################################
SQLCIPHER_VERSION = 4.4.3
SQLCIPHER_SITE = $(call github,sqlcipher,sqlcipher,v$(SQLCIPHER_VERSION))
SQLCIPHER_LICENSE = BSD-3-Clause
SQLCIPHER_LICENSE_FILES = LICENSE
SQLCIPHER_CPE_ID_VENDOR = zetetic
SQLCIPHER_DEPENDENCIES = host-pkgconf openssl host-tcl
SQLCIPHER_INSTALL_STAGING = YES
SQLCIPHER_CONF_ENV = \
CFLAGS="$(TARGET_CFLAGS) $(SQLCIPHER_CFLAGS)" \
TCLSH_CMD=$(HOST_DIR)/bin/tclsh$(TCL_VERSION_MAJOR)
SQLCIPHER_CONF_OPTS = \
--enable-threadsafe \
--disable-tcl
SQLCIPHER_CFLAGS += -DSQLITE_HAS_CODEC # Required according to the README
SQLCIPHER_CONF_ENV += LIBS=`$(PKG_CONFIG_HOST_BINARY) --libs openssl`
ifeq ($(BR2_PACKAGE_SQLCIPHER_STAT3),y)
SQLCIPHER_CFLAGS += -DSQLITE_ENABLE_STAT3
endif
ifeq ($(BR2_PACKAGE_SQLCIPHER_READLINE),y)
SQLCIPHER_DEPENDENCIES += ncurses readline
SQLCIPHER_CONF_OPTS += --with-readline-inc="-I$(STAGING_DIR)/usr/include"
else
SQLCIPHER_CONF_OPTS += --disable-readline
endif
ifeq ($(BR2_STATIC_LIBS),y)
SQLCIPHER_CONF_OPTS += --disable-load-extension
else
SQLCIPHER_CONF_OPTS += --enable-load-extension
endif
$(eval $(autotools-package))
+73
View File
@@ -0,0 +1,73 @@
config BR2_PACKAGE_SQLITE
bool "sqlite"
help
SQLite is a small C library that implements a
self-contained, embeddable, zero-configuration SQL database
engine.
http://www.sqlite.org/
if BR2_PACKAGE_SQLITE
config BR2_PACKAGE_SQLITE_STAT4
bool "Additional query optimizations (stat4)"
help
Adds additional logic to the ANALYZE command and to the
query planner that can help SQLite to choose a better query
plan under certain situations.
config BR2_PACKAGE_SQLITE_ENABLE_COLUMN_METADATA
bool "Enable convenient access to meta-data about tables and queries"
help
When this option is defined there are some additional APIs
enabled to acces meta-data about tables and queries (see
https://sqlite.org/compile.html).
config BR2_PACKAGE_SQLITE_ENABLE_FTS3
bool "Enable version 3 of the full-text search engine"
help
When this option is defined in the amalgamation (see
http://www.sqlite.org/amalgamation.html), version 3 of the
full-text search engine is added to the build automatically.
config BR2_PACKAGE_SQLITE_ENABLE_JSON1
bool "Enable the JSON extensions for SQLite"
help
When this option is defined in the amalgamation, the JSON
extensions are added to the build automatically.
config BR2_PACKAGE_SQLITE_ENABLE_UNLOCK_NOTIFY
bool "Enable sqlite3_unlock_notify() interface"
help
This option enables the sqlite3_unlock_notify() interface
and its accosiated functionality. See the documentation
http://www.sqlite.org/unlock_notify.html for additional
information.
config BR2_PACKAGE_SQLITE_SECURE_DELETE
bool "Set the secure_delete pragma on by default"
help
This compile-time option changes the default settings of the
secure_delete pragma. When this option is not used,
secure_delete defaults to off. When this option is present,
secure_delete defaults to on.
The secure_delete setting causes deleted content to be
overwritten with zeros. There is a small performance penalty
for this since additional I/O must occur. On the other hand,
secure_delete can prevent sensitive information from
lingering in unused parts of the database file after it has
allegedly been deleted. See the documentation on the
http://www.sqlite.org/pragma.html#pragma_secure_delete for
additional information.
config BR2_PACKAGE_SQLITE_NO_SYNC
bool "Disable fsync"
help
By default SQLite forces all database transactions to
storage immediately using fsync() to protect against data
loss in case of power failure. This option turns this
behavior off resulting in higher performance especially when
using slow flash storage.
endif
+3
View File
@@ -0,0 +1,3 @@
# Locally computed
sha256 2a3bca581117b3b88e5361d0ef3803ba6d8da604b1c1a47d902ef785c1b53e89 sqlite-autoconf-3340100.tar.gz
sha256 66e056b6e8687f32af30d5187611b98b12a8f46f07aaf62f43585f276e8f0ac9 tea/license.terms
+79
View File
@@ -0,0 +1,79 @@
################################################################################
#
# sqlite
#
################################################################################
SQLITE_VERSION = 3340100
SQLITE_CPE_ID_VERSION = 3.34.1
SQLITE_SOURCE = sqlite-autoconf-$(SQLITE_VERSION).tar.gz
SQLITE_SITE = https://www.sqlite.org/2021
SQLITE_LICENSE = Public domain
SQLITE_LICENSE_FILES = tea/license.terms
SQLITE_CPE_ID_VENDOR = sqlite
SQLITE_INSTALL_STAGING = YES
ifeq ($(BR2_PACKAGE_SQLITE_STAT4),y)
SQLITE_CFLAGS += -DSQLITE_ENABLE_STAT4
endif
ifeq ($(BR2_PACKAGE_SQLITE_ENABLE_COLUMN_METADATA),y)
SQLITE_CFLAGS += -DSQLITE_ENABLE_COLUMN_METADATA
endif
ifeq ($(BR2_PACKAGE_SQLITE_ENABLE_FTS3),y)
SQLITE_CFLAGS += -DSQLITE_ENABLE_FTS3
endif
ifeq ($(BR2_PACKAGE_SQLITE_ENABLE_JSON1),y)
SQLITE_CFLAGS += -DSQLITE_ENABLE_JSON1
endif
ifeq ($(BR2_PACKAGE_SQLITE_ENABLE_UNLOCK_NOTIFY),y)
SQLITE_CFLAGS += -DSQLITE_ENABLE_UNLOCK_NOTIFY
endif
ifeq ($(BR2_PACKAGE_SQLITE_SECURE_DELETE),y)
SQLITE_CFLAGS += -DSQLITE_SECURE_DELETE
endif
ifeq ($(BR2_PACKAGE_SQLITE_NO_SYNC),y)
SQLITE_CFLAGS += -DSQLITE_NO_SYNC
endif
# Building with Microblaze Gcc 4.9 makes compiling to hang.
# Work around using -O0
ifeq ($(BR2_microblaze):$(BR2_TOOLCHAIN_GCC_AT_LEAST_5),y:)
SQLITE_CFLAGS += $(TARGET_CFLAGS) -O0
else
# fallback to standard -O3 when -Ofast is present to avoid -ffast-math
SQLITE_CFLAGS += $(subst -Ofast,-O3,$(TARGET_CFLAGS))
endif
SQLITE_CONF_ENV = CFLAGS="$(SQLITE_CFLAGS)"
ifeq ($(BR2_STATIC_LIBS),y)
SQLITE_CONF_OPTS += --enable-dynamic-extensions=no
else
SQLITE_CONF_OPTS += --disable-static-shell
endif
ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
SQLITE_CONF_OPTS += --enable-threadsafe
else
SQLITE_CONF_OPTS += --disable-threadsafe
SQLITE_CFLAGS += -DSQLITE_THREADSAFE=0
endif
ifeq ($(BR2_PACKAGE_NCURSES)$(BR2_PACKAGE_READLINE),yy)
SQLITE_DEPENDENCIES += ncurses readline
SQLITE_CONF_OPTS += --disable-editline --enable-readline
else ifeq ($(BR2_PACKAGE_LIBEDIT),y)
SQLITE_DEPENDENCIES += libedit
SQLITE_CONF_OPTS += --enable-editline --disable-readline
else
SQLITE_CONF_OPTS += --disable-editline --disable-readline
endif
$(eval $(autotools-package))
$(eval $(host-autotools-package))
@@ -0,0 +1,49 @@
From e1cdcfd94172a0b1ba4c9df70f4d69a41c687404 Mon Sep 17 00:00:00 2001
From: Sergei Trofimovich <slyfox@gentoo.org>
Date: Sun, 26 Jan 2020 18:35:13 +0000
Subject: [PATCH] squashfs-tools: fix build failure against gcc-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
On gcc-10 (and gcc-9 -fno-common) build fails as:
```
cc ... -o mksquashfs
ld: read_fs.o:(.bss+0x0):
multiple definition of `fwriter_buffer'; mksquashfs.o:(.bss+0x400c90): first defined here
ld: read_fs.o:(.bss+0x8):
multiple definition of `bwriter_buffer'; mksquashfs.o:(.bss+0x400c98): first defined here
```
gcc-10 will change the default from -fcommon to fno-common:
https://gcc.gnu.org/PR85678.
The error also happens if CFLAGS=-fno-common passed explicitly.
Reported-by: Toralf Förster
Bug: https://bugs.gentoo.org/706456
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
[Upstream: https://github.com/plougher/squashfs-tools/commit/fe2f5da4b0f8994169c53e84b7cb8a0feefc97b5.patch]
Signed-off-by: Peter Seiderer <ps.report@gmx.net>
---
squashfs-tools/mksquashfs.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/squashfs-tools/mksquashfs.h b/squashfs-tools/mksquashfs.h
index 1beefef..b650306 100644
--- a/squashfs-tools/mksquashfs.h
+++ b/squashfs-tools/mksquashfs.h
@@ -143,7 +143,7 @@ struct append_file {
#endif
extern struct cache *reader_buffer, *fragment_buffer, *reserve_cache;
-struct cache *bwriter_buffer, *fwriter_buffer;
+extern struct cache *bwriter_buffer, *fwriter_buffer;
extern struct queue *to_reader, *to_deflate, *to_writer, *from_writer,
*to_frag, *locked_fragment, *to_process_frag;
extern struct append_file **file_mapping;
--
2.26.2
+60
View File
@@ -0,0 +1,60 @@
config BR2_PACKAGE_SQUASHFS
bool "squashfs"
depends on BR2_TOOLCHAIN_HAS_THREADS
depends on BR2_USE_MMU # fork()
# ensure at least on compression backend (defaults to gzip)
select BR2_PACKAGE_SQUASHFS_GZIP if !( \
BR2_PACKAGE_SQUASHFS_LZ4 || \
BR2_PACKAGE_SQUASHFS_LZMA || \
BR2_PACKAGE_SQUASHFS_LZO || \
BR2_PACKAGE_SQUASHFS_XZ || \
BR2_PACKAGE_SQUASHFS_ZSTD)
help
Tools to generate SquashFS filesystems.
https://github.com/plougher/squashfs-tools
if BR2_PACKAGE_SQUASHFS
config BR2_PACKAGE_SQUASHFS_GZIP
bool "gzip support"
default y
select BR2_PACKAGE_ZLIB
help
Support GZIP compression algorithm
config BR2_PACKAGE_SQUASHFS_LZ4
bool "lz4 support"
select BR2_PACKAGE_LZ4
help
Support LZ4 compression algorithm
config BR2_PACKAGE_SQUASHFS_LZMA
bool "lzma support"
select BR2_PACKAGE_XZ
help
Support LZMA compression algorithm
config BR2_PACKAGE_SQUASHFS_LZO
bool "lzo support"
select BR2_PACKAGE_LZO
help
Support LZO compression algorithm
config BR2_PACKAGE_SQUASHFS_XZ
bool "xz support"
select BR2_PACKAGE_XZ
help
Support XZ compression algorithm
config BR2_PACKAGE_SQUASHFS_ZSTD
bool "zstd support"
select BR2_PACKAGE_ZSTD
help
Support ZSTD compression algorithm
endif
comment "squashfs needs a toolchain w/ threads"
depends on !BR2_TOOLCHAIN_HAS_THREADS
depends on BR2_USE_MMU
+6
View File
@@ -0,0 +1,6 @@
config BR2_PACKAGE_HOST_SQUASHFS
bool "host squashfs"
help
Tools to generate SquashFS filesystems.
https://github.com/plougher/squashfs-tools
+5
View File
@@ -0,0 +1,5 @@
# Locally computed
sha256 a7fa4845e9908523c38d4acf92f8a41fdfcd19def41bd5090d7ad767a6dc75c3 squashfs-4.4.tar.gz
# License files
sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING
+96
View File
@@ -0,0 +1,96 @@
################################################################################
#
# squashfs
#
################################################################################
SQUASHFS_VERSION = 4.4
SQUASHFS_SITE = $(call github,plougher,squashfs-tools,$(SQUASHFS_VERSION))
SQUASHFS_LICENSE = GPL-2.0+
SQUASHFS_LICENSE_FILES = COPYING
SQUASHFS_CPE_ID_VENDOR = squashfs_project
SQUASHFS_MAKE_ARGS = XATTR_SUPPORT=1
ifeq ($(BR2_PACKAGE_SQUASHFS_LZ4),y)
SQUASHFS_DEPENDENCIES += lz4
SQUASHFS_MAKE_ARGS += LZ4_SUPPORT=1 COMP_DEFAULT=lz4
else
SQUASHFS_MAKE_ARGS += LZ4_SUPPORT=0
endif
ifeq ($(BR2_PACKAGE_SQUASHFS_LZMA),y)
SQUASHFS_DEPENDENCIES += xz
SQUASHFS_MAKE_ARGS += LZMA_XZ_SUPPORT=1 COMP_DEFAULT=lzma
else
SQUASHFS_MAKE_ARGS += LZMA_XZ_SUPPORT=0
endif
ifeq ($(BR2_PACKAGE_SQUASHFS_XZ),y)
SQUASHFS_DEPENDENCIES += xz
SQUASHFS_MAKE_ARGS += XZ_SUPPORT=1 COMP_DEFAULT=xz
else
SQUASHFS_MAKE_ARGS += XZ_SUPPORT=0
endif
ifeq ($(BR2_PACKAGE_SQUASHFS_LZO),y)
SQUASHFS_DEPENDENCIES += lzo
SQUASHFS_MAKE_ARGS += LZO_SUPPORT=1 COMP_DEFAULT=lzo
else
SQUASHFS_MAKE_ARGS += LZO_SUPPORT=0
endif
ifeq ($(BR2_PACKAGE_SQUASHFS_ZSTD),y)
SQUASHFS_DEPENDENCIES += zstd
SQUASHFS_MAKE_ARGS += ZSTD_SUPPORT=1 COMP_DEFAULT=zstd
else
SQUASHFS_MAKE_ARGS += ZSTD_SUPPORT=0
endif
ifeq ($(BR2_PACKAGE_SQUASHFS_GZIP),y)
SQUASHFS_DEPENDENCIES += zlib
SQUASHFS_MAKE_ARGS += GZIP_SUPPORT=1 COMP_DEFAULT=gzip
else
SQUASHFS_MAKE_ARGS += GZIP_SUPPORT=0
endif
HOST_SQUASHFS_DEPENDENCIES = host-zlib host-lz4 host-lzo host-xz host-zstd
HOST_SQUASHFS_MAKE_ARGS = \
XATTR_SUPPORT=1 \
XZ_SUPPORT=1 \
GZIP_SUPPORT=1 \
LZ4_SUPPORT=1 \
LZO_SUPPORT=1 \
LZMA_XZ_SUPPORT=1 \
ZSTD_SUPPORT=1
define SQUASHFS_BUILD_CMDS
$(TARGET_MAKE_ENV) $(MAKE) \
CC="$(TARGET_CC)" \
EXTRA_CFLAGS="$(TARGET_CFLAGS) -fgnu89-inline" \
EXTRA_LDFLAGS="$(TARGET_LDFLAGS)" \
$(SQUASHFS_MAKE_ARGS) \
-C $(@D)/squashfs-tools/
endef
define SQUASHFS_INSTALL_TARGET_CMDS
$(TARGET_MAKE_ENV) $(MAKE) $(SQUASHFS_MAKE_ARGS) \
-C $(@D)/squashfs-tools/ INSTALL_DIR=$(TARGET_DIR)/usr/bin install
endef
define HOST_SQUASHFS_BUILD_CMDS
$(HOST_MAKE_ENV) $(MAKE) \
CC="$(HOSTCC)" \
EXTRA_CFLAGS="$(HOST_CFLAGS)" \
EXTRA_LDFLAGS="$(HOST_LDFLAGS)" \
$(HOST_SQUASHFS_MAKE_ARGS) \
-C $(@D)/squashfs-tools/
endef
define HOST_SQUASHFS_INSTALL_CMDS
$(HOST_MAKE_ENV) $(MAKE) $(HOST_SQUASHFS_MAKE_ARGS) \
-C $(@D)/squashfs-tools/ INSTALL_DIR=$(HOST_DIR)/bin install
endef
$(eval $(generic-package))
$(eval $(host-generic-package))
+49
View File
@@ -0,0 +1,49 @@
config BR2_PACKAGE_SQUEEZELITE
bool "squeezelite"
depends on BR2_USE_WCHAR # flac
depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
depends on BR2_USE_MMU # mpg123
depends on !BR2_STATIC_LIBS # dlopen
select BR2_PACKAGE_ALSA_LIB
select BR2_PACKAGE_ALSA_LIB_MIXER
select BR2_PACKAGE_FLAC
select BR2_PACKAGE_LIBMAD
select BR2_PACKAGE_LIBVORBIS
select BR2_PACKAGE_MPG123
help
Logitech Media Server client
https://github.com/ralph-irving/squeezelite/
if BR2_PACKAGE_SQUEEZELITE
config BR2_PACKAGE_SQUEEZELITE_FFMPEG
bool "Enable WMA and ALAC decoding"
default y
depends on BR2_PACKAGE_FFMPEG_ARCH_SUPPORTS
select BR2_PACKAGE_FFMPEG
config BR2_PACKAGE_SQUEEZELITE_DSD
bool "Enable DSD decoding"
config BR2_PACKAGE_SQUEEZELITE_LIRC
bool "Enable lirc support"
depends on BR2_INSTALL_LIBSTDCPP
select BR2_PACKAGE_LIRC_TOOLS
comment "lirc support needs a toolchain with C++"
depends on !BR2_INSTALL_LIBSTDCPP
config BR2_PACKAGE_SQUEEZELITE_RESAMPLE
bool "Enable resampling support"
select BR2_PACKAGE_LIBSOXR
config BR2_PACKAGE_SQUEEZELITE_VISEXPORT
bool "Enable visualiser support"
endif
comment "squeezelite needs a toolchain w/ wchar, NPTL, dynamic library"
depends on BR2_USE_MMU
depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS_NPTL \
|| BR2_STATIC_LIBS
+3
View File
@@ -0,0 +1,3 @@
# Locally calculated
sha256 7f0342f4943d3c3498d930060f5a1e8d63ccb7282b9c21f964926e310449d592 squeezelite-71c012ad9ba102feb95823b7b9dc17e5305689c7.tar.gz
sha256 dc01c3da33fea11ed918f9e437b88baa59c70401aab0dad747e33dd9e8035706 LICENSE.txt
+53
View File
@@ -0,0 +1,53 @@
################################################################################
#
# squeezelite
#
################################################################################
SQUEEZELITE_VERSION = 71c012ad9ba102feb95823b7b9dc17e5305689c7
SQUEEZELITE_SITE = $(call github,ralph-irving,squeezelite,$(SQUEEZELITE_VERSION))
SQUEEZELITE_LICENSE = GPL-3.0
SQUEEZELITE_LICENSE_FILES = LICENSE.txt
SQUEEZELITE_DEPENDENCIES = alsa-lib flac libmad libvorbis mpg123
SQUEEZELITE_MAKE_OPTS = -DLINKALL
ifeq ($(BR2_PACKAGE_FAAD2),y)
SQUEEZELITE_DEPENDENCIES += faad2
else
SQUEEZELITE_MAKE_OPTS += -DNO_FAAD
endif
ifeq ($(BR2_PACKAGE_SQUEEZELITE_FFMPEG),y)
SQUEEZELITE_DEPENDENCIES += ffmpeg
SQUEEZELITE_MAKE_OPTS += -DFFMPEG
endif
ifeq ($(BR2_PACKAGE_SQUEEZELITE_DSD),y)
SQUEEZELITE_MAKE_OPTS += -DDSD
endif
ifeq ($(BR2_PACKAGE_SQUEEZELITE_LIRC),y)
SQUEEZELITE_DEPENDENCIES += lirc-tools
SQUEEZELITE_MAKE_OPTS += -DIR
endif
ifeq ($(BR2_PACKAGE_SQUEEZELITE_RESAMPLE),y)
SQUEEZELITE_DEPENDENCIES += libsoxr
SQUEEZELITE_MAKE_OPTS += -DRESAMPLE
endif
ifeq ($(BR2_PACKAGE_SQUEEZELITE_VISEXPORT),y)
SQUEEZELITE_MAKE_OPTS += -DVISEXPORT
endif
define SQUEEZELITE_BUILD_CMDS
$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \
OPTS="$(SQUEEZELITE_MAKE_OPTS)" -C $(@D) all
endef
define SQUEEZELITE_INSTALL_TARGET_CMDS
$(INSTALL) -D -m 0755 $(@D)/squeezelite \
$(TARGET_DIR)/usr/bin/squeezelite
endef
$(eval $(generic-package))
+22
View File
@@ -0,0 +1,22 @@
comment "squid needs a toolchain w/ C++, gcc >= 4.8 not affected by bug 64735"
depends on BR2_USE_MMU
depends on BR2_TOOLCHAIN_HAS_ATOMIC
depends on BR2_TOOLCHAIN_HAS_GCC_BUG_64735 || \
!BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
config BR2_PACKAGE_SQUID
bool "squid"
depends on BR2_TOOLCHAIN_HAS_ATOMIC
depends on BR2_INSTALL_LIBSTDCPP
depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # std::current_exception
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11
# needs fork()
depends on BR2_USE_MMU
select BR2_PACKAGE_LIBCAP
select BR2_PACKAGE_LIBTOOL
select BR2_PACKAGE_LIBXML2
help
Caching proxy for the Web supporting HTTP, HTTPS, FTP, and
more.
http://www.squid-cache.org/
+39
View File
@@ -0,0 +1,39 @@
#!/bin/sh
[ -f /etc/squid.conf ] || exit 0
case "$1" in
start)
printf "Starting squid: "
if [ ! -d /var/log/squid ]; then
mkdir -p /var/log/squid
chown squid:squid /var/log/squid
fi
start-stop-daemon -S -x /usr/sbin/squid
[ $? = 0 ] && echo "OK" || echo "FAIL"
;;
stop)
printf "Stopping squid: "
/usr/sbin/squid -k shutdown
[ $? = 0 ] && echo "OK" || echo "FAIL"
;;
reload)
printf "Reloading squid configuration: "
/usr/sbin/squid -k reconfigure
[ $? = 0 ] && echo "OK" || echo "FAIL"
;;
restart)
printf "Restarting squid: "
/usr/sbin/squid -k restart
[ $? = 0 ] && echo "OK" || echo "FAIL"
;;
*)
echo "Usage: $0 {start|stop|reload|restart}"
exit 1
esac
exit 0
+6
View File
@@ -0,0 +1,6 @@
# From http://www.squid-cache.org/Versions/v4/squid-4.15.tar.xz.asc
md5 a593de9dc888dfeca4f1f7db2cd7d3b9 squid-4.15.tar.xz
sha1 60bda34ba39657e2d870c8c1d2acece8a69c3075 squid-4.15.tar.xz
# Locally calculated
sha256 b693a4e5ab2811a8a854f60de0a62afbbf3a952bb1d047952c9ae01321f84a25 squid-4.15.tar.xz
sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING
+98
View File
@@ -0,0 +1,98 @@
################################################################################
#
# squid
#
################################################################################
SQUID_VERSION = 4.15
SQUID_SOURCE = squid-$(SQUID_VERSION).tar.xz
SQUID_SITE = http://www.squid-cache.org/Versions/v4
SQUID_LICENSE = GPL-2.0+
SQUID_LICENSE_FILES = COPYING
SQUID_CPE_ID_VENDOR = squid-cache
SQUID_DEPENDENCIES = libcap host-libcap libtool libxml2 host-pkgconf \
$(if $(BR2_PACKAGE_LIBNETFILTER_CONNTRACK),libnetfilter_conntrack)
SQUID_CONF_ENV = \
ac_cv_epoll_works=yes \
ac_cv_func_setresuid=yes \
ac_cv_func_va_copy=yes \
ac_cv_func___va_copy=yes \
ac_cv_func_strnstr=no \
ac_cv_have_squid=yes \
BUILDCXX="$(HOSTCXX)" \
BUILDCXXFLAGS="$(HOST_CXXFLAGS)"
SQUID_CONF_OPTS = \
--enable-async-io=8 \
--enable-linux-netfilter \
--enable-removal-policies="lru,heap" \
--with-filedescriptors=1024 \
--disable-ident-lookups \
--enable-auth-basic="fake getpwnam" \
--enable-auth-digest="file" \
--enable-auth-negotiate="wrapper" \
--enable-auth-ntlm="fake" \
--disable-strict-error-checking \
--enable-external-acl-helpers="file_userip" \
--disable-ltdl-install \
--without-included-ltdl \
--with-logdir=/var/log/squid/ \
--with-pidfile=/var/run/squid.pid \
--with-swapdir=/var/cache/squid/ \
--with-default-user=squid
ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
SQUID_CONF_ENV += LIBS=-latomic
endif
ifeq ($(BR2_PACKAGE_LIBKRB5),y)
SQUID_CONF_OPTS += --with-mit-krb5
SQUID_DEPENDENCIES += libkrb5
else
SQUID_CONF_OPTS += --without-mit-krb5
endif
ifeq ($(BR2_PACKAGE_OPENSSL),y)
SQUID_CONF_OPTS += --with-openssl
SQUID_DEPENDENCIES += openssl
else
SQUID_CONF_OPTS += --without-openssl
endif
ifeq ($(BR2_PACKAGE_GNUTLS),y)
SQUID_CONF_OPTS += --with-gnutls
SQUID_DEPENDENCIES += gnutls
else
SQUID_CONF_OPTS += --without-gnutls
endif
ifeq ($(BR2_PACKAGE_SYSTEMD),y)
SQUID_CONF_OPTS += --with-systemd
SQUID_DEPENDENCIES += systemd
else
SQUID_CONF_OPTS += --without-systemd
endif
define SQUID_CLEANUP_TARGET
rm -f $(addprefix $(TARGET_DIR)/usr/bin/, \
RunCache RunAccel)
rm -f $(addprefix $(TARGET_DIR)/etc/, \
cachemgr.conf mime.conf.default squid.conf.default)
endef
SQUID_POST_INSTALL_TARGET_HOOKS += SQUID_CLEANUP_TARGET
define SQUID_USERS
squid -1 squid -1 * - - - Squid proxy cache
endef
define SQUID_INSTALL_INIT_SYSV
$(INSTALL) -m 755 -D package/squid/S97squid \
$(TARGET_DIR)/etc/init.d/S97squid
endef
define SQUID_INSTALL_INIT_SYSTEMD
$(INSTALL) -D -m 0644 $(@D)/tools/systemd/squid.service \
$(TARGET_DIR)/usr/lib/systemd/system/squid.service
endef
$(eval $(autotools-package))
+20
View File
@@ -0,0 +1,20 @@
Fix musl build
Patch was inspired by
http://svnweb.freebsd.org/ports/head/comms/sredird/files/patch-sredird.c?revision=363168&view=markup
http://ftp.netbsd.org/pub/pkgsrc/current/pkgsrc/sysutils/sredird/patches/patch-aa
https://github.com/bitrig/bitrig-ports/blob/master/comms/sredird/patches/patch-sredird_c
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
diff -uNr sredird-2.2.2.org/sredird.c sredird-2.2.2/sredird.c
--- sredird-2.2.2.org/sredird.c 2005-08-12 16:10:46.000000000 +0200
+++ sredird-2.2.2/sredird.c 2016-01-31 18:53:08.000000000 +0100
@@ -110,7 +110,6 @@
#include <fcntl.h>
#include <syslog.h>
#include <termios.h>
-#include <termio.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/ip.h>
+8
View File
@@ -0,0 +1,8 @@
config BR2_PACKAGE_SREDIRD
bool "sredird"
help
Sredird is a serial port redirector that is compliant with
the RFC 2217 "Telnet Com Port Control Option" protocol. This
protocol lets you share a serial port through the network.
http://freecode.com/projects/sredird
+3
View File
@@ -0,0 +1,3 @@
# Locally computed
sha256 640c47dcd84b3b90640165a38eb336a675fdab06c14c09cae2f4a604cae560d3 sredird-2.2.2.tar.gz
sha256 91df39d1816bfb17a4dda2d3d2c83b1f6f2d38d53e53e41e8f97ad5ac46a0cad COPYING

Some files were not shown because too many files have changed in this diff Show More