conf/layer.conf: add BBFILES_DYNAMIC and dynamic layers

some recipes under meta-oe have dependency on meta-python,
and test_world of yocto-check-layer will failed with error
like:

ERROR: test_world (common.CommonCheckLayer)
ERROR: Nothing PROVIDES 'python3-pytoml-native' (but
/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs_60.9.0.bb
DEPENDS on or otherwise requires it). Close matches:
  python3-numpy-native
  python3-pycairo-native
  python3-rpm-native
ERROR: Required build target 'meta-world-pkgdata' has no buildable
providers.
Missing or unbuildable dependency chain was: ['meta-world-pkgdata',
'mozjs', 'python3-pytoml-native']

fix by make these recipes only active when identified layers are
present

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Changqing Li
2020-03-11 16:42:05 +08:00
committed by Khem Raj
parent f5d2bf55a8
commit d178745cbf
50 changed files with 5 additions and 0 deletions
@@ -0,0 +1,14 @@
SUMMARY = "Command line interface for testing internet bandwidth using speedtest.net"
AUTHOR = "Matt Martz"
LICENSE="Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
inherit setuptools3
SRC_URI = "git://github.com/sivel/speedtest-cli.git"
SRCREV = "c58ad3367bf27f4b4a4d5b1bca29ebd574731c5d"
S = "${WORKDIR}/git"
RDEPENDS_${PN} = "python3 python3-setuptools-scm"
@@ -0,0 +1,35 @@
SUMMARY = "A small tool to read/write memory"
DESCRIPTION = "rwmem is a small tool for reading and writing device registers. \
rwmem supports two modes: mmap mode and i2c mode. \
\
In mmap mode rwmem accesses a file by memory mapping it. \
Using /dev/mem as the memory mapped file makes rwmem access memory and \
can thus be used to access devices which have memory mapped registers. \
\
In i2c mode rwmem accesses an i2c peripheral by sending i2c messages to it."
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263"
DEPENDS += "python3 python3-pybind11"
PV .= "+git${SRCPV}"
SRCREV_rwmem = "3ec3e421211b58e766651c2e3a3a21acf14a1906"
SRCREV_inih = "4b10c654051a86556dfdb634c891b6c3224c4109"
SRCREV_FORMAT = "rwmem_inih"
SRC_URI = " \
git://github.com/tomba/rwmem.git;protocol=https;name=rwmem \
git://github.com/benhoyt/inih.git;protocol=https;name=inih;nobranch=1;destsuffix=git/ext/inih \
"
S = "${WORKDIR}/git"
inherit cmake pkgconfig
do_install() {
install -D -m 0755 ${B}/bin/rwmem ${D}${bindir}/rwmem
install -D -m 0644 ${B}/lib/librwmem.a ${D}${libdir}/librwmem.a
}
@@ -0,0 +1,40 @@
From 50a48a7bd8d65a165ce2aac4ba0c1e02bded04aa Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 30 Nov 2019 12:21:31 -0800
Subject: [PATCH] Fix build on 32bit arches with 64bit time_t
time element is deprecated on new input_event structure in kernel's
input.h [1]
[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=152194fe9c3f
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
plugins/devinput.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/plugins/devinput.c b/plugins/devinput.c
index d4d733a..feb4a61 100644
--- a/plugins/devinput.c
+++ b/plugins/devinput.c
@@ -34,6 +34,11 @@
#include <linux/uinput.h>
#include <sys/stat.h>
+#ifndef input_event_sec
+#define input_event_sec time.tv_sec
+#define input_event_usec time.tv_usec
+#endif
+
#ifndef EV_SYN
/* previous name */
#define EV_SYN EV_RST
@@ -459,7 +464,7 @@ char* devinput_rec(struct ir_remote* remotes)
return 0;
}
- log_trace("time %ld.%06ld type %d code %d value %d", event.time.tv_sec, event.time.tv_usec, event.type,
+ log_trace("time %ld.%06ld type %d code %d value %d", event.input_event_sec, event.input_event_usec, event.type,
event.code, event.value);
value = (unsigned)event.value;
@@ -0,0 +1 @@
d /run/lirc 0755 root root -
@@ -0,0 +1,24 @@
# These are the default options to lircd, if installed as
# /etc/lirc/lirc_options.conf. See the lircd(8) and lircmd(8)
# manpages for info on the different options.
[lircd]
nodaemon = False
permission = 666
driver = default
device = /dev/lirc0
output = /var/run/lirc/lircd
pidfile = /var/run/lirc/lircd.pid
plugindir = /usr/lib/lirc/plugins
allow-simulate = No
repeat-max = 600
#listen = [address:]port
#connect = host[:port]
#debug = 5
#uinput = ...
#release = ...
#logfile = ...
[lircmd]
uinput = False
nodeamon = False
@@ -0,0 +1,315 @@
# contributed by angelo castello
#
# note: this config file has been deduced starting from the
# raw codes provided to run mode2 utility.
#
# brand: futarque
begin remote
name futarque
bits 8
flags SPACE_ENC|CONST_LENGTH
eps 30
aeps 100
header 8048 3898
one 555 1436
zero 555 439
gap 113123
ptrail 555
pre_data_bits 8
pre_data 0x54
pre 570 3890
begin codes
MUTE 0x70
EXIT 0xA8
POWER 0xF0
CHANNEL_UP 0x50
CHANNEL_DOWN 0xD0
VOLUME_UP 0x30
VOLUME_DOWN 0xB0
OK 0x98
FAVORITES 0x04
TEXT 0x68
EPG 0xC8
BACK 0x48
MENU 0x88
1 0x00
2 0x80
3 0x40
4 0xC0
5 0x20
6 0xA0
7 0x60
8 0xE0
9 0x10
0 0x90
PAUSE 0x84
INFO 0x38
RED 0xE8
GREEN 0x08
YELLOW 0x28
BLUE 0x78
UP 0xD8
DOWN 0xB8
REWIND 0x44
FASTFORWARD 0x24
PLAYPAUSE 0xC4
STOP 0x64
RECORD 0xA4
AUDIO 0xE4
TAPE 0x14
DVD 0x94
CAPITAL_A 0xF8
CAPITAL_B 0x54
end codes
end remote
# brand: STM PVR-1
begin remote
name stm_pvr_1
bits 16
flags SPACE_ENC|CONST_LENGTH
eps 30
aeps 150
header 9000 4500
one 572 1700
zero 572 572
ptrail 572
repeat 9000 2200
pre_data_bits 16
pre_data 0xFE
gap 100000
begin codes
POWER 0x00ff
FAVORITES 0x7887
MUTE 0x28d7
0 0x708F
1 0xc03f
2 0x40bf
3 0x807f
4 0xe01f
5 0x609f
6 0xa05f
7 0xd02f
8 0x50af
9 0x906f
INFO 0x38c7
SUBTITLE 0xe817
MENU 0x9867
EXIT 0x20df
EPG 0xa857
BACK 0x48b7
CURSOR_UP 0x58a7
CURSOR_DOWN 0xd827
CURSOR_LEFT 0x8877
CURSOR_RIGHT 0xb04f
OK 0x10ef
VOLUME_UP 0x22dd
VOLUME_DOWN 0x8a75
CHANNEL_UP 0x12ed
CHANNEL_DOWN 0x4ab5
TEXT 0xf00f
RADIO 0x926d
ZOOM 0x6897
AUDIO 0x08f7
RED 0x42bd
GREEN 0xa25d
YELLOW 0x827d
BLUE 0x02fd
CUSTOM0 0x52ad
CUSTOM1 0x30cf
PLAY 0x629d
PAUSE 0xb24d
PREVIOUS 0xc837
NEXT 0xf807
REWIND 0x32cd
FASTFORWARD 0x0af5
AUX 0x7a85
CUSTOM3 0xb847
PIP 0x3ac5
SWAP 0xba45
end codes
end remote
# brand: STM DTV-2
begin remote
name stm_dtv_2
flags SHIFT_ENC|CONST_LENGTH
bits 13
aeps 150
one 850 850
zero 850 850
plead 850
gap 67800
toggle_bit 2
begin codes
POWER 0x100C
FAVORITES 0x1015
AUX 0x1038
1 0x1001
2 0x1002
3 0x1003
4 0x1004
5 0x1005
6 0x1006
7 0x1007
8 0x1008
9 0x1009
PERIOD 0x1024
0 0x103E
BACK 0x1023
MENU 0x1016
INFO 0x100F
EPG 0x101E
EXIT 0x1018
CURSOR_UP 0x1017
CURSOR_DOWN 0x101D
CURSOR_LEFT 0x1019
CURSOR_RIGHT 0x101B
OK 0x101A
VOLUME_UP 0x1010
VOLUME_DOWN 0x1011
CHANNEL_UP 0x1020
CHANNEL_DOWN 0x1021
TEXT 0x102E
SUBTITLE 0x103C
FREEZE 0x1014
ZOOM 0x102B
RED 0x1028
GREEN 0x102A
YELLOW 0x102F
BLUE 0x1030
CUSTOM10 0x1022
INTERNET 0x1027
CUSTOM11 0x102C
AUDIO 0x1025
RECORD 0x102D
PLAYPAUSE 0x1029
STOP 0x1026
CUSTOM1 0x101C
MUTE 0x100d
CUSTOM12 0x101F
PIP 0x100B
SWAP 0x100E
end codes
end remote
# brand: Comcast
# model no. of remote control: XR2
# 32 bits for the pre-date (should be value 0x170F443E)
# width between pre_bits and data: 12900 microseconds
#
# 24 bits for the data (key code)
# To get key REPEAT, XOR 0x088 with KEY value
# There are 8 post bits (both should be zero)
#
# Gap between keys: 8100 microseconds
begin remote
name Xfinity-XR2
bits 24
flags XMP
eps 20
aeps 300
one 0 137
zero 250 710
ptrail 250
pre_data_bits 32
pre_data 0x170F443E
post_data_bits 8
post_data 0x0
pre 250 12921
gap 81698
toggle_bit_mask 0x0
begin codes
1 0x1E0001
1_repeat 0x168001
2 0x1D0002
2_repeat 0x158002
3 0x1C0003
3_repeat 0x148003
4 0x1B0004
4_repeat 0x138004
5 0x1A0005
5_repeat 0x128005
6 0x190006
6_repeat 0x118006
7 0x180007
7_repeat 0x108007
8 0x170008
8_repeat 0x1F8008
9 0x160009
9_repeat 0x1E8009
0 0x1F0000
0_repeat 0x178000
OK 0x180025
OK_repeat 0x108025
POWER 0x10000F
POWER_repeat 0x18800F
UP 0x1C0021
UP_repeat 0x148021
DOWN 0x1B0022
DOWN_repeat 0x138022
LEFT 0x1A0023
LEFT_repeat 0x128023
RIGHT 0x190024
RIGHT_repeat 0x118024
REWIND 0x190033
REWIND_repeat 0x118033
PLAY 0x1C0030
PLAY_repeat 0x148030
FASTFORWARD 0x180034
FASTFORWARD_repeat 0x108034
RECORD 0x170035
RECORD_repeat 0x1F8035
REPLAY 0x170053
REPLAY_repeat 0x1F8053
A 0x190060
A_repeat 0x118060
B 0x180061
B_repeat 0x108061
C 0x170062
C_repeat 0x1F8062
D 0x160063
D_repeat 0x1E8063
PAGE_UP 0x150028
PAGE_UP_repeat 0x1D8028
PAGE_DOWN 0x140029
PAGE_DOWN_repeat 0x1C8029
GUIDE 0x160027
GUIDE_repeat 0x1E8027
MENU 0x1D0020
MENU_repeat 0x158020
EXIT 0x13002A
EXIT_repeat 0x1B802A
INFO 0x170026
INFO_repeat 0x1F8026
LAST 0x190051
LAST_repeat 0x118051
VOLUME_UP 0x15000A
VOLUME_UP_repeat 0x1D800A
CHANNEL_UP 0x12000D
CHANNEL_UP_repeat 0x1A800D
VOLUME_DOWN 0x14000B
VOLUME_DOWN_repeat 0x1C800B
CHANNEL_DOWN 0x11000E
CHANNEL_DOWN_repeat 0x19800E
MUTE 0x13000C
MUTE_repeat 0x1B800D
end codes
end remote
@@ -0,0 +1,40 @@
#! /bin/sh
#
# This is an init script for Familiar
# Copy it to /etc/init.d/lircd and type
# > update-rc.d lircd defaults 20
#
test -f /usr/sbin/lircd || exit 0
test -f /etc/lircd.conf || exit 0
case "$1" in
start)
echo -n "Starting lirc daemon: lircd"
start-stop-daemon --start --quiet --exec /usr/sbin/lircd -- --device=/dev/lirc0
echo "."
;;
stop)
echo -n "Stopping lirc daemon: lircd"
start-stop-daemon --stop --quiet --exec /usr/sbin/lircd
echo "."
;;
reload|force-reload)
start-stop-daemon --stop --quiet --signal 1 --exec /usr/sbin/lircd
;;
restart)
echo -n "Stopping lirc daemon: lircd"
start-stop-daemon --stop --quiet --exec /usr/sbin/lircd
sleep 1
echo -n "Starting lirc daemon: lircd"
start-stop-daemon --start --quiet --exec /usr/sbin/lircd -- --device=/dev/lirc0
echo "."
;;
*)
echo "Usage: /etc/init.d/lircd {start|stop|reload|restart|force-reload}"
exit 1
esac
exit 0
@@ -0,0 +1,20 @@
[Unit]
Description=LIRC Infrared Signal Decoder
After=network.target
[Service]
Type=forking
EnvironmentFile=/etc/lirc/lircd.conf
PIDFile=/run/lirc/lircd.pid
ExecStartPre=/bin/mkdir -p /run/lirc
ExecStartPre=/bin/rm -f /dev/lircd
ExecStartPre=/bin/rm -f /run/lirc/lircd
ExecStartPre=/bin/ln -s /run/lirc/lircd /dev/lircd
ExecStart=/usr/sbin/lircd --pidfile=/run/lirc/lircd.pid --device=/dev/lirc0
ExecStopPost=/bin/rm -f /dev/lircd
ExecStopPost=/bin/rm -fR /run/lirc
[Install]
WantedBy=multi-user.target
@@ -0,0 +1,37 @@
#! /bin/sh
#
# This is an init script for Familiar
# Copy it to /etc/init.d/lircexecd and type
# > update-rc.d lircexecd defaults 20
# It must be started after lircd (and it does alphabetically :-)
# irexec reads /etc/lircrc by default
test -f /usr/bin/irexec || exit 0
test -f /etc/lircrc || exit 0
case "$1" in
start)
echo -n "Starting lircexec daemon: irexec"
start-stop-daemon --start --quiet --exec /usr/bin/irexec -- --daemon
echo "."
;;
stop)
echo -n "Stopping lircexec daemon: irexec"
start-stop-daemon --stop --quiet --exec /usr/bin/irexec
echo "."
;;
restart|force-restart)
echo -n "Stopping lircexec daemon: irexec"
start-stop-daemon --stop --quiet --exec /usr/bin/irexec
sleep 1
echo -n "Starting lircexec daemon: irexec"
start-stop-daemon --start --quiet --exec /usr/bin/irexec -- --daemon
echo "."
;;
*)
echo "Usage: /etc/init.d/lircexec {start|stop|reload|restart|force-restart}"
exit 1
esac
exit 0
@@ -0,0 +1,101 @@
Index: lirc-0.9.4d/daemons/lircrcd.cpp
===================================================================
--- lirc-0.9.4d.orig/daemons/lircrcd.cpp
+++ lirc-0.9.4d/daemons/lircrcd.cpp
@@ -29,10 +29,12 @@
#include <sys/un.h>
#include <sys/stat.h>
#include <sys/types.h>
+#include <poll.h>
#include <syslog.h>
#include "lirc_client.h"
#include "lirc/lirc_log.h"
+#include "lirc/curl_poll.h"
#define MAX_CLIENTS 100
#define WHITE_SPACE " \t"
Index: lirc-0.9.4d/lib/curl_poll.c
===================================================================
--- lirc-0.9.4d.orig/lib/curl_poll.c
+++ lirc-0.9.4d/lib/curl_poll.c
@@ -36,6 +36,7 @@
#include <stdlib.h>
#include <sys/time.h>
#include <sys/types.h>
+#include <sys/poll.h>
#include "lirc_log.h"
#include "curl_poll.h"
@@ -67,7 +68,7 @@ static const logchannel_t logchannel = L
#ifdef HAVE_POLL_FINE
-int curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms)
+int curl_poll(struct pollfd *ufds, unsigned int nfds, int timeout_ms)
{
return poll(ufds, nfds, timeout_ms);
}
@@ -112,7 +113,7 @@ static int verify_sock(int s)
}
-int curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms)
+int curl_poll(struct pollfd *ufds, unsigned int nfds, int timeout_ms)
{
struct timeval pending_tv;
struct timeval* ptimeout;
Index: lirc-0.9.4d/lib/curl_poll.h
===================================================================
--- lirc-0.9.4d.orig/lib/curl_poll.h
+++ lirc-0.9.4d/lib/curl_poll.h
@@ -1,5 +1,5 @@
-#ifndef _POLL_H
-#define _POLL_H
+#ifndef _LIB_CURL_POLL_H
+#define _LIB_CURL_POLL_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
@@ -29,13 +29,9 @@
extern "C" {
#endif
-#ifdef HAVE_SYS_POLL_H
-#include <sys/poll.h>
-#else
#include <poll.h>
-#endif
-int curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms);
+int curl_poll(struct pollfd *ufds, unsigned int nfds, int timeout_ms);
#ifdef __cplusplus
}
Index: lirc-0.9.4d/lib/lirc/curl_poll.h
===================================================================
--- lirc-0.9.4d.orig/lib/lirc/curl_poll.h
+++ lirc-0.9.4d/lib/lirc/curl_poll.h
@@ -1,5 +1,5 @@
-#ifndef _POLL_H
-#define _POLL_H
+#ifndef _LIRC_CURL_POLL_H
+#define _LIRC_CURL_POLL_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
@@ -29,13 +29,9 @@
extern "C" {
#endif
-#ifdef HAVE_SYS_POLL_H
-#include <sys/poll.h>
-#else
#include <poll.h>
-#endif
-int curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms);
+int curl_poll(struct pollfd *ufds, unsigned int nfds, int timeout_ms);
#ifdef __cplusplus
}
@@ -0,0 +1,86 @@
DESCRIPTION = "LIRC is a package that allows you to decode and send infra-red signals of many commonly used remote controls."
DESCRIPTION_append_lirc = " This package contains the lirc daemon, libraries and tools."
DESCRIPTION_append_lirc-exec = " This package contains a daemon that runs programs on IR signals."
DESCRIPTION_append_lirc-remotes = " This package contains some config files for remotes."
DESCRIPTION_append_lirc-nslu2example = " This package contains a working config for RC5 remotes and a modified NSLU2."
HOMEPAGE = "http://www.lirc.org"
SECTION = "console/network"
LICENSE = "GPLv2"
DEPENDS = "libxslt-native alsa-lib libftdi libusb1 libusb-compat jack portaudio-v19 python3-pyyaml"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
SRC_URI = "http://prdownloads.sourceforge.net/lirc/lirc-${PV}.tar.bz2 \
file://pollfd.patch \
file://0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch \
file://lircd.service \
file://lircd.init \
file://lircexec.init \
file://lircd.conf \
file://lirc_options.conf \
file://lirc.tmpfiles \
"
SRC_URI[md5sum] = "0d11679cbdd94a5a6da00a8e7231b4bf"
SRC_URI[sha256sum] = "c68f18c35b489b865c0a741d119b136e8702191538cd3551b977a7af6c4e41ab"
SYSTEMD_PACKAGES = "lirc lirc-exec"
SYSTEMD_SERVICE_${PN} = "lircd.service lircmd.service lircd-setup.service lircd-uinput.service"
SYSTEMD_SERVICE_${PN}-exec = "irexec.service"
SYSTEMD_AUTO_ENABLE_lirc = "enable"
SYSTEMD_AUTO_ENABLE_lirc-exec = "enable"
inherit autotools pkgconfig systemd python3native
PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/,--without-systemdsystemunitdir,systemd"
PACKAGECONFIG[x11] = "--with-x,--with-x=no,libx11,"
PACKAGECONFIG ?= " \
${@bb.utils.contains('DISTRO_FEATURES', 'systemd', ' systemd', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'x11', ' x11', '', d)} \
"
CACHED_CONFIGUREVARS = "HAVE_WORKING_POLL=yes"
#EXTRA_OEMAKE = 'SUBDIRS="lib daemons tools"'
do_install_append() {
install -m 0755 -d ${D}${sysconfdir}
install -m 0755 -d ${D}${sysconfdir}/lirc
install -m 0755 -d ${D}${systemd_unitdir}/system
install -m 0755 -d ${D}${libdir}/tmpfiles.d
install -m 0644 ${WORKDIR}/lircd.conf ${D}${sysconfdir}/lirc/
install -m 0644 ${WORKDIR}/lirc_options.conf ${D}${sysconfdir}/lirc/
install -m 0644 ${WORKDIR}/lircd.service ${D}${systemd_unitdir}/system/
install -m 0755 ${WORKDIR}/lircexec.init ${D}${systemd_unitdir}/system/
install -m 0644 ${WORKDIR}/lirc.tmpfiles ${D}${libdir}/tmpfiles.d/lirc.conf
rm -rf ${D}${libdir}/lirc/plugins/*.la
rmdir ${D}/var/run/lirc ${D}/var/run
chown -R root:root ${D}${datadir}/lirc/contrib
}
PACKAGES =+ "${PN}-contrib ${PN}-exec ${PN}-plugins ${PN}-python"
RDEPENDS_${PN} = "bash"
RDEPENDS_${PN}-exec = "${PN}"
RDEPENDS_${PN}-python = "python3-shell python3-pyyaml python3-datetime python3-netclient python3-stringold"
RRECOMMENDS_${PN} = "${PN}-exec ${PN}-plugins"
FILES_${PN}-plugins = "${libdir}/lirc/plugins/*.so ${datadir}/lirc/configs"
FILES_${PN}-contrib = "${datadir}/lirc/contrib"
FILES_${PN}-exec = "${bindir}/irexec ${sysconfdir}/lircexec ${systemd_unitdir}/system/irexec.service"
FILES_${PN} += "${systemd_unitdir}/system/lircexec.init"
FILES_${PN} += "${systemd_unitdir}/system/lircd.service"
FILES_${PN} += "${systemd_unitdir}/system/lircd.socket"
FILES_${PN} += "${libdir}/tmpfiles.d/lirc.conf"
FILES_${PN}-dbg += "${libdir}/lirc/plugins/.debug"
FILES_${PN}-python += "${bindir}/irdb-get ${bindir}/irtext2udp ${bindir}/lircd-setup ${bindir}/pronto2lirc ${libdir}/python*/site-packages"
INITSCRIPT_PACKAGES = "lirc lirc-exec"
INITSCRIPT_NAME_lirc-exec = "lircexec"
INITSCRIPT_PARAMS_lirc-exec = "defaults 21"
# this is for distributions that don't use udev
pkg_postinst_${PN}_append() {
if [ ! -c $D/dev/lirc -a ! -f /sbin/udevd ]; then mknod $D/dev/lirc c 61 0; fi
}
SECURITY_CFLAGS = "${SECURITY_NO_PIE_CFLAGS}"
@@ -0,0 +1,314 @@
SUMMARY = "Meta-oe ptest packagegroups"
PACKAGE_ARCH = "${MACHINE_ARCH}"
inherit packagegroup
PROVIDES = "${PACKAGES}"
PACKAGES = ' \
packagegroup-meta-oe \
packagegroup-meta-oe-benchmarks \
packagegroup-meta-oe-connectivity \
packagegroup-meta-oe-core \
packagegroup-meta-oe-crypto \
packagegroup-meta-oe-bsp \
packagegroup-meta-oe-dbs \
packagegroup-meta-oe-devtools \
packagegroup-meta-oe-extended \
packagegroup-meta-oe-kernel \
packagegroup-meta-oe-multimedia \
packagegroup-meta-oe-navigation \
packagegroup-meta-oe-security \
packagegroup-meta-oe-support \
packagegroup-meta-oe-test \
${@bb.utils.contains("DISTRO_FEATURES", "x11", "packagegroup-meta-oe-gnome", "", d)} \
${@bb.utils.contains("DISTRO_FEATURES", "x11", "packagegroup-meta-oe-graphics", "", d)} \
${@bb.utils.contains("DISTRO_FEATURES", "ptest", "packagegroup-meta-oe-ptest-packages", "", d)} \
'
RDEPENDS_packagegroup-meta-oe = "\
packagegroup-meta-oe-benchmarks \
packagegroup-meta-oe-connectivity \
packagegroup-meta-oe-core \
packagegroup-meta-oe-crypto \
packagegroup-meta-oe-bsp \
packagegroup-meta-oe-dbs \
packagegroup-meta-oe-devtools \
packagegroup-meta-oe-extended \
packagegroup-meta-oe-kernel \
packagegroup-meta-oe-multimedia \
packagegroup-meta-oe-navigation \
packagegroup-meta-oe-security \
packagegroup-meta-oe-support \
packagegroup-meta-oe-test \
${@bb.utils.contains("DISTRO_FEATURES", "x11", "packagegroup-meta-oe-gnome", "", d)} \
${@bb.utils.contains("DISTRO_FEATURES", "x11", "packagegroup-meta-oe-graphics", "", d)} \
${@bb.utils.contains("DISTRO_FEATURES", "ptest", "packagegroup-meta-oe-ptest-packages", "", d)} \
"
RDEPENDS_packagegroup-meta-oe-benchmarks = "\
dhrystone iperf2 linpack phoronix-test-suite \
tiobench bonnie++ fio iperf2 iperf3 lmbench s-suite whetstone \
libc-bench memtester sysbench dbench iozone3 libhugetlbfs \
nbench-byte tinymembench \
${@bb.utils.contains("DISTRO_FEATURES", "x11 wayland opengl", "glmark2", "", d)} \
"
RDEPENDS_packagegroup-meta-oe-benchmarks_remove_mipsarch = "libhugetlbfs"
RDEPENDS_packagegroup-meta-oe-benchmarks_remove_mips64 = "tinymembench"
RDEPENDS_packagegroup-meta-oe-benchmarks_remove_mips64el = "tinymembench"
RDEPENDS_packagegroup-meta-oe-benchmarks_remove_riscv64 = "libhugetlbfs"
RDEPENDS_packagegroup-meta-oe-benchmarks_remove_riscv32 = "libhugetlbfs"
RDEPENDS_packagegroup-meta-oe-connectivity ="\
gammu hostapd irssi krb5 libev libimobiledevice \
libmbim libmtp libndp libqmi libtorrent \
libuv libwebsockets linuxptp lirc loudmouth \
modemmanager mosh \
paho-mqtt-c phonet-utils rabbitmq-c rfkill rtorrent \
ser2net smstools3 telepathy-glib thrift \
usbmuxd zabbix zeromq \
${@bb.utils.contains("DISTRO_FEATURES", "x11", "obex-data-server", "", d)} \
libmikmod \
obexftp openobex libnet \
${@bb.utils.contains("BBFILE_COLLECTIONS", "meta-python2", "telepathy-idle", "", d)} \
"
RDEPENDS_packagegroup-meta-oe-connectivity_append_libc-glibc = " wvstreams wvdial"
# dracut needs dracut
RDEPENDS_packagegroup-meta-oe-core ="\
dbus-daemon-proxy libdbus-c++ \
ell glibmm libsigc++-2.0 libxml++ distro-feed-configs \
mm-common opencl-headers opencl-icd-loader \
proxy-libintl usleep \
${@bb.utils.contains("DISTRO_FEATURES", "systemd", "dbus-broker ndctl", "", d)} \
"
RDEPENDS_packagegroup-meta-oe-crypto ="\
botan cryptsetup libkcapi libmcrypt \
libsodium pkcs11-helper \
"
RDEPENDS_packagegroup-meta-oe-bsp ="\
acpitool cpufrequtils edac-utils efibootmgr \
efivar flashrom lmsensors lmsensors-config \
lsscsi nvme-cli pcmciautils pointercal \
"
RDEPENDS_packagegroup-meta-oe-bsp_remove_mipsarch = "efivar efibootmgr"
RDEPENDS_packagegroup-meta-oe-bsp_remove_powerpc = "efivar efibootmgr"
RDEPENDS_packagegroup-meta-oe-bsp_remove_powerpc64 = "efivar efibootmgr"
RDEPENDS_packagegroup-meta-oe-bsp_remove_powerpc64le = "efivar efibootmgr"
RDEPENDS_packagegroup-meta-oe-bsp_remove_riscv64 = "efivar efibootmgr"
RDEPENDS_packagegroup-meta-oe-bsp_remove_riscv32 = "efivar efibootmgr"
RDEPENDS_packagegroup-meta-oe-dbs ="\
leveldb libdbi mariadb mariadb-native \
postgresql psqlodbc rocksdb soci \
sqlite \
${@bb.utils.contains("BBFILE_COLLECTIONS", "meta-python2", "mysql-python", "", d)} \
"
RDEPENDS_packagegroup-meta-oe-devtools ="\
android-tools android-tools-conf bootchart breakpad \
capnproto cgdb cscope ctags \
debootstrap dmalloc flatbuffers \
giflib grpc icon-slicer iptraf-ng jq jsoncpp jsonrpc json-spirit \
kconfig-frontends lemon libedit libgee libsombok3 \
libubox log4cplus lshw ltrace lua mcpp memstat mercurial \
mpich msgpack-c nlohmann-json openocd pax-utils \
ipc-run libdbd-mysql-perl libdbi-perl libio-pty-perl php \
protobuf protobuf-c python3-distutils-extra \
rapidjson serialcheck sip3 tclap uftrace uw-imap valijson \
xmlrpc-c yajl yasm \
${@bb.utils.contains("DISTRO_FEATURES", "x11", "geany geany-plugins glade tk", "", d)} \
${@bb.utils.contains("BBFILE_COLLECTIONS", "meta-python2", "nodejs", "", d)} \
"
RDEPENDS_packagegroup-meta-oe-devtools_remove_armv5 = "uftrace nodejs"
RDEPENDS_packagegroup-meta-oe-devtools_remove_mipsarch = "uftrace lshw"
RDEPENDS_packagegroup-meta-oe-devtools_remove_mips64 = "nodejs"
RDEPENDS_packagegroup-meta-oe-devtools_remove_mips64el = "nodejs"
RDEPENDS_packagegroup-meta-oe-devtools_remove_powerpc = "android-tools breakpad uftrace lshw"
RDEPENDS_packagegroup-meta-oe-devtools_remove_powerpc64 = "android-tools uftrace lshw"
RDEPENDS_packagegroup-meta-oe-devtools_remove_powerpc64le = "android-tools uftrace lshw"
RDEPENDS_packagegroup-meta-oe-devtools_remove_riscv64 = "nodejs uftrace lshw"
RDEPENDS_packagegroup-meta-oe-devtools_remove_riscv32 = "nodejs uftrace lshw"
RDEPENDS_packagegroup-meta-oe-extended ="\
byacc cfengine cfengine-masterfiles cmpi-bindings \
ddrescue dialog dumb-init enscript fluentbit \
haveged hexedit hiredis hplip hwloc indent iotop isomd5sum \
jansson konkretcmpi lcdproc libblockdev libcec libconfig \
libdivecomputer libplist libusbmuxd \
liblockfile liblogging liblognorm libmodbus libmodbus \
libpwquality libqb libuio \
lockfile-progs logwatch lprng mailx md5deep \
mozjs mraa nana nicstat \
p7zip p8platform libfile-fnmatch-perl \
rarpd redis rrdtool libfastjson librelp rsyslog sanlock \
sblim-cmpi-devel sblim-sfc-common sblim-sfcc \
scsirastools sgpio smartmontools snappy \
can-utils libsocketcan tipcutils tiptop \
tmux uml-utilities upm vlock volume-key wipe zlog zram \
${@bb.utils.contains("DISTRO_FEATURES", "x11 wayland opengl", "boinc-client", "", d)} \
${@bb.utils.contains("DISTRO_FEATURES", "x11", " libgxim gnuplot libwmf", "", d)} \
${@bb.utils.contains("DISTRO_FEATURES", "bluez", "collectd", "", d)} \
${@bb.utils.contains("DISTRO_FEATURES", "pam", "pam-plugin-ccreds pam-plugin-ldapdb", "", d)} \
${@bb.utils.contains("DISTRO_FEATURES", "pam", "pam-ssh-agent-auth openwsman sblim-sfcb ", "", d)} \
${@bb.utils.contains("DISTRO_FEATURES", "polkit", "polkit polkit-group-rule-datetime ", "", d)} \
${@bb.utils.contains("DISTRO_FEATURES", "polkit", "polkit-group-rule-network ", "", d)} \
${@bb.utils.contains("BBFILE_COLLECTIONS", "meta-python2", "openlmi-tools", "", d)} \
"
RDEPENDS_packagegroup-meta-oe-extended_remove_mipsarch = "upm mraa tiptop"
RDEPENDS_packagegroup-meta-oe-extended_remove_powerpc = "upm mraa"
RDEPENDS_packagegroup-meta-oe-extended_remove_powerpc64 = "upm mraa"
RDEPENDS_packagegroup-meta-oe-extended_remove_powerpc64le = "upm mraa"
RDEPENDS_packagegroup-meta-oe-extended_remove_riscv64 = "upm mraa tiptop"
RDEPENDS_packagegroup-meta-oe-extended_remove_riscv32 = "upm mraa tiptop"
RDEPENDS_packagegroup-meta-oe-extended_remove_libc-musl = "lcdproc"
RDEPENDS_packagegroup-meta-oe-gnome ="\
atkmm gnome-common gnome-doc-utils-stub gtkmm \
gtkmm3 pyxdg vte9 \
"
RDEPENDS_packagegroup-meta-oe-graphics ="\
cairomm dietsplash directfb directfb-examples \
${@bb.utils.contains("PACKAGE_CLASSES", "package_rpm", "dnfdragora dnf-plugin-tui", "", d)} \
fbgrab fbida fontforge fvwm glm gphoto2 libgphoto2 \
gtkperf jasper leptonica libmng libsdl2-image libsdl2-mixer libsdl2-net \
libsdl-gfx libsdl-image libsdl-mixer libsdl-net libsdl-ttf \
libvncserver libyui libyui-ncurses lxdm numlockx openbox openjpeg \
packagegroup-fonts-truetype pangomm qrencode takao-fonts terminus-font \
tesseract tesseract-lang tigervnc tslib source-han-sans-cn-fonts \
source-han-sans-jp-fonts source-han-sans-kr-fonts source-han-sans-tw-fonts ttf-abyssinica \
libvdpau x11vnc xcursorgen xdotool \
bdftopcf iceauth sessreg setxkbmap twm xclock xfontsel xgamma xkbevd xkbprint xkbutils \
xlsatoms xlsclients xlsfonts xmag xmessage xrdb xrefresh xsetmode xsetroot xstdcmap \
xterm xwd xwud xbitmaps xorg-sgml-doctools \
font-adobe-100dpi font-adobe-utopia-100dpi \
font-bh-100dpi font-bh-lucidatypewriter-100dpi font-bitstream-100dpi font-cursor-misc \
font-misc-misc xorg-fonts-100dpi liblbxutil libxaw libxkbui libxpresent xserver-common \
${@bb.utils.contains("DISTRO_FEATURES", "opengl", "freeglut libsdl2-ttf", "", d)} \
"
RDEPENDS_packagegroup-meta-oe-kernel ="\
agent-proxy broadcom-bt-firmware cpupower \
crash ipmitool minicoredumper oprofile \
"
RDEPENDS_packagegroup-meta-oe-kernel_append_x86 = " pm-graph "
RDEPENDS_packagegroup-meta-oe-kernel_append_x86-64 = " pm-graph "
RDEPENDS_packagegroup-meta-oe-kernel_remove_libc-musl = "crash minicoredumper"
RDEPENDS_packagegroup-meta-oe-kernel_remove_mips64 = "crash"
RDEPENDS_packagegroup-meta-oe-kernel_remove_mips64el = "crash"
RDEPENDS_packagegroup-meta-oe-multimedia ="\
alsa-oss audiofile cdrkit id3lib \
a2jmidid jack libass libburn libcdio libcdio-paranoia \
libdvdread libmms libmodplug libopus live555 \
mplayer-common opus-tools \
sound-theme-freedesktop v4l-utils yavta wavpack libvpx \
${@bb.utils.contains("DISTRO_FEATURES", "x11", "xpext pavucontrol xsp", "", d)} \
libmikmod \
${@bb.utils.contains("LICENSE_FLAGS_WHITELIST", "commercial", "libmad faad2 mpv", "", d)} \
"
RDEPENDS_packagegroup-meta-oe-multimedia_remove_libc-musl = "alsa-oss"
RDEPENDS_packagegroup-meta-oe-navigation ="\
geoclue geos libspatialite proj \
${@bb.utils.contains("DISTRO_FEATURES", "x11", "orrery", "", d)} \
${@bb.utils.contains("DISTRO_FEATURES", "bluz4", "gpsd gpsd-machine-conf", "", d)} \
"
RDEPENDS_packagegroup-meta-oe-security ="\
tomoyo-tools \
${@bb.utils.contains("DISTRO_FEATURES", "pam", "passwdqc", "", d)} \
${@bb.utils.contains("DISTRO_FEATURES", "bluz5", "nmap", "", d)} \
"
RDEPENDS_packagegroup-meta-oe-shells ="\
dash tcsh zsh \
"
NE10 = ""
NE10_aarch64 = "ne10"
NE10_armv7a = "ne10"
NE10_armv7ve = "ne10"
RDEPENDS_packagegroup-meta-oe-support ="\
anthy asio atop augeas avro-c bdwgc frame grail c-ares \
ccid ceres-solver ckermit cpprest ctapi-common daemonize \
daemontools debsums devmem2 dfu-util dfu-util-native digitemp \
dstat eject enca epeg espeak fbset fbset-modes \
fftw fltk-native gd gflags glog gnulib gperftools \
gpm gradm gsl gsoap hddtemp hidapi htop hunspell hwdata iksemel \
libinih inotify-tools joe lcms lcov libatasmart libbytesize \
libcereal libcyusbserial libee libeigen libestr libftdi libgit2 \
libgpiod libiio libjs-jquery libjs-sizzle liblinebreak libmicrohttpd \
libmxml liboauth libol liboop libp11 libraw1394 libsmi libsoc libssh2 \
libssh libtar libteam libtinyxml2 libtinyxml libusbg libusb-compat libutempter \
links lockdev log4c log4cpp logwarn libdevmapper lvm2 \
mailcap mbuffer mg minini \
multipath-tools nano neon nmon numactl onig openct openldap \
opensc wbxml2 p910nd pcsc-lite picocom libotr pidgin \
pngcheck poco poppler poppler-data portaudio-v19 pps-tools \
pv pxaregs raptor2 rdfind read-edid rsnapshot \
satyr sdparm pty-forward-native serial-forward \
sg3-utils sharutils smem spitools srecord ssiapi stm32flash \
syslog-ng system-config-keyboard tbb thin-provisioning-tools tokyocabinet \
tree uhubctl unixodbc uriparser usb-modeswitch \
usb-modeswitch-data uthash utouch-evemu utouch-frame \
vim vim-tiny websocketpp xdelta3 xdg-user-dirs xmlstarlet \
zbar zile \
${@bb.utils.contains("DISTRO_FEATURES", "x11", "geis toscoterm uim synergy utouch-mtview links-x11 fltk pidgin-otr", "", d)} \
libcanberra \
${@bb.utils.contains("DISTRO_FEATURES", "x11 pam", "xorgxrdp xrdp", "", d)} \
procmail \
${@bb.utils.contains("DISTRO_FEATURES", "polkit", "udisks2 upower", "", d)} \
${NE10} \
${@bb.utils.contains("BBFILE_COLLECTIONS", "meta-python2", "lio-utils", "", d)} \
"
RDEPENDS_packagegroup-meta-oe-support_remove_arm ="numactl"
RDEPENDS_packagegroup-meta-oe-support_remove_mipsarch = "gperftools"
RDEPENDS_packagegroup-meta-oe-support_remove_riscv64 = "uim"
RDEPENDS_packagegroup-meta-oe-support_remove_riscv32 = "uim"
RDEPENDS_packagegroup-meta-oe-support_remove_powerpc = "ssiapi"
RDEPENDS_packagegroup-meta-oe-support-egl ="\
freerdp libnice opencv \
"
RDEPENDS_packagegroup-meta-oe-test ="\
catch2 cppunit cunit cxxtest evtest fb-test \
fwts googletest pm-qa stress-ng testfloat \
"
RDEPENDS_packagegroup-meta-oe-test_remove_libc-musl = "pm-qa"
RDEPENDS_packagegroup-meta-oe-test_remove_arm = "fwts"
RDEPENDS_packagegroup-meta-oe-test_remove_mipsarch = "fwts"
RDEPENDS_packagegroup-meta-oe-test_remove_powerpc = "fwts"
RDEPENDS_packagegroup-meta-oe-test_remove_riscv64 = "fwts"
RDEPENDS_packagegroup-meta-oe-test_remove_riscv32 = "fwts"
RDEPENDS_packagegroup-meta-oe-ptest-packages = "\
zeromq-ptest \
leveldb-ptest \
psqlodbc-ptest \
lua-ptest \
protobuf-ptest \
rsyslog-ptest \
oprofile-ptest \
libteam-ptest \
uthash-ptest \
libee-ptest \
poco-ptest \
"
RDEPENDS_packagegroup-meta-oe-ptest-packages_append_x86 = "\
mcelog-ptest \
"
RDEPENDS_packagegroup-meta-oe-ptest-packages_append_x86-64 = "\
mcelog-ptest \
"
RDEPENDS_packagegroup-meta-oe-ptest-packages_remove_arm = "numactl-ptest"
@@ -0,0 +1,35 @@
From 97914aeab52b4d0ea0ab9e5ff985a1c5cddb0fa1 Mon Sep 17 00:00:00 2001
From: Vincent Prince <vincent.prince.fr@gmail.com>
Date: Mon, 16 Sep 2019 13:41:39 +0200
Subject: [PATCH 06/10] IntelRDFPMathLib20U1: Check for __DEFINED_wchar_t
This is defined by musl if wchar_t is already defined
avoids errors like
src/third_party/IntelRDFPMathLib20U1/LIBRARY/src/bid_functions.h:46:15: error: typedef redefinition with different types
('int' vs 'unsigned int')
typedef int wchar_t;
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Vincent Prince <vincent.prince.fr@gmail.com>
---
src/third_party/IntelRDFPMathLib20U1/LIBRARY/src/bid_functions.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/third_party/IntelRDFPMathLib20U1/LIBRARY/src/bid_functions.h b/src/third_party/IntelRDFPMathLib20U1/LIBRARY/src/bid_functions.h
index 56775bc..be96a85 100755
--- a/src/third_party/IntelRDFPMathLib20U1/LIBRARY/src/bid_functions.h
+++ b/src/third_party/IntelRDFPMathLib20U1/LIBRARY/src/bid_functions.h
@@ -43,7 +43,7 @@
#if 0 // MongoDB Modification -- just `#include <stddef.h>`
// Fix system header issue on Sun solaris and define required type by ourselves
-#if !defined(_WCHAR_T) && !defined(_WCHAR_T_DEFINED) && !defined(__QNX__)
+#if !defined(_WCHAR_T) && !defined(_WCHAR_T_DEFINED) && !defined(__QNX__) && !defined(__DEFINED_wchar_t)
typedef int wchar_t;
#endif
#else
--
2.7.4
@@ -0,0 +1,31 @@
From ca004968b8d2149f72d4edcfe029489a8c5e10ca Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 23 Sep 2019 12:31:31 -0700
Subject: [PATCH] Mark one of strerror_r implementation glibc specific
glibc has two incompatible strerror_r definitions, one of them is
specific to glibc, mark this one so
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
src/mongo/util/errno_util.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mongo/util/errno_util.cpp b/src/mongo/util/errno_util.cpp
index 564c0071ea..4f7e1d3a38 100644
--- a/src/mongo/util/errno_util.cpp
+++ b/src/mongo/util/errno_util.cpp
@@ -61,7 +61,7 @@ std::string errnoWithDescription(int errNumber) {
char buf[kBuflen];
char* msg{nullptr};
-#if defined(__GNUC__) && defined(_GNU_SOURCE) && \
+#if defined(__GNUC__) && defined(_GNU_SOURCE) && defined(__GLIBC__) && \
(!defined(__ANDROID_API__) || !(__ANDROID_API__ <= 22)) && !defined(EMSCRIPTEN)
msg = strerror_r(errNumber, buf, kBuflen);
#elif defined(_WIN32)
--
2.23.0
@@ -0,0 +1,33 @@
From 8d035e84c2edb44461ef4df9cdef0a6dfce0a1d7 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 24 Aug 2018 12:56:22 -0700
Subject: [PATCH 07/10] Support deprecated resolver functions
Needed for musl libc
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
src/mongo/util/dns_query_posix-impl.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/mongo/util/dns_query_posix-impl.h b/src/mongo/util/dns_query_posix-impl.h
index a5e3629..fb29d2d 100644
--- a/src/mongo/util/dns_query_posix-impl.h
+++ b/src/mongo/util/dns_query_posix-impl.h
@@ -54,6 +54,12 @@
#include <boost/noncopyable.hpp>
+#ifndef res_ninit
+#define res_nclose(arg)
+#define res_ninit(arg) res_init()
+#define res_nsearch(sta, nam, clas, typ, ans, alen) res_search(nam, clas, typ, ans, alen)
+#endif
+
namespace mongo {
namespace dns {
// The anonymous namespace is safe, in this header, as it is not really a header. It is only used
--
2.7.4
@@ -0,0 +1,56 @@
From 1b2e24e14ee72e54e466be2512c78272f62d60b4 Mon Sep 17 00:00:00 2001
From: Vincent Prince <vincent.prince.fr@gmail.com>
Date: Mon, 16 Sep 2019 13:21:44 +0200
Subject: [PATCH 01/10] Tell scons to use build settings from environment
variables
Signed-off-by: Sven Ebenfeld <sven.ebenfeld@gmail.com>
Signed-off-by: Vincent Prince <vincent.prince.fr@gmail.com>
---
SConstruct | 8 ++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/SConstruct b/SConstruct
index 7ebbcbc..e63cf15 100644
--- a/SConstruct
+++ b/SConstruct
@@ -608,6 +608,7 @@ def variable_arch_converter(val):
'amd64': 'x86_64',
'emt64': 'x86_64',
'x86': 'i386',
+ 'aarch64': 'arm64',
}
val = val.lower()
@@ -695,7 +696,8 @@ env_vars.Add(
)
env_vars.Add('CC',
- help='Select the C compiler to use')
+ help='Select the C compiler to use',
+ default=os.getenv('CC'))
env_vars.Add('CCFLAGS',
help='Sets flags for the C and C++ compiler',
@@ -715,7 +717,8 @@ env_vars.Add('CPPPATH',
converter=variable_shlex_converter)
env_vars.Add('CXX',
- help='Select the C++ compiler to use')
+ help='Select the C++ compiler to use',
+ default=os.getenv('CXX'))
env_vars.Add('CXXFLAGS',
help='Sets flags for the C++ compiler',
@@ -1018,6 +1021,7 @@ envDict = dict(BUILD_ROOT=buildDir,
)
env = Environment(variables=env_vars, **envDict)
+env.PrependENVPath('PATH', os.getenv('PATH'))
del envDict
for var in ['CC', 'CXX']:
--
2.7.4
@@ -0,0 +1,41 @@
From d701ceeb15662038435b80ba556a80c17f76d2dc Mon Sep 17 00:00:00 2001
From: Vincent Prince <vincent.prince.fr@gmail.com>
Date: Mon, 16 Sep 2019 13:30:13 +0200
Subject: [PATCH 03/10] Use __GLIBC__ to control use of gnu_get_libc_version
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Vincent Prince <vincent.prince.fr@gmail.com>
---
src/mongo/util/processinfo_linux.cpp | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/mongo/util/processinfo_linux.cpp b/src/mongo/util/processinfo_linux.cpp
index cccb91c..45c4b7d 100644
--- a/src/mongo/util/processinfo_linux.cpp
+++ b/src/mongo/util/processinfo_linux.cpp
@@ -44,10 +44,10 @@
#include <unistd.h>
#ifdef __BIONIC__
#include <android/api-level.h>
-#elif __UCLIBC__
-#include <features.h>
-#else
+#elif defined(__GLIBC__) && !defined(__UCLIBC__)
#include <gnu/libc-version.h>
+#else
+#include <features.h>
#endif
#include <boost/filesystem.hpp>
@@ -546,7 +546,7 @@ void ProcessInfo::SystemInfo::collectSystemInfo() {
std::stringstream ss;
ss << "uClibc-" << __UCLIBC_MAJOR__ << "." << __UCLIBC_MINOR__ << "." << __UCLIBC_SUBLEVEL__;
bExtra.append("libcVersion", ss.str());
-#else
+#elif defined(__GLIBC__)
bExtra.append("libcVersion", gnu_get_libc_version());
#endif
if (!verSig.empty())
--
2.7.4
@@ -0,0 +1,66 @@
From 20fcbf2a05ee6542aba942f6006d149db70fb9ce Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 2 Sep 2017 10:03:37 -0700
Subject: [PATCH 02/10] Use long long instead of int64_t
Fixes
error: call to member function 'appendNumber' is ambiguous
since this function expects long long as parameter and not int64_t
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
src/mongo/util/procparser.cpp | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/mongo/util/procparser.cpp b/src/mongo/util/procparser.cpp
index c574a3f..5ea66b7 100644
--- a/src/mongo/util/procparser.cpp
+++ b/src/mongo/util/procparser.cpp
@@ -261,7 +261,7 @@ Status parseProcStat(const std::vector<StringData>& keys,
StringData stringValue((*partIt).begin(), (*partIt).end() - (*partIt).begin());
- uint64_t value;
+ long long value;
if (!parseNumberFromString(stringValue, &value).isOK()) {
value = 0;
@@ -273,7 +273,7 @@ Status parseProcStat(const std::vector<StringData>& keys,
} else {
StringData stringValue((*partIt).begin(), (*partIt).end() - (*partIt).begin());
- uint64_t value;
+ long long value;
if (!parseNumberFromString(stringValue, &value).isOK()) {
value = 0;
@@ -366,7 +366,7 @@ Status parseProcMemInfo(const std::vector<StringData>& keys,
StringData stringValue((*partIt).begin(), (*partIt).end());
- uint64_t value;
+ long long value;
if (!parseNumberFromString(stringValue, &value).isOK()) {
value = 0;
@@ -522,7 +522,7 @@ Status parseProcDiskStats(const std::vector<StringData>& disks,
StringData data,
BSONObjBuilder* builder) {
bool foundKeys = false;
- std::vector<uint64_t> stats;
+ std::vector<long long> stats;
stats.reserve(kDiskFieldCount);
using string_split_iterator = boost::split_iterator<StringData::const_iterator>;
@@ -597,7 +597,7 @@ Status parseProcDiskStats(const std::vector<StringData>& disks,
StringData stringValue((*partIt).begin(), (*partIt).end());
- uint64_t value;
+ long long value;
if (!parseNumberFromString(stringValue, &value).isOK()) {
value = 0;
--
2.7.4
@@ -0,0 +1,29 @@
From 097e8a66930cfa28ac8bfa35f62d0a9ee3b74488 Mon Sep 17 00:00:00 2001
From: Vincent Prince <vincent.prince.fr@gmail.com>
Date: Mon, 16 Sep 2019 13:46:52 +0200
Subject: [PATCH 10/10] asio: Dont use experimental with clang
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Vincent Prince <vincent.prince.fr@gmail.com>
---
src/third_party/asio-master/asio/include/asio/detail/string_view.hpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/third_party/asio-master/asio/include/asio/detail/string_view.hpp b/src/third_party/asio-master/asio/include/asio/detail/string_view.hpp
index f09cebc..fa307b5 100644
--- a/src/third_party/asio-master/asio/include/asio/detail/string_view.hpp
+++ b/src/third_party/asio-master/asio/include/asio/detail/string_view.hpp
@@ -33,8 +33,8 @@ namespace asio {
using std::basic_string_view;
using std::string_view;
#elif defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
-using std::experimental::basic_string_view;
-using std::experimental::string_view;
+using std::basic_string_view;
+using std::string_view;
#endif // defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
} // namespace asio
--
2.7.4
@@ -0,0 +1,35 @@
From 73c6374ceb0c062e91210cc9ef3e0e9fa30ee514 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 2 Sep 2017 12:42:30 -0700
Subject: [PATCH 04/10] Add a definition for the macro __ELF_NATIVE_CLASS
It depends on the native arch's word size.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
src/mongo/util/stacktrace_posix.cpp | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/mongo/util/stacktrace_posix.cpp b/src/mongo/util/stacktrace_posix.cpp
index 1d7b3d7..f81e329 100644
--- a/src/mongo/util/stacktrace_posix.cpp
+++ b/src/mongo/util/stacktrace_posix.cpp
@@ -39,6 +39,15 @@
#include <string>
#include <sys/utsname.h>
+#if !defined(__GLIBC__)
+#if defined __x86_64__ && !defined __ILP32__
+# define __WORDSIZE 64
+#else
+# define __WORDSIZE 32
+#endif
+#define __ELF_NATIVE_CLASS __WORDSIZE
+#endif
+
#include "mongo/base/init.h"
#include "mongo/config.h"
#include "mongo/db/jsobj.h"
--
2.7.4
@@ -0,0 +1,39 @@
From ffe6045b190b735601cd209d3e7ac121604c5a4e Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 24 Aug 2018 13:07:01 -0700
Subject: [PATCH 08/10] Fix default stack size to 256K
On musl default stack size is ~80K which is too low
for mongodb
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
src/mongo/platform/stack_locator_pthread_getattr_np.cpp | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/src/mongo/platform/stack_locator_pthread_getattr_np.cpp b/src/mongo/platform/stack_locator_pthread_getattr_np.cpp
index 4f3044c..68e47e3 100644
--- a/src/mongo/platform/stack_locator_pthread_getattr_np.cpp
+++ b/src/mongo/platform/stack_locator_pthread_getattr_np.cpp
@@ -36,6 +36,16 @@
#include "mongo/util/assert_util.h"
#include "mongo/util/scopeguard.h"
+__attribute__((constructor))
+static void set_default_stack_size(void)
+{
+ pthread_attr_t attr;
+ invariant(pthread_attr_init(&attr) == 0);
+ invariant(pthread_attr_setstacksize(&attr, 256*1024) == 0);
+ pthread_setattr_default_np(&attr);
+ invariant(pthread_attr_destroy(&attr) == 0);
+}
+
namespace mongo {
StackLocator::StackLocator() {
--
2.7.4
@@ -0,0 +1,19 @@
Index: git/SConstruct
===================================================================
--- git.orig/SConstruct
+++ git/SConstruct
@@ -884,6 +884,14 @@ env_vars.Add('WINDOWS_OPENSSL_BIN',
help='Sets the path to the openssl binaries for packaging',
default='c:/openssl/bin')
+env_vars.Add('PREFIX',
+ help='installation prefix')
+
+env_vars.Add('prefix',
+ help='installation prefix')
+
+
+
# -- Validate user provided options --
# A dummy environment that should *only* have the variables we have set. In practice it has
@@ -0,0 +1,26 @@
From cc95a8878fa581b164dee8fb1f07b05b9d919ef0 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 2 Sep 2017 13:13:15 -0700
Subject: [PATCH 09/10] wiredtiger: Disable strtouq on musl
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
src/third_party/wiredtiger/build_linux/wiredtiger_config.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/third_party/wiredtiger/build_linux/wiredtiger_config.h b/src/third_party/wiredtiger/build_linux/wiredtiger_config.h
index 82e9994..0399a67 100644
--- a/src/third_party/wiredtiger/build_linux/wiredtiger_config.h
+++ b/src/third_party/wiredtiger/build_linux/wiredtiger_config.h
@@ -104,7 +104,7 @@
#define HAVE_STRING_H 1
/* Define to 1 if you have the `strtouq' function. */
-#define HAVE_STRTOUQ 1
+/* #undef HAVE_STRTOUQ 1 */
/* Define to 1 if you have the `sync_file_range' function. */
/* #undef HAVE_SYNC_FILE_RANGE */
--
2.7.4
@@ -0,0 +1,54 @@
From c9fc9e9a44b0fb764ce86a5e57f17d3c5bbfd8cd Mon Sep 17 00:00:00 2001
From: Vincent Prince <vincent.prince.fr@gmail.com>
Date: Mon, 16 Sep 2019 13:37:10 +0200
Subject: [PATCH 05/10] Add alises for arm64 which is same as aarch64
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Vincent Prince <vincent.prince.fr@gmail.com>
---
SConstruct | 1 +
src/third_party/IntelRDFPMathLib20U1/SConscript | 2 +-
src/third_party/wiredtiger/SConscript | 2 +-
3 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/SConstruct b/SConstruct
index e63cf15..5593c78 100644
--- a/SConstruct
+++ b/SConstruct
@@ -1129,6 +1129,7 @@ elif endian == "big":
processor_macros = {
'arm' : { 'endian': 'little', 'defines': ('__arm__',) },
'aarch64' : { 'endian': 'little', 'defines': ('__arm64__', '__aarch64__')},
+ 'arm64' : { 'endian': 'little', 'defines': ('__arm64__', '__aarch64__')},
'i386' : { 'endian': 'little', 'defines': ('__i386', '_M_IX86')},
'ppc64le' : { 'endian': 'little', 'defines': ('__powerpc64__',)},
's390x' : { 'endian': 'big', 'defines': ('__s390x__',)},
diff --git a/src/third_party/IntelRDFPMathLib20U1/SConscript b/src/third_party/IntelRDFPMathLib20U1/SConscript
index f23c071..fb82cd6 100644
--- a/src/third_party/IntelRDFPMathLib20U1/SConscript
+++ b/src/third_party/IntelRDFPMathLib20U1/SConscript
@@ -308,7 +308,7 @@ if processor == 'i386' or processor == 'emscripten':
elif processor == 'arm':
cpp_defines['IA32'] = '1'
cpp_defines['ia32'] = '1'
-elif processor == "aarch64":
+elif processor == "aarch64" or processor == 'arm64':
cpp_defines['efi2'] = '1'
cpp_defines['EFI2'] = '1'
# Using 64 bit little endian
diff --git a/src/third_party/wiredtiger/SConscript b/src/third_party/wiredtiger/SConscript
index cdd090b..97a1b3b 100644
--- a/src/third_party/wiredtiger/SConscript
+++ b/src/third_party/wiredtiger/SConscript
@@ -152,7 +152,7 @@ condition_map = {
'POSIX_HOST' : not env.TargetOSIs('windows'),
'WINDOWS_HOST' : env.TargetOSIs('windows'),
- 'ARM64_HOST' : env['TARGET_ARCH'] == 'aarch64',
+ 'ARM64_HOST' : env['TARGET_ARCH'] in ('aarch64', 'arm64'),
'POWERPC_HOST' : env['TARGET_ARCH'] == 'ppc64le',
'X86_HOST' : env['TARGET_ARCH'] == 'x86_64',
'ZSERIES_HOST' : env['TARGET_ARCH'] == 's390x',
--
2.7.4
@@ -0,0 +1,73 @@
SUMMARY = "mongodb"
LICENSE = "SSPL-1 & Apache-2.0 & Zlib"
LIC_FILES_CHKSUM = "file://LICENSE-Community.txt;md5=3a865f27f11f43ecbe542d9ea387dcf1 \
file://APACHE-2.0.txt;md5=3b83ef96387f14655fc854ddc3c6bd57"
DEPENDS = "openssl libpcap zlib boost curl python3 \
python3-setuptools-native \
python3-pyyaml-native python3-cheetah-native \
python3-psutil-native python3-regex-native \
"
inherit scons dos2unix siteinfo python3native
PV = "4.2.2"
#v4.2.2
SRCREV = "a0bbbff6ada159e19298d37946ac8dc4b497eadf"
SRC_URI = "git://github.com/mongodb/mongo.git;branch=v4.2 \
file://0001-Tell-scons-to-use-build-settings-from-environment-va.patch \
file://0001-Use-long-long-instead-of-int64_t.patch \
file://0001-Use-__GLIBC__-to-control-use-of-gnu_get_libc_version.patch \
file://0002-Add-a-definition-for-the-macro-__ELF_NATIVE_CLASS.patch \
file://arm64-support.patch \
file://0001-IntelRDFPMathLib20U1-Check-for-__DEFINED_wchar_t.patch \
file://0001-Support-deprecated-resolver-functions.patch \
file://0003-Fix-unknown-prefix-env.patch \
"
SRC_URI_append_libc-musl ="\
file://0001-Mark-one-of-strerror_r-implementation-glibc-specific.patch \
file://0002-Fix-default-stack-size-to-256K.patch \
file://0004-wiredtiger-Disable-strtouq-on-musl.patch \
"
SRC_URI_append_toolchain-clang = "\
file://0001-asio-Dont-use-experimental-with-clang.patch \
"
S = "${WORKDIR}/git"
COMPATIBLE_HOST ?= '(x86_64|powerpc64|aarch64).*-linux'
PACKAGECONFIG ??= "tcmalloc system-pcre"
# gperftools compilation fails for arm below v7 because of missing support of
# dmb operation. So we use system-allocator instead of tcmalloc
PACKAGECONFIG_remove_armv6 = "tcmalloc"
PACKAGECONFIG_remove_libc-musl = "tcmalloc"
PACKAGECONFIG[tcmalloc] = "--use-system-tcmalloc,--allocator=system,gperftools,"
PACKAGECONFIG[shell] = ",--js-engine=none,,"
PACKAGECONFIG[system-pcre] = "--use-system-pcre,,libpcre,"
EXTRA_OESCONS = "--prefix=${D}${prefix} \
LIBPATH=${STAGING_LIBDIR} \
LINKFLAGS='${LDFLAGS}' \
CXXFLAGS='${CXXFLAGS}' \
TARGET_ARCH=${TARGET_ARCH} \
--ssl \
--disable-warnings-as-errors \
--use-system-zlib \
--nostrip \
--endian=${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'le', 'little', 'big', d)} \
--wiredtiger=${@['off','on'][d.getVar('SITEINFO_BITS') != '32']} \
${PACKAGECONFIG_CONFARGS} \
core"
scons_do_compile() {
${STAGING_BINDIR_NATIVE}/scons ${PARALLEL_MAKE} ${EXTRA_OESCONS} || \
die "scons build execution failed."
}
scons_do_install() {
${STAGING_BINDIR_NATIVE}/scons install ${EXTRA_OESCONS}|| \
die "scons install execution failed."
}
@@ -0,0 +1,33 @@
From a20feee4963bc38975fbaf44bbe85a31825f59db Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 6 Apr 2019 17:28:28 -0700
Subject: [PATCH 1/3] Fix parallel build (fix port-internal make dependencies)
on many cores
Upstream-Status: Submitted [https://github.com/lcdproc/lcdproc/pull/142]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
server/drivers/Makefile.am | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/server/drivers/Makefile.am b/server/drivers/Makefile.am
index e08f2b2d..4fd2e3f1 100644
--- a/server/drivers/Makefile.am
+++ b/server/drivers/Makefile.am
@@ -47,11 +47,11 @@ CwLnx_LDADD = libLCD.a libbignum.a
futaba_LDADD = @LIBUSB_LIBS@ @LIBUSB_1_0_LIBS@ libLCD.a
g15_LDADD = @LIBG15@
glcd_LDADD = libLCD.a @GLCD_DRIVERS@ @FT2_LIBS@ @LIBPNG_LIBS@ @LIBSERDISP@ @LIBUSB_LIBS@ @LIBX11_LIBS@
-glcd_DEPENDENCIES = @GLCD_DRIVERS@ glcd-glcd-render.o
+glcd_DEPENDENCIES = @GLCD_DRIVERS@ glcd-glcd-render.o libLCD.a
glcdlib_LDADD = @LIBGLCD@
glk_LDADD = libbignum.a
hd44780_LDADD = libLCD.a @HD44780_DRIVERS@ @HD44780_I2C@ @LIBUSB_LIBS@ @LIBFTDI_LIBS@ @LIBUGPIO@ libbignum.a
-hd44780_DEPENDENCIES = @HD44780_DRIVERS@ @HD44780_I2C@
+hd44780_DEPENDENCIES = @HD44780_DRIVERS@ @HD44780_I2C@ libLCD.a libbignum.a
i2500vfd_LDADD = @LIBFTDI_LIBS@
imon_LDADD = libLCD.a libbignum.a
imonlcd_LDADD = libLCD.a
--
2.24.1
@@ -0,0 +1,41 @@
From d447a05ee560ba5894d2ed4cd93d0475c2f3c08e Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Tue, 17 Dec 2019 17:39:32 -0800
Subject: [PATCH 2/3] Include <limits.h> for PATH_MAX definition
musl libc exposes the missing include
Upstream-Status: Submitted [https://github.com/lcdproc/lcdproc/pull/142]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
server/drivers/hidraw_lib.c | 1 +
server/drivers/linux_input.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/server/drivers/hidraw_lib.c b/server/drivers/hidraw_lib.c
index 49b03f20..3b51f279 100644
--- a/server/drivers/hidraw_lib.c
+++ b/server/drivers/hidraw_lib.c
@@ -8,6 +8,7 @@
#include <dirent.h>
#include <errno.h>
#include <fcntl.h>
+#include <limits.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
diff --git a/server/drivers/linux_input.c b/server/drivers/linux_input.c
index 5b914d4c..6fcfc591 100644
--- a/server/drivers/linux_input.c
+++ b/server/drivers/linux_input.c
@@ -5,6 +5,7 @@
#include <dirent.h>
#include <errno.h>
+#include <limits.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
--
2.24.1
@@ -0,0 +1,35 @@
From 7fd144f101fa5c9316d3468ed26f55629afe1305 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Tue, 17 Dec 2019 17:55:54 -0800
Subject: [PATCH 3/3] Fix non x86 platforms on musl
Musl only specifies in/outb for x86/x86. Use the fallback path in case
musl is used.
This should fail compilation during the linking stage but for some reason
does not. Will do if -Werror=implicit-function-declaration is specified.
Original here: https://github.com/openwrt/packages/blob/master/utils/lcdproc/patches/110-in-outb.patch
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
server/drivers/port.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/server/drivers/port.h b/server/drivers/port.h
index c584cd4e..bde235b3 100644
--- a/server/drivers/port.h
+++ b/server/drivers/port.h
@@ -94,7 +94,7 @@ static inline int port_deny_multiple(unsigned short port, unsigned short count);
/* ---------------------------- Linux ------------------------------------ */
/* Use ioperm, inb and outb in <sys/io.h> (Linux) */
/* And iopl for higher addresses of PCI LPT cards */
-#if defined HAVE_IOPERM
+#if defined(__GLIBC__) || (defined(__x86__) || defined(__x86_64__))
/* Glibc2 and Glibc1 */
# ifdef HAVE_SYS_IO_H
--
2.24.1
@@ -0,0 +1,105 @@
DESCRIPTION = "LCDproc is a client/server suite to drive all kinds of LCD (-like) devices. The client \
shipped with this package can be used to acquire various kinds of system stats."
SUMMARY = "Drivers for character-based LCD displays"
HOMEPAGE = "http://lcdproc.org"
SECTION = "utils"
LICENSE = "GPLv2+"
DEPENDS = "ncurses lirc"
LIC_FILES_CHKSUM = "file://COPYING;md5=18810669f13b87348459e611d31ab760 \
file://README.md;beginline=107;md5=5db392f043253a2d64b1737068ce6b58"
PV = "0.5.9+git${SRCPV}"
SRCREV = "3a3d622d9bb74c44fa67bc20573751a207514134"
SRC_URI = "git://github.com/lcdproc/lcdproc \
file://0001-Fix-parallel-build-fix-port-internal-make-dependenci.patch \
file://0002-Include-limits.h-for-PATH_MAX-definition.patch \
file://0003-Fix-non-x86-platforms-on-musl.patch \
"
S = "${WORKDIR}/git"
inherit autotools pkgconfig update-rc.d
LCD_DRIVERS ?= "all,!irman,!svga${SERIALVFD}"
SERIALVFD ?= ""
SERIALVFD_libc-musl = ",!serialVFD"
SERIALVFD_libc-musl_x86 = ""
SERIALVFD_libc-musl_x86-64 = ""
LCD_DEFAULT_DRIVER ?= "curses"
PACKAGECONFIG ??= "usb"
PACKAGECONFIG[usb] = "--enable-libusb,--disable-libusb,virtual/libusb0"
PACKAGECONFIG[ftdi] = "--enable-libftdi,--disable-libftdi,libftdi"
PACKAGECONFIG[g15] = ",,libg15 g15daemon libg15render,"
PACKAGECONFIG[hid] = "--enable-libhid,--disable-libhid,libhid"
PACKAGECONFIG[png] = "--enable-libpng,--disable-libpng,libpng"
LCD_DRIVERS_append = "${@bb.utils.contains('PACKAGECONFIG', 'g15', '', ',!g15', d)}"
EXTRA_OECONF = "--enable-drivers='${LCD_DRIVERS}'"
do_install () {
# binaries
install -D -m 0755 server/LCDd ${D}${sbindir}/LCDd
install -D -m 0755 clients/lcdproc/lcdproc ${D}${bindir}/lcdproc
# init scripts
install -d ${D}${sysconfdir}/init.d
# so far, not fixed :-( and now even uglier :-((
cat scripts/init-LCDd.debian | sed -e s'/--oknodo//' -e 's/ -s -f / -s 1 -f 1 /' -e 's/force-reload/force-restart/' -e 's/sleep 1/sleep 4/' > ${D}${sysconfdir}/init.d/lcdd
chmod 0755 ${D}${sysconfdir}/init.d/lcdd
install -m 0755 scripts/init-lcdproc.debian ${D}${sysconfdir}/init.d/lcdproc
sed -i s'/--oknodo//' ${D}${sysconfdir}/init.d/lcdproc
# configuration files
install -m 0644 ${S}/LCDd.conf ${D}${sysconfdir}/LCDd.conf
sed -i 's!^DriverPath=.*!DriverPath=${libdir}/lcdproc/!' ${D}${sysconfdir}/LCDd.conf
sed -i 's!^Driver=.*!Driver=${LCD_DEFAULT_DRIVER}!' ${D}${sysconfdir}/LCDd.conf
install -m 0644 ${S}/clients/lcdproc/lcdproc.conf ${D}${sysconfdir}/lcdproc.conf
# driver library files
install -d ${D}${libdir}/lcdproc
for i in server/drivers/*.so; do
install -m 0644 $i ${D}${libdir}/lcdproc/
done
# binaries
install -D -m 0755 clients/lcdvc/lcdvc ${D}${sbindir}/lcdvc
# configuration files
install -D -m 0644 ${S}/clients/lcdvc/lcdvc.conf ${D}${sysconfdir}/lcdvc.conf
}
PACKAGES =+ "lcdd lcdvc"
RRECOMMENDS_${PN} = "lcdd"
FILES_lcdd = "${sysconfdir}/LCDd.conf \
${sbindir}/LCDd \
${sysconfdir}/init.d/lcdd"
CONFFILES_lcdd = "${sysconfdir}/LCDd.conf"
CONFFILES_${PN} = "${sysconfdir}/lcdproc.conf"
CONFFILES_lcdvc = "${sysconfdir}/lcdvc.conf"
FILES_lcdvc = "${sysconfdir}/lcdvc.conf ${sbindir}/lcdvc"
# Driver packages
# USB / no USB trickery
RCONFLICTS_lcdd-driver-hd47780nousb = "lcdd-driver-hd44780"
RCONFLICTS_lcdd-driver-hd47780 = "lcdd-driver-hd44780nousb"
INITSCRIPT_PACKAGES = "lcdd lcdproc"
INITSCRIPT_NAME_lcdd = "lcdd"
INITSCRIPT_NAME_lcdproc = "lcdproc"
INITSCRIPT_PARAMS_lcdd = "defaults 70 21"
INITSCRIPT_PARAMS_lcdproc = "defaults 71 20"
python populate_packages_prepend() {
plugindir = d.expand('${libdir}/lcdproc')
do_split_packages(d, plugindir, '(.*)\.so$', 'lcdd-driver-%s', 'LCDd driver for %s', prepend=True)
}
PACKAGES_DYNAMIC += "^lcdd-driver-.*"
@@ -0,0 +1,33 @@
From 0a61b0b98c152f10404ccbdeeac583a486638a7a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
Date: Thu, 6 Jun 2013 18:36:01 +0200
Subject: [PATCH] js.pc.in: do not include RequiredDefines.h for depending
packages
in our cross environment the would fail with:
| cc1: fatal error: /usr/include/js-17.0/js/RequiredDefines.h: No such file or directory
and currently it only defines __STDC_LIMIT_MACROS
Upstream-Status: Inappropriate [embedded specific]
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
Rebase to 52.8.1
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
js/src/build/js.pc.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/js/src/build/js.pc.in b/js/src/build/js.pc.in
index 2eae393..c2dea62 100644
--- a/js/src/build/js.pc.in
+++ b/js/src/build/js.pc.in
@@ -8,4 +8,4 @@ Description: The Mozilla library for JavaScript
Version: @MOZILLA_VERSION@
@PKGCONF_REQUIRES_PRIVATE@
Libs: -L${libdir} -l@JS_LIBRARY_NAME@
-Cflags: -include ${includedir}/@JS_LIBRARY_NAME@/js/RequiredDefines.h -I${includedir}/@JS_LIBRARY_NAME@
+Cflags: -I${includedir}/@JS_LIBRARY_NAME@
--
2.7.4
@@ -0,0 +1,38 @@
From a452138a1dd274bfad381a701729783360dc86fb Mon Sep 17 00:00:00 2001
From: Maciej Borzecki <maciej.borzecki@open-rnd.pl>
Date: Tue, 5 Jan 2016 22:04:17 +0100
Subject: [PATCH] fix cross compilation on i586 targets
Remove offending -Wl,-rpath-link that may cause host libraries to be picked
during linking. The patch applies a fix to configure.in. So as not to
regenerate configure, similar fix is applied there.
Upstream-Status: Inappropriate [embedded specific]
Signed-off-by: Maciej Borzecki <maciej.borzecki@open-rnd.pl>
Rebase to 52.8.1
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Rebase to 60.9.0 (firefox-esr sources)
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
---
js/src/old-configure.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/js/src/old-configure.in b/js/src/old-configure.in
index 3d53ee1..11c3d5a 100644
--- a/js/src/old-configure.in
+++ b/js/src/old-configure.in
@@ -405,7 +405,7 @@ AS='$(CC)'
AS_DASH_C_FLAG='-c'
MOZ_USER_DIR=".mozilla"
-MOZ_FIX_LINK_PATHS="-Wl,-rpath-link,${DIST}/bin -Wl,-rpath-link,${prefix}/lib"
+MOZ_FIX_LINK_PATHS="-Wl,-rpath-link,${DIST}/bin"
dnl Configure platform-specific CPU architecture compiler options.
dnl ==============================================================
--
2.21.0
@@ -0,0 +1,64 @@
From 5028d1cd669c179ed49061316d04c8e8862a5bd8 Mon Sep 17 00:00:00 2001
From: Hongxu Jia <hongxu.jia@windriver.com>
Date: Thu, 12 Jul 2018 15:04:47 +0800
Subject: [PATCH 1/5] do not create python environment
Use oe's python environment rather than create one of host
Upstream-Status: Inappropriate [oe specific]
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Rebase to 60.9.0 (firefox-esr sources)
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
---
build/moz.configure/init.configure | 18 ------------------
configure.py | 10 +++++++++-
3 files changed, 11 insertions(+), 21 deletions(-)
--- a/build/moz.configure/init.configure
+++ b/build/moz.configure/init.configure
@@ -250,24 +250,6 @@ def virtualenv_python(env_python, build_
else:
python = sys.executable
- if not manager.up_to_date(python):
- log.info('Creating Python environment')
- manager.build(python)
-
- python = normsep(manager.python_path)
-
- if python != normsep(sys.executable):
- log.info('Reexecuting in the virtualenv')
- if env_python:
- del os.environ['PYTHON']
- # One would prefer to use os.execl, but that's completely borked on
- # Windows.
- sys.exit(subprocess.call([python] + sys.argv))
-
- # We are now in the virtualenv
- if not distutils.sysconfig.get_python_lib():
- die('Could not determine python site packages directory')
-
return python
--- a/configure.py
+++ b/configure.py
@@ -12,7 +12,15 @@ import textwrap
base_dir = os.path.abspath(os.path.dirname(__file__))
-sys.path.insert(0, os.path.join(base_dir, 'python', 'mozbuild'))
+sys.path.insert(0, os.path.join(base_dir, 'config'))
+def get_immediate_subdirectories(a_dir):
+ return [name for name in os.listdir(a_dir)
+ if os.path.isdir(os.path.join(a_dir, name))]
+for s in ["python", "testing/mozbase"]:
+ sub_dir = os.path.join(base_dir, s)
+ for module_dir in get_immediate_subdirectories(sub_dir):
+ sys.path.insert(0, os.path.join(sub_dir, module_dir))
+
from mozbuild.configure import ConfigureSandbox
from mozbuild.makeutil import Makefile
from mozbuild.pythonutil import iter_modules_in_path
@@ -0,0 +1,34 @@
From e6dcee5f8a0f80ce99946b81fa1233611a149fe6 Mon Sep 17 00:00:00 2001
From: Hongxu Jia <hongxu.jia@windriver.com>
Date: Thu, 12 Jul 2018 18:00:52 +0800
Subject: [PATCH 2/5] fix cannot find link
..
|DEBUG: link: Trying 'mips64-wrs-linux-ld --sysroot=tmp-glibc/work/
mips64-wrs-linux/mozjs/52.8.1-r0/recipe-sysroot '
|ERROR: Cannot find link
...
Upstream-Status: Inappropriate [oe specific]
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
build/moz.configure/checks.configure | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/build/moz.configure/checks.configure b/build/moz.configure/checks.configure
index 8c2dbc0..83bffc3 100644
--- a/build/moz.configure/checks.configure
+++ b/build/moz.configure/checks.configure
@@ -128,7 +128,7 @@ def check_prog(var, progs, what=None, input=None, allow_missing=False,
for prog in value or progs:
log.debug('%s: Trying %s', var.lower(), quote(prog))
- result = find_program(prog, paths)
+ result = find_program(prog.split()[0], paths)
if result:
return result
--
2.7.4
@@ -0,0 +1,28 @@
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 3/5] workaround autoconf 2.13 detection failed
Upstream-Status: Inappropriate [oe specific]
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
build/moz.configure/old.configure | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/build/moz.configure/old.configure b/build/moz.configure/old.configure
index b32c3f7..ece47f4 100644
--- a/build/moz.configure/old.configure
+++ b/build/moz.configure/old.configure
@@ -31,7 +31,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:
--
2.7.4
@@ -0,0 +1,33 @@
From 55d833dc3c194f1eb7841f308ad3b9ec3800d3b3 Mon Sep 17 00:00:00 2001
From: Hongxu Jia <hongxu.jia@windriver.com>
Date: Fri, 13 Jul 2018 15:48:32 +0800
Subject: [PATCH 5/5] fix do_compile failed on mips
Link with var-OS_LDFLAGS to fix the issue.
Such as on mips:
...
|mips-wrsmllib32-linux-g++ -meb -mabi=32 -mhard-float ... -o libmozjs-52.so
|/usr/include/c++/8.1.0/bits/atomic_base.h:514: error: undefined
reference to '__atomic_fetch_add_8'
...
In recipe, set OS_LDFLAGS="-Wl,-latomic" could fix the issue.
Upstream-Status: Inappropriate [oe specific]
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
config/config.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/config/config.mk
+++ b/config/config.mk
@@ -423,7 +423,7 @@ EXPAND_MKSHLIB_ARGS = --uselist
ifdef SYMBOL_ORDER
EXPAND_MKSHLIB_ARGS += --symbol-order $(SYMBOL_ORDER)
endif
-EXPAND_MKSHLIB = $(EXPAND_LIBS_EXEC) $(EXPAND_MKSHLIB_ARGS) -- $(MKSHLIB)
+EXPAND_MKSHLIB = $(EXPAND_LIBS_EXEC) $(EXPAND_MKSHLIB_ARGS) -- $(MKSHLIB) $(OS_LDFLAGS)
# autoconf.mk sets OBJ_SUFFIX to an error to avoid use before including
# this file
@@ -0,0 +1,50 @@
Add RISC-V support
Upstream-Status: Submitted [https://bugzilla.mozilla.org/show_bug.cgi?id=1318905]
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
--- 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 ;;
--- a/build/moz.configure/init.configure
+++ b/build/moz.configure/init.configure
@@ -658,6 +658,9 @@ def split_triplet(triplet, allow_unknown
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'
--- 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__'),
@@ -0,0 +1,27 @@
From 20b639b7364f9953fdacb058f9ba800bcbf029b4 Mon Sep 17 00:00:00 2001
From: Changqing Li <changqing.li@windriver.com>
Date: Thu, 2 Aug 2018 09:40:48 +0800
Subject: [PATCH] mozjs: fix coredump caused by getenv
Upstream-Status: Submitted [https://bugzilla.mozilla.org/show_bug.cgi?id=1480315]
Signed-off-by: Changqing Li <changqing.li@windriver.com>
---
mozglue/misc/TimeStamp.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/mozglue/misc/TimeStamp.cpp b/mozglue/misc/TimeStamp.cpp
index 932b75c..7a4d71b 100644
--- a/mozglue/misc/TimeStamp.cpp
+++ b/mozglue/misc/TimeStamp.cpp
@@ -11,6 +11,7 @@
#include "mozilla/TimeStamp.h"
#include <stdio.h>
#include <string.h>
+#include <stdlib.h>
namespace mozilla {
--
2.7.4
@@ -0,0 +1,21 @@
Drop enable format string warnings to help gcc9
Fixes
| /mnt/a/yoe/build/tmp/work/core2-64-yoe-linux-musl/mozjs/52.9.1-r0/mozjs-52.9.1/js/src/jit/x64/BaseAssembler-x64.h:596:13: error: '%s' directive argument is null [-Werror=format-overflow=]
| 596 | spew("movq " MEM_obs ", %s", ADDR_obs(offset, base, index, scale), GPReg64Name(dst));
| | ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Upstream-Status: Inappropriate [Workaround for gcc9]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
--- a/js/src/moz.build
+++ b/js/src/moz.build
@@ -785,7 +785,7 @@ if CONFIG['JS_HAS_CTYPES']:
if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
# Also disable strict-aliasing for GCC compiler, that is enabled by default
# starting with version 7.1, see Bug 1363009
- CXXFLAGS += ['-Wno-shadow', '-Werror=format', '-fno-strict-aliasing']
+ CXXFLAGS += ['-Wno-shadow', '-fno-strict-aliasing']
# Suppress warnings in third-party code.
if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
@@ -0,0 +1,28 @@
From 9afb0e4d3b9209ea198052cea0401bef7ee25ad8 Mon Sep 17 00:00:00 2001
From: Lei Maohui <leimaohui@cn.fujitsu.com>
Date: Thu, 9 May 2019 12:23:40 +0900
Subject: [PATCH] To fix build error on arm32BE.
error: #error Target architecture was not detected as supported by Double-Conversion.
Signed-off-by: Lei Maohui <leimaohui@cn.fujitsu.com>
---
mfbt/double-conversion/double-conversion/utils.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mfbt/double-conversion/double-conversion/utils.h b/mfbt/double-conversion/double-conversion/utils.h
index 4f37218..93575cb 100644
--- a/mfbt/double-conversion/double-conversion/utils.h
+++ b/mfbt/double-conversion/double-conversion/utils.h
@@ -53,7 +53,7 @@
// disabled.)
// On Linux,x86 89255e-22 != Div_double(89255.0/1e22)
#if defined(_M_X64) || defined(__x86_64__) || \
- defined(__ARMEL__) || defined(__avr32__) || \
+ defined(__arm__) || defined(__avr32__) || \
defined(__hppa__) || defined(__ia64__) || \
defined(__mips__) || \
defined(__powerpc__) || defined(__ppc__) || defined(__ppc64__) || \
--
2.7.4
@@ -0,0 +1,55 @@
patch from https://bugzilla.mozilla.org/show_bug.cgi?id=1426865
Upstream-Status: Submitted [https://bugzilla.mozilla.org/show_bug.cgi?id=1426865]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
--- a/js/public/TypeDecls.h
+++ b/js/public/TypeDecls.h
@@ -21,31 +21,32 @@
#include <stdint.h>
#include "js-config.h"
+#include "jstypes.h"
typedef uint8_t jsbytecode;
-class JSAtom;
-struct JSCompartment;
-struct JSContext;
-class JSFunction;
-class JSObject;
-struct JSRuntime;
-class JSScript;
-class JSString;
-class JSAddonId;
-struct JSFreeOp;
+class JS_PUBLIC_API JSAtom;
+struct JS_PUBLIC_API JSCompartment;
+struct JS_PUBLIC_API JSContext;
+class JS_PUBLIC_API JSFunction;
+class JS_PUBLIC_API JSObject;
+struct JS_PUBLIC_API JSRuntime;
+class JS_PUBLIC_API JSScript;
+class JS_PUBLIC_API JSString;
+class JS_PUBLIC_API JSAddonId;
+struct JS_PUBLIC_API JSFreeOp;
-struct jsid;
+struct JS_PUBLIC_API jsid;
namespace JS {
typedef unsigned char Latin1Char;
-class Symbol;
-class Value;
-class Realm;
-struct Runtime;
-struct Zone;
+class JS_PUBLIC_API Symbol;
+class JS_PUBLIC_API Value;
+class JS_PUBLIC_API Realm;
+struct JS_PUBLIC_API Runtime;
+struct JS_PUBLIC_API Zone;
template <typename T>
class Handle;
@@ -0,0 +1,38 @@
From 64ad80e6d95871f17be4cd01da15581f41ac0b2b Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 27 May 2019 21:10:34 -0700
Subject: [PATCH] riscv: Disable atomic operations
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
js/src/jit/AtomicOperations.h | 2 ++
1 file changed, 2 insertions(+)
--- a/js/src/jit/AtomicOperations.h
+++ b/js/src/jit/AtomicOperations.h
@@ -393,6 +393,8 @@ inline bool AtomicOperations::isLockfree
#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
--- 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.
@@ -0,0 +1,42 @@
Option '-std=gnu++14' has been supported from gcc 4.9. But on some build hosts
such as CentOS 7.6 which only has gcc 4.8.5 and fails to configure:
| checking whether the host C compiler can be used... no
| ERROR: Only GCC 4.9 or newer is supported (found version 4.8.5).
Fallback to 2011 C++ standard and lower required gcc version to 4.8.0 which is
the same as in previous version 52.9.1 of mozjs.
Upstream-Status: Inappropriate [Workaround]
Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolchain.configure
index 9c772a8..fc640c7 100755
--- a/build/moz.configure/toolchain.configure
+++ b/build/moz.configure/toolchain.configure
@@ -502,10 +502,8 @@ def check_compiler(compiler, language, target):
append_flag('-std=c++14')
# GCC 4.9 indicates that it implements draft C++14 features
# instead of the full language.
- elif info.type == 'gcc' and \
- info.language_version not in (draft_cxx14_version,
- cxx14_version):
- append_flag('-std=gnu++14')
+ elif info.type == 'gcc' and info.language_version != 201103:
+ append_flag('-std=gnu++11')
# We force clang-cl to emulate Visual C++ 2017 version 15.4
if info.type == 'clang-cl' and info.version != '19.11.25547':
@@ -903,9 +901,9 @@ def compiler(language, host_or_target, c_compiler=None, other_compiler=None,
# Check the compiler version here instead of in `compiler_version` so
# that the `checking` message doesn't pretend the compiler can be used
# to then bail out one line later.
- if info.type == 'gcc' and info.version < '4.9.0':
+ if info.type == 'gcc' and info.version < '4.8.0':
raise FatalCheckError(
- 'Only GCC 4.9 or newer is supported (found version %s).'
+ 'Only GCC 4.8 or newer is supported (found version %s).'
% info.version)
if info.type == 'gcc' and host_or_target.os == 'Android':
@@ -0,0 +1,80 @@
From f2f8be496c8e34b4d909b688a95c6f8565201081 Mon Sep 17 00:00:00 2001
From: Hongxu Jia <hongxu.jia@windriver.com>
Date: Wed, 19 Jun 2019 14:30:44 +0800
Subject: [PATCH] fix compiling failure on mips64-n32 bsp
- Tweak mips64-n32 with mips32
- The toolchain of mips64-n32 supports both of macro
`__mips64' and `__mips__', but 32bit is required here.
- N32 uses 64-bit registers but restricts addresses to 32 bits.
https://www.linux-mips.org/pub/linux/mips/doc/ABI/MIPS-N32-ABI-Handbook.pdf
Table 2-1 specifies the use of registers in n32 and native 64-bit mode.
From the table, N32 and N64 have the same registers
Upstream-Status: Inappropriate [oe specific]
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
---
build/moz.configure/init.configure | 5 ++++-
js/src/jit/mips-shared/Architecture-mips-shared.h | 4 +++-
python/mozbuild/mozbuild/configure/constants.py | 2 +-
3 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/build/moz.configure/init.configure b/build/moz.configure/init.configure
index 648ac2d..d0bcaf8 100644
--- a/build/moz.configure/init.configure
+++ b/build/moz.configure/init.configure
@@ -650,7 +650,10 @@ def split_triplet(triplet, allow_unknown=False):
canonical_cpu = 'mips32'
endianness = 'little' if 'el' in cpu else 'big'
elif cpu in ('mips64', 'mips64el'):
- canonical_cpu = 'mips64'
+ if 'n32' in triplet:
+ canonical_cpu = 'mips32'
+ else:
+ canonical_cpu = 'mips64'
endianness = 'little' if 'el' in cpu else 'big'
elif cpu.startswith('aarch64'):
canonical_cpu = 'aarch64'
diff --git a/js/src/jit/mips-shared/Architecture-mips-shared.h b/js/src/jit/mips-shared/Architecture-mips-shared.h
index e95ffd4..caf83f7 100644
--- a/js/src/jit/mips-shared/Architecture-mips-shared.h
+++ b/js/src/jit/mips-shared/Architecture-mips-shared.h
@@ -28,6 +28,8 @@
#elif (defined(_MIPS_SIM) && (_MIPS_SIM == _ABI64)) || \
defined(JS_SIMULATOR_MIPS64)
#define USES_N64_ABI
+#elif (defined(_MIPS_SIM) && (_MIPS_SIM == _ABIN32))
+#define USES_N32_ABI
#else
#error "Unsupported ABI"
#endif
@@ -94,7 +96,7 @@ class Registers {
ta1 = t5,
ta2 = t6,
ta3 = t7,
-#elif defined(USES_N64_ABI)
+#elif defined(USES_N64_ABI) || defined(USES_N32_ABI)
a4 = r8,
a5 = r9,
a6 = r10,
diff --git a/python/mozbuild/mozbuild/configure/constants.py b/python/mozbuild/mozbuild/configure/constants.py
index 1067b6a..e0f0405 100644
--- a/python/mozbuild/mozbuild/configure/constants.py
+++ b/python/mozbuild/mozbuild/configure/constants.py
@@ -90,8 +90,8 @@ CPU_preprocessor_checks = OrderedDict((
('hppa', '__hppa__'),
('sparc64', '__sparc__ && __arch64__'),
('sparc', '__sparc__'),
- ('mips64', '__mips64'),
('mips32', '__mips__'),
+ ('mips64', '__mips64'),
('sh4', '__sh__'),
))
--
2.7.4
@@ -0,0 +1,98 @@
From 04e8a611e958f0da1ccac61acae3a6f1a5168b20 Mon Sep 17 00:00:00 2001
From: Hongxu Jia <hongxu.jia@windriver.com>
Date: Fri, 13 Jul 2018 18:08:14 +0800
Subject: [PATCH] support musl
Upstream-Status: Pending
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
mozglue/misc/TimeStamp_darwin.cpp | 1 -
mozglue/misc/TimeStamp_posix.cpp | 1 -
nsprpub/pr/src/misc/prsystem.c | 1 -
python/psutil/psutil/_psutil_bsd.c | 1 -
python/psutil/psutil/_psutil_osx.c | 1 -
python/psutil/psutil/arch/bsd/process_info.c | 1 -
python/psutil/psutil/arch/osx/process_info.c | 1 -
9 files changed, 3 insertions(+), 12 deletions(-)
--- 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>
--- 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__)
--- 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)
--- 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>
--- 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>
--- 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"
--- 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
@@ -0,0 +1,31 @@
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] js: Fix build 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>
---
js/src/jsmath.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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
--
2.21.0
@@ -0,0 +1,135 @@
SUMMARY = "SpiderMonkey is Mozilla's JavaScript engine written in C/C++"
HOMEPAGE = "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey"
LICENSE = "MPL-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=dc9b6ecd19a14a54a628edaaf23733bf"
SRC_URI = " \
https://archive.mozilla.org/pub/firefox/releases/${PV}esr/source/firefox-${PV}esr.source.tar.xz \
file://0001-Port-build-to-python3.patch \
file://0002-js.pc.in-do-not-include-RequiredDefines.h-for-depend.patch \
file://0003-fix-cross-compilation-on-i586-targets.patch \
file://0004-do-not-create-python-environment.patch \
file://0005-fix-cannot-find-link.patch \
file://0006-workaround-autoconf-2.13-detection-failed.patch \
file://0007-fix-do_compile-failed-on-mips.patch \
file://0008-add-riscv-support.patch \
file://0009-mozjs-fix-coredump-caused-by-getenv.patch \
file://0010-format-overflow.patch \
file://0011-To-fix-build-error-on-arm32BE.patch \
file://0012-JS_PUBLIC_API.patch \
file://0013-riscv-Disable-atomic-operations.patch \
file://0014-fallback-to-2011-C++-standard.patch \
"
SRC_URI_append_libc-musl = " \
file://musl/0001-support-musl.patch \
file://musl/0002-js-Fix-build-with-musl.patch \
"
SRC_URI_append_mipsarchn32 = " \
file://mipsarchn32/0001-fix-compiling-failure-on-mips64-n32-bsp.patch \
"
SRC_URI[md5sum] = "69a0be9ce695e5dc4941ed0c78ef00c2"
SRC_URI[sha256sum] = "9f453c8cc5669e46e38f977764d49a36295bf0d023619d9aac782e6bb3e8c53f"
S = "${WORKDIR}/firefox-${@d.getVar("PV").replace("esr", "")}"
inherit autotools pkgconfig perlnative python3native
inherit features_check
CONFLICT_DISTRO_FEATURES_mipsarchn32 = "ld-is-gold"
DEPENDS += " \
nspr zlib autoconf-2.13-native \
python3-six-native python3-pytoml-native \
python3-jsmin-native python3-six \
"
# Disable null pointer optimization in gcc >= 6
# https://bugzilla.redhat.com/show_bug.cgi?id=1328045
CFLAGS += "-fno-tree-vrp -fno-strict-aliasing -fno-delete-null-pointer-checks"
CXXFLAGS += "-fno-tree-vrp -fno-strict-aliasing -fno-delete-null-pointer-checks"
# nspr's package-config is ignored so set libs manually
EXTRA_OECONF = " \
--target=${TARGET_SYS} \
--host=${BUILD_SYS} \
--prefix=${prefix} \
--libdir=${libdir} \
--disable-tests --disable-strip --disable-optimize \
--disable-jemalloc \
--with-nspr-cflags='-I${STAGING_INCDIR}/nspr -I${STAGING_INCDIR}/nss3' \
--with-nspr-libs='-lplds4 -lplc4 -lnspr4' \
${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', "--enable-gold", '--disable-gold', d)} \
"
# Without this, JS_Init() will fail for mips64.
EXTRA_OECONF_append_mipsarch = " --with-intl-api=build"
EXTRA_OECONF_append_powerpc = " --with-intl-api=build"
EXTRA_OECONF_append_mipsarch = " --disable-ion"
EXTRA_OECONF_append_riscv64 = " --disable-ion"
EXTRA_OECONF_append_riscv32 = " --disable-ion"
PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
PACKAGECONFIG[x11] = "--x-includes=${STAGING_INCDIR} --x-libraries=${STAGING_LIBDIR},--x-includes=no --x-libraries=no,virtual/libx11"
EXTRA_OEMAKE_task-compile += "BUILD_OPT=1 OS_LDFLAGS='-Wl,-latomic ${LDFLAGS}'"
EXTRA_OEMAKE_task-install += "STATIC_LIBRARY_NAME=js_static"
export HOST_CC = "${BUILD_CC}"
export HOST_CXX = "${BUILD_CXX}"
export HOST_CFLAGS = "${BUILD_CFLAGS}"
export HOST_CPPFLAGS = "${BUILD_CPPFLAGS}"
export HOST_CXXFLAGS = "${BUILD_CXXFLAGS}"
do_configure() {
export SHELL="/bin/sh"
cd ${S}
# Add mozjs python-modules necessary
PYTHONPATH="${S}/third_party/python/which:${S}/config:${S}/build"
for sub_dir in python testing/mozbase; do
for module_dir in `ls $sub_dir -1`;do
[ $module_dir = "virtualenv" ] && continue
if [ -d "${S}/$sub_dir/$module_dir" ];then
PYTHONPATH="$PYTHONPATH:${S}/$sub_dir/$module_dir"
fi
done
done
echo "$PYTHONPATH" > ${B}/PYTHONPATH
export PYTHONPATH=`cat ${B}/PYTHONPATH`
cd ${S}/js/src
autoconf213 --macrodir=${STAGING_DATADIR_NATIVE}/autoconf213 old-configure.in > old-configure
cd ${B}
${S}/js/src/configure ${EXTRA_OECONF}
# Make standard Makefile checks pass
touch ${S}/js/src/configure
touch ${B}/config.status
}
do_compile_prepend() {
export SHELL="/bin/sh"
export PYTHONPATH=`cat ${B}/PYTHONPATH`
}
do_install_prepend() {
export SHELL="/bin/sh"
export PYTHONPATH=`cat ${B}/PYTHONPATH`
}
PACKAGES =+ "lib${BPN}"
FILES_lib${BPN} += "${libdir}/lib*.so"
FILES_${PN}-dev += "${bindir}/js60-config"
# Fails to build with thumb-1 (qemuarm)
#| {standard input}: Assembler messages:
#| {standard input}:2172: Error: shifts in CMP/MOV instructions are only supported in unified syntax -- `mov r2,r1,LSR#20'
#| {standard input}:2173: Error: unshifted register required -- `bic r2,r2,#(1<<11)'
#| {standard input}:2174: Error: unshifted register required -- `orr r1,r1,#(1<<20)'
#| {standard input}:2176: Error: instruction not supported in Thumb16 mode -- `subs r2,r2,#0x300'
#| {standard input}:2178: Error: instruction not supported in Thumb16 mode -- `subs r5,r2,#52'
ARM_INSTRUCTION_SET_armv5 = "arm"
ARM_INSTRUCTION_SET_armv4 = "arm"
DISABLE_STATIC = ""
@@ -0,0 +1,53 @@
From 3ff78f1f00973393d1a7ee4e467a2bacf1c807f3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <git@andred.net>
Date: Wed, 5 Feb 2020 16:14:21 +0000
Subject: [PATCH] smem: fix support for --source option (python3)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Using --source doesn't work without this patch:
Traceback (most recent call last):
File "./smem", line 727, in <module>
showpids()
File "./smem", line 299, in showpids
showtable(pt.keys(), fields, columns.split(), options.sort or 'pss')
File "./smem", line 519, in showtable
mt = totalmem()
File "./smem", line 118, in totalmem
_totalmem = memory()['memtotal']
File "./smem", line 193, in memory
m = f.match(l)
TypeError: cannot use a string pattern on a bytes-like object
python3's tarfile returns bytes, whereas all of the rest of
the code assumes str.
Fix the tarfile usage to convert to str before returning the
results.
Signed-off-by: André Draszik <git@andred.net>
Upstream-Status: Inappropriate [upstream wants to support python2 & python3]
---
smem | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/smem b/smem
index 46a3189..54d40dd 100755
--- a/smem
+++ b/smem
@@ -90,9 +90,9 @@ class tardata(procdata):
d,f = ti.name.split('/')
yield d
def _read(self, f):
- return self.tar.extractfile(f).read()
+ return self.tar.extractfile(f).read().decode()
def _readlines(self, f):
- return self.tar.extractfile(f).readlines()
+ return [l.decode() for l in self.tar.extractfile(f).readlines()]
def piduser(self, p):
t = self.tar.getmember("%d" % p)
if t.uname:
--
2.23.0.rc1
@@ -0,0 +1,43 @@
SUMMARY = "Report application memory usage in a meaningful way"
DESCRIPTION = "smem is a tool that can give numerous reports on memory usage on Linux \
systems. Unlike existing tools, smem can report proportional set size (PSS), \
which is a more meaningful representation of the amount of memory used by \
libraries and applications in a virtual memory system."
HOMEPAGE = "http://www.selenic.com/smem/"
SECTION = "Applications/System"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
HG_CHANGESET = "98273ce331bb"
SRC_URI = "https://selenic.com/repo/${BPN}/archive/${HG_CHANGESET}.tar.bz2;downloadfilename=${BP}.tar.bz2 \
file://0001-smem-fix-support-for-source-option-python3.patch"
SRC_URI[md5sum] = "51c3989779360f42b42ef46b2831be3a"
SRC_URI[sha256sum] = "161131c686a6d9962a0e96912526dd46308e022d62e3f8acaed5a56fda8e08ce"
UPSTREAM_CHECK_URI = "https://selenic.com/repo/smem/tags"
UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)"
S = "${WORKDIR}/${BPN}-${HG_CHANGESET}"
do_compile() {
${CC} ${CFLAGS} ${LDFLAGS} smemcap.c -o smemcap
}
do_install() {
install -d ${D}/${bindir}/
install -d ${D}/${mandir}/man8
install -m 0755 ${S}/smem ${D}${bindir}/
sed -i -e '1s,#!.*python.*,#!${USRBINPATH}/env python3,' ${D}${bindir}/smem
install -m 0755 ${S}/smemcap ${D}${bindir}/
install -m 0644 ${S}/smem.8 ${D}/${mandir}/man8/
}
RDEPENDS_${PN} = "python3-core python3-compression"
RRECOMMENDS_${PN} = "python3-matplotlib python3-numpy"
PACKAGE_BEFORE_PN = "smemcap"
FILES_smemcap = "${bindir}/smemcap"
BBCLASSEXTEND = "native"