mirror of
https://github.com/godotengine/buildroot.git
synced 2026-01-11 14:10:13 +03:00
Compare commits
129 Commits
2020.11.1
...
windows-to
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b4f6921e4a | ||
|
|
066eed43b1 | ||
|
|
4d27f86f16 | ||
|
|
ced870b2e7 | ||
|
|
7832032e01 | ||
|
|
7d15ccb9f5 | ||
|
|
5115aa0d03 | ||
|
|
94e1db840d | ||
|
|
219b8759be | ||
|
|
571ad4e920 | ||
|
|
321417f9e4 | ||
|
|
41cbb88372 | ||
|
|
2f11b344d9 | ||
|
|
230f80d156 | ||
|
|
10ee253027 | ||
|
|
e8c386da55 | ||
|
|
551cb63007 | ||
|
|
6f48359ff8 | ||
|
|
0567775702 | ||
|
|
3bf6d795e2 | ||
|
|
d2d2ac40a4 | ||
|
|
47afc80adf | ||
|
|
6b8e73d6a1 | ||
|
|
9e2f21dff9 | ||
|
|
379112c575 | ||
|
|
9bec67f56d | ||
|
|
c2a46a5136 | ||
|
|
05983bbbe8 | ||
|
|
30c6b17b4a | ||
|
|
33562fecb6 | ||
|
|
a6dc61541a | ||
|
|
5bb1a4697b | ||
|
|
6218b0de22 | ||
|
|
389d1524b4 | ||
|
|
fae5c287ca | ||
|
|
caf4d9ffae | ||
|
|
e9dd318ac3 | ||
|
|
e96410be8d | ||
|
|
9fd1c3b480 | ||
|
|
3b72c7f8d9 | ||
|
|
a1d3dd8421 | ||
|
|
89a47457a8 | ||
|
|
bffdab0612 | ||
|
|
a5fe4ec31f | ||
|
|
761a7334c1 | ||
|
|
c0162e6c7a | ||
|
|
19aa4e9ee7 | ||
|
|
0c68c46440 | ||
|
|
8253f57ad8 | ||
|
|
a8f6453a55 | ||
|
|
831a862f64 | ||
|
|
17c1e129e6 | ||
|
|
2a7f1d2571 | ||
|
|
0b6fd85ecc | ||
|
|
f95aebff5a | ||
|
|
a2250c879d | ||
|
|
ed81ce32e3 | ||
|
|
f8360ca334 | ||
|
|
f7d4bc416c | ||
|
|
fdb7ee67d2 | ||
|
|
9d160596de | ||
|
|
ee4e2f1611 | ||
|
|
6fc8ee105f | ||
|
|
4ed3a10184 | ||
|
|
1b886e4fe6 | ||
|
|
99e4d80815 | ||
|
|
b27a7c92d8 | ||
|
|
c043b783e1 | ||
|
|
489736cd02 | ||
|
|
77ed637912 | ||
|
|
4bab3f33e0 | ||
|
|
616e3a2cb1 | ||
|
|
74ce89cc21 | ||
|
|
151f5b2cb7 | ||
|
|
478b6ae274 | ||
|
|
52bee93025 | ||
|
|
72cc541c66 | ||
|
|
de750659bc | ||
|
|
aacc6164cf | ||
|
|
4385e81332 | ||
|
|
8365bbdf3f | ||
|
|
f725ba28ee | ||
|
|
36c0a19eb5 | ||
|
|
b460962f59 | ||
|
|
5be4bc484b | ||
|
|
0681b95c5d | ||
|
|
6afeda6653 | ||
|
|
d8b37d4fec | ||
|
|
746bfe86f6 | ||
|
|
4df9eec852 | ||
|
|
318eb00aab | ||
|
|
8a04076ec0 | ||
|
|
f49dfeee33 | ||
|
|
8e2e190469 | ||
|
|
bc6b8cea8d | ||
|
|
94016794ba | ||
|
|
0edfd226bd | ||
|
|
6f55075873 | ||
|
|
a6ca14ed17 | ||
|
|
2a41fb9dd3 | ||
|
|
0cfa03c994 | ||
|
|
1bd660bbdc | ||
|
|
f0e4685c76 | ||
|
|
ad95564214 | ||
|
|
6f75c02c1f | ||
|
|
1db3ed8c4d | ||
|
|
339b146c55 | ||
|
|
796ed9536d | ||
|
|
70dd85d5f4 | ||
|
|
df0e556d0d | ||
|
|
f470f55e10 | ||
|
|
a07bf9d0f9 | ||
|
|
c52d5edae3 | ||
|
|
b76338e3bf | ||
|
|
c20877b3b4 | ||
|
|
96509aa506 | ||
|
|
8b74f9ee09 | ||
|
|
15a36ea1e3 | ||
|
|
79fad79a3d | ||
|
|
59f12f740e | ||
|
|
539a03285c | ||
|
|
21057834da | ||
|
|
7fcaac63a9 | ||
|
|
cfdc2515fb | ||
|
|
0b1ca8c56e | ||
|
|
07ced07552 | ||
|
|
7fe5f5de86 | ||
|
|
dd6d8c363f | ||
|
|
fa4b52ba29 |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,5 +1,7 @@
|
||||
/output
|
||||
/dl
|
||||
/godot-toolchains
|
||||
/windows-build
|
||||
/.auto.deps
|
||||
/.config.cmd
|
||||
/.config.old
|
||||
|
||||
37
CHANGES
37
CHANGES
@@ -1,3 +1,40 @@
|
||||
2020.11.2, released January 31st, 2021
|
||||
|
||||
Important / security related fixes.
|
||||
|
||||
Download: Ensure git submodules are correctly fetched if
|
||||
enabled for a package with <pkg>_GIT_SUBMODULES = YES and the
|
||||
host variant is downloaded first.
|
||||
|
||||
Toolchain: Mark CodeSourcery Aarch64 2014.11 toolchain as not
|
||||
having libatomic. Bootlin PowerPC-440 FP toolchain updated for
|
||||
SecurePLT fix.
|
||||
|
||||
pkg-stats: Fix python 3.8+ deprecation warning.
|
||||
|
||||
meson: Ensure ccache is not detected and used, as it may
|
||||
conflict with the ccache handling in Buildroot.
|
||||
|
||||
Updated/fixed packages: barebox, boost, brltty, dbus,
|
||||
docker-containerd, dovecot, dovecot-pigeonhole,
|
||||
environment-setup, firmware-imx, gcc, gerbera, glibc,
|
||||
gmrender-resurrect, igd2-for-linux, kodi-pvr-zattoo, libclc,
|
||||
libfuse3, libllcp, libodb-mysql, libtorrent-rasterbar,
|
||||
libupnp, lpc32xxcdl, luarocks, mpd, multipath-tools, mutt,
|
||||
nfs-utils, nodejs, openjpeg, openldap, opentracing-cpp,
|
||||
openvpn, p11-kit, paho-mqtt-c, php, poppler, postgresql,
|
||||
python3, redis, resiprocate, rpm, runc, socat, sslh, sudo,
|
||||
sunxi-mali-mainline-driver, syslog-ng, systemd, tini,
|
||||
tpm2-tss, trace-cmd, tzdata, uboot-tools, uhd, ushare,
|
||||
util-linux, vlc, wavpack, wireguard-linux-compat, wolfssl,
|
||||
xapp_xload, xorriso, zic
|
||||
|
||||
Removed packages: libupnp18
|
||||
|
||||
Issues resolved (http://bugs.uclibc.org):
|
||||
|
||||
#13471: package/mpd/mpd.conf make use of path not created
|
||||
|
||||
2020.11.1, released December 27th, 2020
|
||||
|
||||
Important / security related fixes.
|
||||
|
||||
@@ -146,6 +146,16 @@ endif
|
||||
|
||||
comment "Legacy options removed in 2020.11"
|
||||
|
||||
config BR2_PACKAGE_LIBUPNP18
|
||||
bool "libupnp18 package removed"
|
||||
select BR2_LEGACY
|
||||
select BR2_PACKAGE_LIBUPNP
|
||||
help
|
||||
Version 1.8.x of libupnp (i.e. libupnp18) has been removed
|
||||
because it will never be fixed against CallStranger a.k.a.
|
||||
CVE-2020-12695. The libupnp package (which has been updated to
|
||||
version 1.14.x) has been selected instead.
|
||||
|
||||
config BR2_PACKAGE_OPENCV
|
||||
bool "opencv package was removed"
|
||||
select BR2_LEGACY
|
||||
|
||||
@@ -405,6 +405,7 @@ F: package/perl-netaddr-ip/
|
||||
F: package/perl-timedate/
|
||||
F: package/perl-uri/
|
||||
F: package/perl-www-robotrules/
|
||||
F: package/php/
|
||||
F: package/pixman/
|
||||
F: package/pngquant/
|
||||
F: package/pound/
|
||||
@@ -851,7 +852,6 @@ F: package/librsync/
|
||||
F: package/libsoup/
|
||||
F: package/libsoxr/
|
||||
F: package/libupnp/
|
||||
F: package/libupnp18/
|
||||
F: package/libv4l/
|
||||
F: package/libxslt/
|
||||
F: package/mbedtls/
|
||||
@@ -2254,6 +2254,7 @@ F: package/ogre/
|
||||
F: package/openpowerlink/
|
||||
F: package/physfs/
|
||||
F: package/piglit/
|
||||
F: package/qemu/
|
||||
F: package/solarus/
|
||||
F: package/stress-ng/
|
||||
F: package/supertux/
|
||||
@@ -2591,7 +2592,7 @@ F: toolchain/
|
||||
N: Timo Ketola <timo.ketola@exertus.fi>
|
||||
F: package/fbgrab/
|
||||
|
||||
N: Titouan Christophe <titouan.christophe@railnova.eu>
|
||||
N: Titouan Christophe <titouanchristophe@gmail.com>
|
||||
F: package/avro-c/
|
||||
F: package/mosquitto/
|
||||
F: package/python-avro/
|
||||
|
||||
7
Dockerfile.linux-builder
Normal file
7
Dockerfile.linux-builder
Normal file
@@ -0,0 +1,7 @@
|
||||
FROM centos:7
|
||||
|
||||
RUN yum -y install yum install centos-release-scl && \
|
||||
yum -y install devtoolset-9 && \
|
||||
yum -y install make ncurses-devel which unzip perl cpio rsync fileutils bc bzip2 gzip sed git python file patch wget perl-Thread-Queue perl-Data-Dumper perl-ExtUtils-MakeMaker && \
|
||||
yum clean all
|
||||
|
||||
6
Dockerfile.windows-builder
Normal file
6
Dockerfile.windows-builder
Normal file
@@ -0,0 +1,6 @@
|
||||
FROM fedora:33
|
||||
|
||||
RUN dnf -y install mingw32-nsis xz bzip2 zip diffutils texinfo gcc gcc-c++ make mingw64-winpthreads mingw64-winpthreads-static mingw64-gcc mingw64-gcc-c++ curl && \
|
||||
dnf clean all
|
||||
|
||||
COPY build-windows.sh /usr/local/bin
|
||||
4
Makefile
4
Makefile
@@ -92,9 +92,9 @@ all:
|
||||
.PHONY: all
|
||||
|
||||
# Set and export the version string
|
||||
export BR2_VERSION := 2020.11.1
|
||||
export BR2_VERSION := 2020.11.2
|
||||
# Actual time the release is cut (for reproducible builds)
|
||||
BR2_VERSION_EPOCH = 1609079000
|
||||
BR2_VERSION_EPOCH = 1612125000
|
||||
|
||||
# Save running make version since it's clobbered by the make package
|
||||
RUNNING_MAKE_VERSION := $(MAKE_VERSION)
|
||||
|
||||
85
README.md
Normal file
85
README.md
Normal file
@@ -0,0 +1,85 @@
|
||||
# Godot buildroot
|
||||
|
||||
This repository contains the Godot buildroot to generate toolchains for building the Godot engine in a portable way for Linux. Using these toolchains is the best way to distribute Linux builds of your custom-compiled Godot game.
|
||||
|
||||
*You will only need this if you built the engine manually. If you use official templates you will not need this*
|
||||
|
||||
The toolchain current contains the following:
|
||||
* gcc-10.2.0
|
||||
* glibc-2.19
|
||||
* pulseaudio
|
||||
* alsa
|
||||
* X client libraries
|
||||
* udev
|
||||
* libGL
|
||||
|
||||
# Using the SDKs
|
||||
|
||||
This section is first because there's a lot of stuff below and this is likely what you came here for. Don't forget to check out the `Obtaining an SDK` section below!
|
||||
|
||||
The first part of an SDK filename referes to the architecture that this SDK will generate binaries *for*. If you want to ship your game to both 32bit and 64bit Intel/AMD users you will need both `x86_64-godot-linux-gnu_sdk-buildroot.tar.gz` and `i686-godot-linux-gnu_sdk-buildroot.tar.gz`.
|
||||
|
||||
Unpack the toolchain anywhere you like and run the `relocate-sdk.sh` script within. This needs to happen every time you move the toolchain to a different directory, but only needs to happen once after installation.
|
||||
|
||||
After this you can build the engine more-or-less like normal. For instance for `x86_64`:
|
||||
|
||||
`PATH=/home/hp/tmp/x86_64-godot-linux-gnu_sdk-buildroot/usr/bin:$PATH scons p=x11 target=release_debug CC=x86_64-godot-linux-gnu-gcc CXX=x86_64-godot-linux-gnu-g++ -j64`
|
||||
|
||||
For 32-bit Intel:
|
||||
|
||||
`PATH=/home/hp/tmp/i686-godot-linux-gnu_sdk-buildroot/usr/bin/:$PATH scons p=x11 target=release_debug CC=i686-godot-linux-gnu-gcc CXX=i686-godot-linux-gnu-g++ -j64 use_static_cpp=yes bits=32`
|
||||
*Note the `bits=32` at the end!*
|
||||
|
||||
And for 32bit ARM:
|
||||
|
||||
`PATH=/home/hp/tmp/arm-godot-linux-gnueabihf_sdk-buildroot/usr/bin/:$PATH scons p=x11 target=release_debug CC=arm-linux-gcc CXX=arm-linux-g++ -j64 use_static_cpp=yes CCFLAGS="-mtune=cortex-a72 -mcpu=cortex-a72 -mfloat-abi=hard -mlittle-endian -munaligned-access -mfpu=neon-fp-armv8" module_denoise_enabled=no module_raycast_enabled=no module_webm_enabled=no`
|
||||
|
||||
For other build-time options please see https://docs.godotengine.org/en/stable/development/compiling/compiling_for_x11.html
|
||||
|
||||
# Obtaining an SDK
|
||||
|
||||
## Downloading a pre-built SDK
|
||||
|
||||
Pre-built toolchains are available on https://download.tuxfamily.org/godotengine/toolchains/linux.
|
||||
|
||||
## Using buildroot to generate SDKs
|
||||
|
||||
### Building a toolchain for local use
|
||||
|
||||
*Using this method will create a toolchain you yourself can use to create Godot releases that will work on any Linux system currently in use. However the toolchain you generate will not be portable to older Linuxes. If you plan to distribute the toolchain itself use the podman method below*
|
||||
|
||||
The basic steps for building a toolchain are:
|
||||
|
||||
* copy `config-godot-<arch>` to `.config`
|
||||
* run `make olddefconfig`
|
||||
* run `make clean sdk`
|
||||
|
||||
Afterwards the SDK will be in `output/images/<arch>-godot-linux-gnu_sdk-buildroot.tar.gz`.
|
||||
|
||||
**NOTE: that `make clean sdk` will delete old builds. Move them out of the way first!**
|
||||
|
||||
### Building a toolchain for distribution
|
||||
|
||||
This method uses a CentOS7 container to make the buildroot *itself* portable so it can be distributed to other users. This is also the way the downloads above are generated.
|
||||
|
||||
* run `./build-sdk.sh <arch>` for instance `x86_64`
|
||||
|
||||
The toolchain will appear in the `godot-toolchains` directory
|
||||
|
||||
## Modifying the toolchain
|
||||
|
||||
For detailed information please see https://buildroot.org however a short version is here:
|
||||
|
||||
**NOTE: re-running the build-sdk.sh script will overwrite your changes by default. Take care**
|
||||
|
||||
* Copy the architecture you would like to change to `.config` for instance `cp config-godot-x86_64 .config`
|
||||
* Run `make menuconfig`
|
||||
* Make your changes
|
||||
|
||||
At this point your changes exist in .config. **Make a backup**. If you're building for local use just run `make clean sdk`, if you're using the container approach copy your `.config` file to the arch config like `config-godot-x64_64`
|
||||
|
||||
## Making Pull Requests for this repository
|
||||
|
||||
First of all: Thanks for wanting to help! Second of all: Since we support multiple architectures make sure that you make *the same* changes to all architectures and PR them together. If you *specifically* want to make a change to one architecture please note that clearly in the PR message.
|
||||
|
||||
Thanks!
|
||||
@@ -138,6 +138,11 @@ define $(1)_INSTALL_IMAGES_CMDS
|
||||
$$($(1)_INSTALL_CUSTOM_ENV)
|
||||
endef
|
||||
|
||||
# Starting with barebox v2020.09.0, the kconfig used calls the
|
||||
# cross-compiler to check its capabilities. So we need the
|
||||
# toolchain before we can call the configurators.
|
||||
$(1)_KCONFIG_DEPENDENCIES += toolchain
|
||||
|
||||
ifeq ($$(BR2_TARGET_$(1)_BAREBOXENV),y)
|
||||
define $(1)_INSTALL_TARGET_CMDS
|
||||
cp $$(@D)/scripts/bareboxenv-target $$(TARGET_DIR)/usr/bin/bareboxenv
|
||||
|
||||
2
boot/lpc32xxcdl/lpc32xxcdl.hash
Normal file
2
boot/lpc32xxcdl/lpc32xxcdl.hash
Normal file
@@ -0,0 +1,2 @@
|
||||
# Locally computed
|
||||
sha256 ded3fa936a96d3fb8188ca6214f57b5208bd49e5416bd69f38bfc810b34197bc lpc32xx_cdl-v2.11.zip
|
||||
@@ -4,9 +4,9 @@
|
||||
#
|
||||
################################################################################
|
||||
|
||||
LPC32XXCDL_VERSION = lpc32xx_cdl_v2.11
|
||||
LPC32XXCDL_SITE = http://git.lpcware.com/lpc3xxx_cdl.git
|
||||
LPC32XXCDL_SITE_METHOD = git
|
||||
LPC32XXCDL_VERSION = 2.11
|
||||
LPC32XXCDL_SOURCE = lpc32xx_cdl-v$(LPC32XXCDL_VERSION).zip
|
||||
LPC32XXCDL_SITE = https://community.nxp.com/pwmxy87654/attachments/pwmxy87654/lpcware-archive/61/2
|
||||
|
||||
LPC32XXCDL_INSTALL_TARGET = NO
|
||||
LPC32XXCDL_INSTALL_IMAGES = YES
|
||||
@@ -45,13 +45,14 @@ LPC32XXCDL_BOARD_STARTUP_DIR = \
|
||||
# Source files are with dos newlines, which our patch infrastructure doesn't
|
||||
# handle. Work around it by converting the affected files to unix newlines
|
||||
# before patching
|
||||
define LPC32XXCDL_DOS2UNIX_FOR_PATCH
|
||||
define LPC32XXCDL_EXTRACT_CMDS
|
||||
unzip $(LPC32XXCDL_DL_DIR)/$(LPC32XXCDL_SOURCE) -d $(@D)
|
||||
mv $(@D)/lpc3xxx_cdl/* $(@D)
|
||||
rmdir $(@D)/lpc3xxx_cdl/
|
||||
sed -n 's|^[+-]\{3\} [^/]\+\([^ \t]*\)\(.*\)|$(@D)\1|p' \
|
||||
boot/lpc32xxcdl/*.patch| sort -u | xargs $(SED) 's/\x0D$$//'
|
||||
endef
|
||||
|
||||
LPC32XXCDL_POST_EXTRACT_HOOKS += LPC32XXCDL_DOS2UNIX_FOR_PATCH
|
||||
|
||||
define LPC32XXCDL_BUILD_CMDS
|
||||
$(MAKE1) $(LPC32XXCDL_BUILD_FLAGS) -C $(@D)
|
||||
$(MAKE1) $(LPC32XXCDL_BUILD_FLAGS) -C $(@D)/$(LPC32XXCDL_BOARD_STARTUP_DIR)/Burners/$(LPC32XXCDL_KICKSTART_BURNER)
|
||||
|
||||
97
build-sdk.sh
Executable file
97
build-sdk.sh
Executable file
@@ -0,0 +1,97 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
function usage() {
|
||||
echo "usage: $0 host target"
|
||||
echo " where host is one of linux-x86_64, windows-x86_64"
|
||||
echo " where target is one of i686, x86_64, armv7"
|
||||
exit 1
|
||||
}
|
||||
|
||||
if [ -z $1 ] || [ -z $1 ]; then
|
||||
usage
|
||||
fi
|
||||
|
||||
case $1 in
|
||||
linux-x86_64)
|
||||
host=$1
|
||||
;;
|
||||
windows-x86_64)
|
||||
host=$1
|
||||
;;
|
||||
*)
|
||||
echo "unknown SDK host \"$1\""
|
||||
usage
|
||||
esac
|
||||
|
||||
case $2 in
|
||||
i686)
|
||||
cp config-godot-i686 .config
|
||||
toolchain_prefix=i686-godot-linux-gnu
|
||||
bits=32
|
||||
;;
|
||||
x86_64)
|
||||
cp config-godot-x86_64 .config
|
||||
toolchain_prefix=x86_64-godot-linux-gnu
|
||||
bits=64
|
||||
;;
|
||||
armv7)
|
||||
cp config-godot-armv7 .config
|
||||
toolchain_prefix=arm-godot-linux-gnueabihf
|
||||
bits=32
|
||||
;;
|
||||
*)
|
||||
echo "unknown SDK target \"$2\""
|
||||
usage
|
||||
;;
|
||||
esac
|
||||
|
||||
if which podman &> /dev/null; then
|
||||
container=podman
|
||||
elif which docker &> /dev/null; then
|
||||
container=docker
|
||||
else
|
||||
echo "Podman or docker have to be in \$PATH"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
function build_linux_sdk() {
|
||||
${container} build -f Dockerfile.linux-builder -t godot-buildroot-builder-linux
|
||||
${container} run -it --rm -v $(pwd):/tmp/buildroot -w /tmp/buildroot -e FORCE_UNSAFE_CONFIGURE=1 --userns=keep-id godot-buildroot-builder scl enable devtoolset-9 "bash -c make syncconfig; make clean sdk"
|
||||
|
||||
mkdir -p godot-toolchains
|
||||
|
||||
rm -fr godot-toolchains/${toolchain_prefix}_sdk-buildroot
|
||||
tar xf output/images/${toolchain_prefix}_sdk-buildroot.tar.gz -C godot-toolchains
|
||||
|
||||
pushd godot-toolchains/${toolchain_prefix}_sdk-buildroot
|
||||
../../clean-linux-toolchain.sh ${toolchain_prefix} ${bits}
|
||||
popd
|
||||
|
||||
pushd godot-toolchains
|
||||
tar -cjf ${toolchain_prefix}_sdk-buildroot.tar.bz2 ${toolchain_prefix}_sdk-buildroot
|
||||
rm -rf ${toolchain_prefix}_sdk-buildroot
|
||||
popd
|
||||
}
|
||||
|
||||
function build_windows_sdk() {
|
||||
${container} build -f Dockerfile.windows-builder -t godot-buildroot-builder-windows
|
||||
|
||||
if [ ! -e godot-toolchains/${toolchain_prefix}_sdk-buildroot.tar.bz2 ]; then
|
||||
build_linux_sdk
|
||||
fi
|
||||
|
||||
${container} run -it --rm -v $(pwd):/tmp/buildroot -w /tmp/buildroot --userns=keep-id godot-buildroot-builder-windows bash -x /usr/local/bin/build-windows.sh ${toolchain_prefix}
|
||||
}
|
||||
|
||||
if [ "${host}" == "linux-x86_64" ]; then
|
||||
build_linux_sdk
|
||||
fi
|
||||
|
||||
if [ "${host}" == "windows-x86_64" ]; then
|
||||
build_windows_sdk
|
||||
fi
|
||||
|
||||
echo
|
||||
echo "***************************************"
|
||||
echo "Build succesful your toolchain is in the godot-toolchains directory"
|
||||
216
build-windows.sh
Executable file
216
build-windows.sh
Executable file
@@ -0,0 +1,216 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
binutils_ver=2.35.1
|
||||
gcc_ver=10.2.0
|
||||
mpc_ver=1.2.1
|
||||
mpfr_ver=4.1.0
|
||||
gmp_ver=6.2.1
|
||||
isl_ver=0.18
|
||||
scons_local_ver=4.1.0
|
||||
sevenz_ver=1900
|
||||
# GNU Make 4.3 cannot be cross compiled
|
||||
make_ver=4.2.1
|
||||
|
||||
binutils_file=binutils-${binutils_ver}.tar.xz
|
||||
binutils_url=https://ftp.gnu.org/gnu/binutils/${binutils_file}
|
||||
|
||||
gcc_file=gcc-${gcc_ver}.tar.xz
|
||||
gcc_url=https://ftp.gnu.org/gnu/gcc/gcc-${gcc_ver}/${gcc_file}
|
||||
|
||||
mpc_file=mpc-${mpc_ver}.tar.gz
|
||||
mpc_url=https://ftp.gnu.org/gnu/mpc/${mpc_file}
|
||||
|
||||
mpfr_file=mpfr-${mpfr_ver}.tar.xz
|
||||
mpfr_url=https://ftp.gnu.org/gnu/mpfr/${mpfr_file}
|
||||
|
||||
gmp_file=gmp-${gmp_ver}.tar.xz
|
||||
gmp_url=https://ftp.gnu.org/gnu/gmp/${gmp_file}
|
||||
|
||||
isl_file=isl-${isl_ver}.tar.bz2
|
||||
isl_url=https://gcc.gnu.org/pub/gcc/infrastructure/${isl_file}
|
||||
|
||||
scons_local_file=scons-local-${scons_local_ver}.zip
|
||||
scons_local_url=https://sourceforge.net/projects/scons/files/${scons_local_file}
|
||||
|
||||
make_file=make-${make_ver}.tar.gz
|
||||
make_url=http://ftp.gnu.org/gnu/make/${make_file}
|
||||
|
||||
case $1 in
|
||||
arm-godot-linux-gnueabihf)
|
||||
;;
|
||||
i686-godot-linux-gnu)
|
||||
;;
|
||||
x86_64-godot-linux-gnu)
|
||||
;;
|
||||
*)
|
||||
echo "usage: $0 <tuple>"
|
||||
echo "tuple can be one of : arm-godot-linux-gnueabihf, i686-godot-linux-gnu, x86_64-godot-linux-gnu"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
target_arch=$1
|
||||
godot_toolchain_dir="$(pwd)/godot-toolchains"
|
||||
base_dir="$(pwd)/windows-build"
|
||||
target_dir="${base_dir}/${target_arch}_sdk-buildroot"
|
||||
|
||||
function unpack_linux_sdk() {
|
||||
mkdir -p "${base_dir}"
|
||||
tar xf "${godot_toolchain_dir}/${target_arch}_sdk-buildroot.tar.bz2" -C "${base_dir}"
|
||||
}
|
||||
|
||||
function pack_windows_sdk() {
|
||||
pushd "${target_dir}/bin"
|
||||
cp ${base_dir}/../pkg-config.bat .
|
||||
unzip "${base_dir}/download/${scons_local_file}"
|
||||
popd
|
||||
|
||||
pushd "${target_dir}"
|
||||
for link in $(find -type l); do
|
||||
echo "mklink \"${link}\" \"$(readlink ${link})\"" >> fix-sdk.bat
|
||||
rm "${link}"
|
||||
done
|
||||
|
||||
echo "mklink \"bin/gcc.exe\" \"${target_arch}-gcc.exe\"" >> fix-sdk.bat
|
||||
echo "mklink \"bin/g++.exe\" \"${target_arch}-g++.exe\"" >> fix-sdk.bat
|
||||
echo "mklink \"bin/ar.exe\" \"${target_arch}-ar.exe\"" >> fix-sdk.bat
|
||||
echo "mklink \"bin/ranlib.exe\" \"${target_arch}-ranlib.exe\"" >> fix-sdk.bat
|
||||
echo "mklink \"bin/gcc-ar.exe\" \"${target_arch}-gcc-ar.exe\"" >> fix-sdk.bat
|
||||
echo "mklink \"bin/gcc-ranlib.exe\" \"${target_arch}-gcc-ranlib.exe\"" >> fix-sdk.bat
|
||||
echo "mklink \"bin/lto-wrapper.exe\" \"../libexec/gcc/${target_arch}/${gcc_ver}/lto-wrapper.exe\"" >> fix-sdk.bat
|
||||
popd
|
||||
|
||||
pushd ${base_dir}
|
||||
cat ../installer.nsis | sed -e "s/TARGET_ARCH/${target_arch}/g" > installer.nsis
|
||||
makensis installer.nsis
|
||||
mv "Godot-SDK-${target_arch}.exe" ../godot-toolchains
|
||||
popd
|
||||
}
|
||||
|
||||
function download() {
|
||||
mkdir -p "${base_dir}/download"
|
||||
|
||||
for component in make scons_local binutils gcc mpc mpfr gmp isl; do
|
||||
component_file=${component}_file
|
||||
component_url=${component}_url
|
||||
if [ ! -e "${base_dir}/download/${!component_file}" ]; then
|
||||
curl -L ${!component_url} --output "${base_dir}/download/${!component_file}"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
function unpack() {
|
||||
mkdir -p "${base_dir}/src"
|
||||
|
||||
if [ ! -e "${base_dir}/src/gcc" ]; then
|
||||
mkdir -p "${base_dir}/src/gcc"
|
||||
pushd "${base_dir}/src/gcc"
|
||||
tar --strip-components=1 -xf "${base_dir}/download/${gcc_file}"
|
||||
for component in mpc mpfr gmp isl; do
|
||||
component_file=${component}_file
|
||||
mkdir ${component}
|
||||
pushd $component
|
||||
tar --strip-components=1 -xf "${base_dir}/download/${!component_file}"
|
||||
popd
|
||||
done
|
||||
popd
|
||||
fi
|
||||
|
||||
if [ ! -e "${base_dir}/src/binutils" ]; then
|
||||
mkdir -p "${base_dir}/src/binutils"
|
||||
pushd "${base_dir}/src/binutils"
|
||||
tar --strip-components=1 -xf "${base_dir}/download/${binutils_file}"
|
||||
popd
|
||||
fi
|
||||
|
||||
if [ ! -e "${base_dir}/src/make" ]; then
|
||||
mkdir -p "${base_dir}/src/make"
|
||||
pushd "${base_dir}/src/make"
|
||||
tar --strip-components=1 -xf "${base_dir}/download/${make_file}"
|
||||
popd
|
||||
fi
|
||||
}
|
||||
|
||||
function build_gcc() {
|
||||
|
||||
mkdir -p "${base_dir}/build"
|
||||
rm -rf "${base_dir}/build/gcc"
|
||||
mkdir -p "${base_dir}/build/gcc"
|
||||
pushd "${base_dir}/build/gcc"
|
||||
|
||||
"${base_dir}/src/gcc/configure" --prefix=${target_dir} --sysconfdir=${target_dir}/etc --enable-static --host=x86_64-w64-mingw32 --build=x86_64-linux-gnu --target=${target_arch} --with-sysroot=${target_dir}/${target_arch}/sysroot --enable-__cxa_atexit --with-gnu-ld --disable-libssp --disable-multilib --disable-decimal-float --without-zstd --enable-libquadmath --enable-tls --enable-threads --with-arch=nocona --enable-languages=c,c++ --enable-shared --disable-libgomp --disable-libstdcxx --with-static-standard-libraries LDFLAGS="-lssp"
|
||||
make -j
|
||||
make install-strip
|
||||
popd
|
||||
}
|
||||
|
||||
function build_binutils() {
|
||||
|
||||
mkdir -p "${base_dir}/build"
|
||||
rm -rf "${base_dir}/build/binutils"
|
||||
mkdir -p "${base_dir}/build/binutils"
|
||||
pushd "${base_dir}/build/binutils"
|
||||
|
||||
"${base_dir}/src/binutils/configure" --with-static-standard-libraries --prefix=${target_dir} --with-sysroot=${target_dir}/${target_arch}/sysroot --enable-lto --host=x86_64-w64-mingw32 --build=x86_64-linux-gnu --target=${target_arch} LDFLAGS="-lssp"
|
||||
make -j
|
||||
make install-strip
|
||||
popd
|
||||
}
|
||||
|
||||
function build_make() {
|
||||
|
||||
mkdir -p "${base_dir}/build"
|
||||
rm -rf "${base_dir}/build/make"
|
||||
mkdir -p "${base_dir}/build/make"
|
||||
pushd "${base_dir}/build/make"
|
||||
|
||||
"${base_dir}/src/make/configure" --prefix=${target_dir} --host=x86_64-w64-mingw32 --build=x86_64-linux-gnu LDFLAGS="-lssp"
|
||||
make -j
|
||||
make install-strip
|
||||
popd
|
||||
}
|
||||
|
||||
function cleanup_sdk() {
|
||||
rm -f "${target_dir}/relocate-sdk.sh"
|
||||
|
||||
for directory in $(find ${target_dir} -name *.exe -printf %h\\n | sort -u); do
|
||||
cp /usr/x86_64-w64-mingw32/sys-root/mingw/bin/libssp-0.dll ${directory}
|
||||
cp /usr/x86_64-w64-mingw32/sys-root/mingw/bin/libwinpthread-1.dll ${directory}
|
||||
done
|
||||
|
||||
while read -r file; do
|
||||
rm -f $(echo $file | sed -e 's/\.exe$//')
|
||||
done < <(find ${target_dir} -name *.exe)
|
||||
|
||||
while read -r file; do
|
||||
rm -f $(echo $file | sed -e 's/\.dll$/.so/')
|
||||
done < <(find ${target_dir} -name *.dll)
|
||||
|
||||
find ${target_dir}/bin -type l -delete
|
||||
find ${target_dir}/bin -name 'python*' -delete
|
||||
|
||||
# Filename case issues, kind of breaks the SDK for some uses but probably OK
|
||||
rm -rf "${target_dir}/${target_arch}/sysroot/usr/include/linux/netfilter"
|
||||
rm -rf "${target_dir}/${target_arch}/sysroot/usr/include/linux/netfilter_ipv4"
|
||||
rm -rf "${target_dir}/${target_arch}/sysroot/usr/include/linux/netfilter_ipv6"
|
||||
|
||||
rm -rf ${target_dir}/lib/python*
|
||||
}
|
||||
|
||||
export PATH=${target_dir}/bin:${PATH}
|
||||
export HOSTCC=${target_arch}-gcc
|
||||
export HOSTCXX=${target_arch}-g++
|
||||
|
||||
rm -rf "${target_dir}"
|
||||
|
||||
download
|
||||
unpack
|
||||
unpack_linux_sdk
|
||||
build_make
|
||||
build_binutils
|
||||
build_gcc
|
||||
|
||||
cleanup_sdk
|
||||
pack_windows_sdk
|
||||
99
clean-linux-toolchain.sh
Executable file
99
clean-linux-toolchain.sh
Executable file
@@ -0,0 +1,99 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
if [ -z $1 ] || [ -z $2 ]; then
|
||||
echo "usage: $0 arch bits"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
arch=$1
|
||||
bits=$2
|
||||
|
||||
bin_to_keep="aclocal autoconf autoheader automake autoreconf cmake gawk libtool m4 meson ninja pkgconf pkg-config python3 scons tar toolchain-wrapper"
|
||||
lib_to_keep="cmake gcc libpkgconf libpython3.9 libz libisl libmpc libmpfr libgmp libffi python3.9 pkgconfig"
|
||||
share_to_keep="aclocal autoconf buildroot cmake gcc libtool pkgconfig"
|
||||
sysroot_share_to_keep="aclocal pkgconfig"
|
||||
|
||||
function clean_directory() {
|
||||
pushd $1
|
||||
files_to_keep="${@:2}"
|
||||
|
||||
for file in $(ls -1); do
|
||||
keep_file=0
|
||||
|
||||
if echo ${file} | grep -qe "^${arch}"; then
|
||||
keep_file=1
|
||||
fi
|
||||
|
||||
for keep in ${files_to_keep}; do
|
||||
if echo ${file} | grep -qe "^${keep}"; then
|
||||
keep_file=1
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if [ ${keep_file} -eq 0 ]; then
|
||||
rm -rf ${file}
|
||||
fi
|
||||
done
|
||||
|
||||
popd
|
||||
}
|
||||
|
||||
rm -f $(find -name *.a | grep -vE '(nonshared|gcc|libstdc++)')
|
||||
find -regex '.*\.so\(\..*\)?' -exec bin/${arch}-strip {} \; 2> /dev/null
|
||||
find bin -exec bin/${arch}-strip {} \; 2> /dev/null
|
||||
find ${arch}/bin -exec bin/${arch}-strip {} \; 2> /dev/null
|
||||
find libexec/gcc -type f -exec bin/${arch}-strip {} \; 2> /dev/null
|
||||
|
||||
clean_directory bin ${bin_to_keep}
|
||||
clean_directory lib ${lib_to_keep}
|
||||
clean_directory share ${share_to_keep}
|
||||
clean_directory ${arch}/sysroot/usr/share ${sysroot_share_to_keep}
|
||||
|
||||
find -name *.pyc -delete
|
||||
|
||||
rm -f usr lib64
|
||||
rm -rf sbin var
|
||||
|
||||
for s in bin lib lib64 sbin; do
|
||||
if [ -L ${arch}/sysroot/${s} ]; then
|
||||
rm -f ${arch}/sysroot/${s}
|
||||
fi
|
||||
done
|
||||
|
||||
if [ ${bits} == 64 ]; then
|
||||
libdir_to_remove=lib
|
||||
libdir_to_keep=lib64
|
||||
else
|
||||
libdir_to_remove=lib64
|
||||
libdir_to_keep=lib
|
||||
fi
|
||||
|
||||
rm -rf ${arch}/sysroot/usr/{bin,sbin}
|
||||
|
||||
mkdir -p ${arch}/sysroot/${libdir_to_keep}
|
||||
cp ${arch}/sysroot/usr/${libdir_to_keep}/libpthread*so* ${arch}/sysroot/${libdir_to_keep}
|
||||
cp ${arch}/sysroot/usr/${libdir_to_keep}/ld-linux*so* ${arch}/sysroot/${libdir_to_keep}
|
||||
cp ${arch}/sysroot/usr/${libdir_to_keep}/libc*so* ${arch}/sysroot/${libdir_to_keep}
|
||||
|
||||
if [ -L ${arch}/sysroot/usr/${libdir_to_keep} ]; then
|
||||
rm ${arch}/sysroot/usr/${libdir_to_keep}
|
||||
mv ${arch}/sysroot/usr/${libdir_to_remove} ${arch}/sysroot/usr/${libdir_to_keep}
|
||||
mkdir ${arch}/sysroot/usr/${libdir_to_remove}
|
||||
mv ${arch}/sysroot/usr/${libdir_to_keep}/crt*.o ${arch}/sysroot/usr/${libdir_to_remove}
|
||||
mv ${arch}/sysroot/usr/${libdir_to_keep}/pkgconfig ${arch}/sysroot/usr/${libdir_to_remove}
|
||||
# But why tho
|
||||
mv ${arch}/sysroot/usr/${libdir_to_keep}/pulseaudio ${arch}/sysroot/usr/${libdir_to_remove}
|
||||
fi
|
||||
|
||||
find -name *python2* -exec rm -rf {} \; || true
|
||||
|
||||
ln -s bin/gcc ${arch}-gcc
|
||||
ln -s bin/g++ ${arch}-g++
|
||||
ln -s bin/ar ${arch}-ar
|
||||
ln -s bin/ranlib ${arch}-ranlib
|
||||
ln -s bin/gcc-ar ${arch}-gcc-ar
|
||||
ln -s bin/gcc-ranlib ${arch}-gcc-ranlib
|
||||
|
||||
3562
config-godot-armv7
Normal file
3562
config-godot-armv7
Normal file
File diff suppressed because it is too large
Load Diff
3491
config-godot-i686
Normal file
3491
config-godot-i686
Normal file
File diff suppressed because it is too large
Load Diff
3480
config-godot-x86_64
Normal file
3480
config-godot-x86_64
Normal file
File diff suppressed because it is too large
Load Diff
@@ -126,14 +126,19 @@ typical packages will therefore only use a few of them.
|
||||
in the build step. These are passed after the +make+ command. By
|
||||
default, empty.
|
||||
|
||||
* +LIBFOO_INSTALL_OPTS+ contains the make options used to
|
||||
install the package to the host directory. By default, the value
|
||||
is +install+, which is correct for most CMake packages. It is still
|
||||
possible to override it.
|
||||
|
||||
* +LIBFOO_INSTALL_STAGING_OPTS+ contains the make options used to
|
||||
install the package to the staging directory. By default, the value
|
||||
is +DESTDIR=$(STAGING_DIR) install+, which is correct for most
|
||||
is +DESTDIR=$(STAGING_DIR) install/fast+, which is correct for most
|
||||
CMake packages. It is still possible to override it.
|
||||
|
||||
* +LIBFOO_INSTALL_TARGET_OPTS+ contains the make options used to
|
||||
install the package to the target directory. By default, the value
|
||||
is +DESTDIR=$(TARGET_DIR) install+. The default value is correct
|
||||
is +DESTDIR=$(TARGET_DIR) install/fast+. The default value is correct
|
||||
for most CMake packages, but it is still possible to override it if
|
||||
needed.
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ generating a tarball.
|
||||
|
||||
For your convenience, by selecting the option
|
||||
+BR2_PACKAGE_HOST_ENVIRONMENT_SETUP+, you can get a
|
||||
+setup-environment+ script installed in +output/host/+ and therefore
|
||||
+environment-setup+ script installed in +output/host/+ and therefore
|
||||
in your SDK. This script can be sourced with
|
||||
+. your/sdk/path/environment-setup+ to export a number of environment
|
||||
variables that will help cross-compile your projects using the
|
||||
|
||||
26
installer.nsis
Normal file
26
installer.nsis
Normal file
@@ -0,0 +1,26 @@
|
||||
Name "Godot SDK for TARGET_ARCH"
|
||||
OutFile "Godot-SDK-TARGET_ARCH.exe"
|
||||
InstallDir "$ProgramFiles\Godot SDKs\TARGET_ARCH"
|
||||
InstallDirRegKey HKLM SOFTWARE\ "Install_Dir"
|
||||
|
||||
ShowInstDetails hide
|
||||
ShowUninstDetails hide
|
||||
|
||||
XPStyle on
|
||||
|
||||
Page directory
|
||||
Page instfiles
|
||||
|
||||
DirText "Please select the installation folder."
|
||||
|
||||
Section ""
|
||||
SectionIn RO
|
||||
|
||||
SetOutPath "$INSTDIR"
|
||||
File /r "TARGET_ARCH_sdk-buildroot/*.*"
|
||||
SectionEnd
|
||||
|
||||
Section -post
|
||||
ExecShell "" "$INSTDIR\fix-sdk.bat"
|
||||
SectionEnd
|
||||
|
||||
@@ -125,7 +125,7 @@ endif
|
||||
|
||||
config BR2_LINUX_KERNEL_VERSION
|
||||
string
|
||||
default "5.9.14" if BR2_LINUX_KERNEL_LATEST_VERSION
|
||||
default "5.9.16" if BR2_LINUX_KERNEL_LATEST_VERSION
|
||||
default "4.19.152-cip37" if BR2_LINUX_KERNEL_LATEST_CIP_VERSION
|
||||
default "4.19.152-cip37-rt16" if BR2_LINUX_KERNEL_LATEST_CIP_RT_VERSION
|
||||
default BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE \
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
# From https://www.kernel.org/pub/linux/kernel/v5.x/sha256sums.asc
|
||||
sha256 39fcfb41dcdf71b6b42b88eff3d8cedbe7523830ccae847f3914c0b97e1e6b49 linux-5.9.14.tar.xz
|
||||
sha256 b0d7abae88e5f91893627c645e680a95c818defd1b4fcaf3e2afb4b2b6b4ab86 linux-5.9.16.tar.xz
|
||||
sha256 4ab4a3f694b7b4cfbe78871eab34c8039ad33692144c45c669827a594da85534 linux-5.8.18.tar.xz
|
||||
sha256 beec970bbb93de8ab839f27930f7ab00c7bd65af0ffa07a50e765affdc2561c6 linux-5.4.83.tar.xz
|
||||
sha256 d37449403664cc3b1bac96d0d9a199dbe619885cd899c0ae3108843f42e3d522 linux-5.4.93.tar.xz
|
||||
# From https://www.kernel.org/pub/linux/kernel/v4.x/sha256sums.asc
|
||||
sha256 e52a49ceb639d871478a143c314648c35e22222c317ecdf49866830fea5c3dfc linux-4.4.248.tar.xz
|
||||
sha256 4687268061c9933c298b30d28e4bf1a30dfbab7c0da4bee194968e4f81ffeccf linux-4.9.248.tar.xz
|
||||
sha256 0e1bc32c4842c3bbee3a15454408f528acd4d3c5e83312b93008d5ee2e9a0c79 linux-4.14.212.tar.xz
|
||||
sha256 3eeec4e5eb8a129be3536357ecb028fae7d82fac933dcfac0b6089ee398fc5fc linux-4.19.163.tar.xz
|
||||
sha256 661e98b9448cbac948c705fd44cd7d30200422ee1cb02950d142aa99a1b3985a linux-4.4.253.tar.xz
|
||||
sha256 9a5b51a8350201bd38e3ff13909323a6571b4572a7b3caed76e462b07619bc18 linux-4.9.253.tar.xz
|
||||
sha256 62a36a25431016d98d0f1cff98be432086c51f86fd79042bd10a867b3a924d11 linux-4.14.217.tar.xz
|
||||
sha256 f4e352fe0eb986e5b532b99d9b0725a67046cbb3e5f53fcd5b098cbaeb2ac60a linux-4.19.171.tar.xz
|
||||
# Locally computed
|
||||
sha256 d2a06f52143deb929b8d513cf9afc9bd065951389a80fa70bc4d63025b5b3fb9 linux-cip-4.19.152-cip37.tar.gz
|
||||
sha256 bc1dacd3d0f526de3e8754a444e8e02a54521527af639ddb907cb35cda775a8c linux-cip-4.19.152-cip37-rt16.tar.gz
|
||||
|
||||
@@ -1764,7 +1764,6 @@ menu "Networking"
|
||||
source "package/libuev/Config.in"
|
||||
source "package/libuhttpd/Config.in"
|
||||
source "package/libupnp/Config.in"
|
||||
source "package/libupnp18/Config.in"
|
||||
source "package/libupnpp/Config.in"
|
||||
source "package/liburiparser/Config.in"
|
||||
source "package/libuwsc/Config.in"
|
||||
|
||||
@@ -90,5 +90,6 @@ menu "Host utilities"
|
||||
source "package/xorriso/Config.in.host"
|
||||
source "package/zip/Config.in.host"
|
||||
source "package/zstd/Config.in.host"
|
||||
source "package/python-scons/Config.in.host"
|
||||
|
||||
endmenu
|
||||
|
||||
@@ -5,6 +5,7 @@ config BR2_PACKAGE_AZMQ
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # boost-log
|
||||
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11
|
||||
depends on BR2_USE_WCHAR # boost
|
||||
depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS # boost-thread
|
||||
depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # exception_ptr
|
||||
select BR2_PACKAGE_ZEROMQ
|
||||
select BR2_PACKAGE_BOOST
|
||||
@@ -21,6 +22,7 @@ config BR2_PACKAGE_AZMQ
|
||||
https://github.com/zeromq/azmq
|
||||
|
||||
comment "azmq needs a toolchain w/ C++11, wchar and NPTL"
|
||||
depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
|
||||
depends on !(BR2_INSTALL_LIBSTDCPP && BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 \
|
||||
&& BR2_USE_WCHAR && BR2_TOOLCHAIN_HAS_THREADS_NPTL)
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ config BR2_PACKAGE_BITCOIN_ARCH_SUPPORTS
|
||||
config BR2_PACKAGE_BITCOIN
|
||||
bool "bitcoin"
|
||||
depends on BR2_INSTALL_LIBSTDCPP
|
||||
depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS # boost-thread
|
||||
depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # std::future
|
||||
depends on BR2_PACKAGE_BITCOIN_ARCH_SUPPORTS
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS # boost
|
||||
@@ -37,6 +38,7 @@ config BR2_PACKAGE_BITCOIN
|
||||
|
||||
comment "bitcoin needs a toolchain w/ C++, threads, wchar"
|
||||
depends on BR2_PACKAGE_BITCOIN_ARCH_SUPPORTS
|
||||
depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
|
||||
depends on !BR2_INSTALL_LIBSTDCPP || \
|
||||
!BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR
|
||||
|
||||
|
||||
@@ -52,6 +52,7 @@ config BR2_PACKAGE_BOOST_LAYOUT
|
||||
|
||||
config BR2_PACKAGE_BOOST_ATOMIC
|
||||
bool "boost-atomic"
|
||||
depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
|
||||
help
|
||||
C++11-style atomic<>.
|
||||
|
||||
@@ -82,6 +83,8 @@ config BR2_PACKAGE_BOOST_CONTEXT_ARCH_SUPPORTS
|
||||
config BR2_PACKAGE_BOOST_CONTEXT
|
||||
bool "boost-context"
|
||||
depends on BR2_PACKAGE_BOOST_CONTEXT_ARCH_SUPPORTS
|
||||
depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS \
|
||||
|| BR2_TOOLCHAIN_GCC_AT_LEAST_6 # boost-thread
|
||||
depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735
|
||||
select BR2_PACKAGE_BOOST_THREAD if !BR2_TOOLCHAIN_GCC_AT_LEAST_6
|
||||
help
|
||||
@@ -101,6 +104,7 @@ comment "boost-contract needs a toolchain w/ NPTL"
|
||||
config BR2_PACKAGE_BOOST_COROUTINE
|
||||
bool "boost-coroutine"
|
||||
depends on BR2_PACKAGE_BOOST_CONTEXT_ARCH_SUPPORTS
|
||||
depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS # boost-thread
|
||||
depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # boost-context, boost-thread
|
||||
select BR2_PACKAGE_BOOST_CHRONO
|
||||
select BR2_PACKAGE_BOOST_CONTEXT
|
||||
@@ -113,6 +117,7 @@ config BR2_PACKAGE_BOOST_COROUTINE
|
||||
|
||||
comment "boost-coroutine needs a toolchain not affected by GCC bug 64735"
|
||||
depends on BR2_PACKAGE_BOOST_CONTEXT_ARCH_SUPPORTS
|
||||
depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
|
||||
depends on BR2_TOOLCHAIN_HAS_GCC_BUG_64735
|
||||
|
||||
config BR2_PACKAGE_BOOST_DATE_TIME
|
||||
@@ -135,6 +140,8 @@ config BR2_PACKAGE_BOOST_FIBER
|
||||
# mips support uses the "pause" instruction, only available
|
||||
# since mips32r2/mips64r2.
|
||||
depends on !BR2_MIPS_CPU_MIPS32 && !BR2_MIPS_CPU_MIPS64
|
||||
depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS \
|
||||
|| BR2_TOOLCHAIN_GCC_AT_LEAST_6 # boost-context -> boost-thread
|
||||
depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # boost-context
|
||||
select BR2_PACKAGE_BOOST_CONTEXT
|
||||
select BR2_PACKAGE_BOOST_FILESYSTEM
|
||||
@@ -144,10 +151,14 @@ config BR2_PACKAGE_BOOST_FIBER
|
||||
|
||||
comment "boost-fiber needs a toolchain w/ NPTL"
|
||||
depends on BR2_PACKAGE_BOOST_CONTEXT_ARCH_SUPPORTS
|
||||
depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS \
|
||||
|| BR2_TOOLCHAIN_GCC_AT_LEAST_6
|
||||
depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL
|
||||
|
||||
comment "boost-fiber needs a toolchain not affected by GCC bug 64735"
|
||||
depends on BR2_PACKAGE_BOOST_CONTEXT_ARCH_SUPPORTS
|
||||
depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS \
|
||||
|| BR2_TOOLCHAIN_GCC_AT_LEAST_6
|
||||
depends on BR2_TOOLCHAIN_HAS_GCC_BUG_64735
|
||||
|
||||
config BR2_PACKAGE_BOOST_FILESYSTEM
|
||||
@@ -190,6 +201,8 @@ config BR2_PACKAGE_BOOST_LOCALE
|
||||
# details.
|
||||
depends on !(BR2_STATIC_LIBS && BR2_PACKAGE_ICU)
|
||||
depends on !(BR2_TOOLCHAIN_HAS_GCC_BUG_64735 && BR2_PACKAGE_ICU) # boost-thread
|
||||
depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS \
|
||||
|| !BR2_PACKAGE_ICU # boost-thread
|
||||
select BR2_PACKAGE_BOOST_SYSTEM
|
||||
select BR2_PACKAGE_BOOST_THREAD if BR2_PACKAGE_ICU
|
||||
select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
|
||||
@@ -197,16 +210,19 @@ config BR2_PACKAGE_BOOST_LOCALE
|
||||
Provide localization and Unicode handling tools for C++.
|
||||
|
||||
comment "boost-locale needs a toolchain w/ dynamic library"
|
||||
depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
|
||||
depends on BR2_PACKAGE_ICU
|
||||
depends on BR2_STATIC_LIBS
|
||||
|
||||
comment "boost-locale needs a toolchain not affected by GCC bug 64735"
|
||||
depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
|
||||
depends on BR2_PACKAGE_ICU
|
||||
depends on BR2_TOOLCHAIN_HAS_GCC_BUG_64735
|
||||
|
||||
config BR2_PACKAGE_BOOST_LOG
|
||||
bool "boost-log"
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
|
||||
depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS # boost-atomic
|
||||
depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # boost-thread
|
||||
select BR2_PACKAGE_BOOST_ATOMIC
|
||||
select BR2_PACKAGE_BOOST_DATE_TIME
|
||||
@@ -218,6 +234,7 @@ config BR2_PACKAGE_BOOST_LOG
|
||||
Logging library.
|
||||
|
||||
comment "boost-log needs a toolchain w/ NPTL"
|
||||
depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
|
||||
depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL
|
||||
|
||||
comment "boost-log needs a toolchain not affected by GCC bug 64735"
|
||||
@@ -313,8 +330,8 @@ config BR2_PACKAGE_BOOST_TEST
|
||||
|
||||
config BR2_PACKAGE_BOOST_THREAD
|
||||
bool "boost-thread"
|
||||
depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
|
||||
depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # std::current_exception
|
||||
select BR2_PACKAGE_BOOST_ATOMIC if !BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
|
||||
select BR2_PACKAGE_BOOST_CHRONO
|
||||
select BR2_PACKAGE_BOOST_SYSTEM
|
||||
help
|
||||
@@ -332,6 +349,7 @@ config BR2_PACKAGE_BOOST_TIMER
|
||||
|
||||
config BR2_PACKAGE_BOOST_TYPE_ERASURE
|
||||
bool "boost-type_erasure"
|
||||
depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS # boost-thread
|
||||
depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # boost-thread
|
||||
select BR2_PACKAGE_BOOST_SYSTEM
|
||||
select BR2_PACKAGE_BOOST_THREAD
|
||||
@@ -346,6 +364,7 @@ config BR2_PACKAGE_BOOST_WAVE
|
||||
# limitation of assembler for coldfire
|
||||
# error: Tried to convert PC relative branch to absolute jump
|
||||
depends on !BR2_m68k_cf
|
||||
depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS # boost-thread
|
||||
depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # boost-thread
|
||||
select BR2_PACKAGE_BOOST_DATE_TIME
|
||||
select BR2_PACKAGE_BOOST_FILESYSTEM
|
||||
|
||||
@@ -96,6 +96,13 @@ else
|
||||
BRLTTY_CONF_OPTS += --without-rgx-package
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_POLKIT),y)
|
||||
BRLTTY_DEPENDENCIES += polkit
|
||||
BRLTTY_CONF_OPTS += --enable-polkit
|
||||
else
|
||||
BRLTTY_CONF_OPTS += --disable-polkit
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD),y)
|
||||
BRLTTY_DEPENDENCIES += systemd
|
||||
BRLTTY_CONF_OPTS += --with-service-package
|
||||
|
||||
@@ -7,7 +7,7 @@ config BR2_PACKAGE_DBUS
|
||||
help
|
||||
The D-Bus message bus system.
|
||||
|
||||
http://www.freedesktop.org/wiki/Software/dbus
|
||||
https://www.freedesktop.org/wiki/Software/dbus
|
||||
|
||||
comment "dbus needs a toolchain w/ threads"
|
||||
depends on BR2_USE_MMU
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# Locally calculated after checking pgp signature
|
||||
# https://dbus.freedesktop.org/releases/dbus/dbus-1.12.18.tar.gz.asc
|
||||
# https://dbus.freedesktop.org/releases/dbus/dbus-1.12.20.tar.gz.asc
|
||||
# using key 36EC5A6448A4F5EF79BEFE98E05AE1478F814C4F
|
||||
sha256 64cf4d70840230e5e9bc784d153880775ab3db19d656ead8a0cb9c0ab5a95306 dbus-1.12.18.tar.gz
|
||||
sha256 f77620140ecb4cdc67f37fb444f8a6bea70b5b6461f12f1cbe2cec60fa7de5fe dbus-1.12.20.tar.gz
|
||||
|
||||
# Locally calculated
|
||||
sha256 0e46f54efb12d04ab5c33713bacd0e140c9a35b57ae29e03c853203266e8f3a1 COPYING
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#
|
||||
################################################################################
|
||||
|
||||
DBUS_VERSION = 1.12.18
|
||||
DBUS_VERSION = 1.12.20
|
||||
DBUS_SITE = https://dbus.freedesktop.org/releases/dbus
|
||||
DBUS_LICENSE = AFL-2.1 or GPL-2.0+ (library, tools), GPL-2.0+ (tools)
|
||||
DBUS_LICENSE_FILES = COPYING
|
||||
|
||||
@@ -41,6 +41,7 @@ endef
|
||||
|
||||
define DHCPCD_INSTALL_TARGET_CMDS
|
||||
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install DESTDIR=$(TARGET_DIR)
|
||||
mkdir -p $(TARGET_DIR)/var/db/dhcpcd
|
||||
endef
|
||||
|
||||
# When network-manager is enabled together with dhcpcd, it will use
|
||||
|
||||
@@ -12,7 +12,7 @@ DOCKER_CONTAINERD_LICENSE_FILES = LICENSE
|
||||
DOCKER_CONTAINERD_GOMOD = github.com/containerd/containerd
|
||||
|
||||
DOCKER_CONTAINERD_LDFLAGS = \
|
||||
-X github.com/docker/containerd.GitCommit=$(DOCKER_CONTAINERD_VERSION)
|
||||
-X $(DOCKER_CONTAINERD_GOMOD)/version.Version=$(DOCKER_CONTAINERD_VERSION)
|
||||
|
||||
DOCKER_CONTAINERD_BUILD_TARGETS = cmd/ctr cmd/containerd cmd/containerd-shim
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ config BR2_PACKAGE_DOMOTICZ
|
||||
depends on BR2_INSTALL_LIBSTDCPP
|
||||
depends on BR2_USE_WCHAR
|
||||
depends on BR2_PACKAGE_LUA_5_3
|
||||
depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS # boost-thread
|
||||
depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # exception_ptr
|
||||
select BR2_PACKAGE_BOOST
|
||||
select BR2_PACKAGE_BOOST_DATE_TIME
|
||||
@@ -30,6 +31,7 @@ config BR2_PACKAGE_DOMOTICZ
|
||||
|
||||
comment "domoticz needs lua 5.3 and a toolchain w/ C++, gcc >= 4.8, NPTL, wchar, dynamic library"
|
||||
depends on BR2_USE_MMU
|
||||
depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
|
||||
depends on !BR2_INSTALL_LIBSTDCPP || \
|
||||
!BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 || \
|
||||
!BR2_TOOLCHAIN_HAS_THREADS_NPTL || \
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
# Locally computed after checking signature
|
||||
sha256 0b972a441f680545ddfacd2f41fb2a705fb03249d46ed5ce7e01fe68b6cfb5f0 dovecot-2.3-pigeonhole-0.5.11.tar.gz
|
||||
sha256 911fe566da5b638eab1b11105314300bc9049cc3832d4bd2aed44c265013bf17 dovecot-2.3-pigeonhole-0.5.13.tar.gz
|
||||
sha256 fc9e9522216f2a9a28b31300e3c73c1df56acc27dfae951bf516e7995366b51a COPYING
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#
|
||||
################################################################################
|
||||
|
||||
DOVECOT_PIGEONHOLE_VERSION = 0.5.11
|
||||
DOVECOT_PIGEONHOLE_VERSION = 0.5.13
|
||||
DOVECOT_PIGEONHOLE_SOURCE = dovecot-2.3-pigeonhole-$(DOVECOT_PIGEONHOLE_VERSION).tar.gz
|
||||
DOVECOT_PIGEONHOLE_SITE = https://pigeonhole.dovecot.org/releases/2.3
|
||||
DOVECOT_PIGEONHOLE_LICENSE = LGPL-2.1
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Locally computed after checking signature
|
||||
sha256 d3d9ea9010277f57eb5b9f4166a5d2ba539b172bd6d5a2b2529a6db524baafdc dovecot-2.3.11.3.tar.gz
|
||||
sha256 a363b132e494f662d98c820d1481297e6ae72f194c2c91b6c39e1518b86240a8 COPYING
|
||||
sha256 a3f875b80ec11a452480690108660030978c94fa8e796ad6d943a874b496f1c4 dovecot-2.3.13.tar.gz
|
||||
sha256 319a9830aab406109cd67cb45496587566a8123203d66d037b209ca3e13de02a COPYING
|
||||
sha256 dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551 COPYING.LGPL
|
||||
sha256 52b8c95fabb19575281874b661ef7968ea47e8f5d74ba0dd40ce512e52b3fc97 COPYING.MIT
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
################################################################################
|
||||
|
||||
DOVECOT_VERSION_MAJOR = 2.3
|
||||
DOVECOT_VERSION = $(DOVECOT_VERSION_MAJOR).11.3
|
||||
DOVECOT_VERSION = $(DOVECOT_VERSION_MAJOR).13
|
||||
DOVECOT_SITE = https://dovecot.org/releases/$(DOVECOT_VERSION_MAJOR)
|
||||
DOVECOT_INSTALL_STAGING = YES
|
||||
DOVECOT_LICENSE = LGPL-2.1, MIT, Public Domain, BSD-3-Clause, Unicode-DFS-2015
|
||||
|
||||
@@ -18,6 +18,8 @@ config BR2_PACKAGE_FIRMWARE_IMX_SDMA_FW_NAME
|
||||
default "imx51" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX51
|
||||
default "imx53" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX53
|
||||
default "imx6q" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6Q
|
||||
default "imx6q" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6S
|
||||
default "imx6q" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6UL
|
||||
default "imx7d" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7
|
||||
default "imx7d" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M
|
||||
default "imx7d" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM
|
||||
|
||||
@@ -116,9 +116,11 @@ endif
|
||||
FIRMWARE_IMX_VPU_FW_NAME = $(call qstrip,$(BR2_PACKAGE_FIRMWARE_IMX_VPU_FW_NAME))
|
||||
ifneq ($(FIRMWARE_IMX_VPU_FW_NAME),)
|
||||
define FIRMWARE_IMX_INSTALL_TARGET_VPU_FW
|
||||
mkdir -p $(TARGET_DIR)/lib/firmware/imx/vpu
|
||||
cp $(@D)/firmware/vpu/vpu_fw_$(FIRMWARE_IMX_VPU_FW_NAME)*.bin \
|
||||
$(TARGET_DIR)/lib/firmware/imx/vpu/
|
||||
mkdir -p $(TARGET_DIR)/lib/firmware/vpu
|
||||
for i in $$(find $(@D)/firmware/vpu/vpu_fw_$(FIRMWARE_IMX_VPU_FW_NAME)*.bin); do \
|
||||
cp $$i $(TARGET_DIR)/lib/firmware/vpu/ ; \
|
||||
ln -sf vpu/$$(basename $$i) $(TARGET_DIR)/lib/firmware/$$(basename $$i) ; \
|
||||
done
|
||||
endef
|
||||
endif
|
||||
|
||||
|
||||
242
package/gcc/10.2.0/0001-arc-Refurbish-adc-sbc-patterns.patch
Normal file
242
package/gcc/10.2.0/0001-arc-Refurbish-adc-sbc-patterns.patch
Normal file
@@ -0,0 +1,242 @@
|
||||
From 09944fba5bfb8e5543ce043c70d08222cf2f97ff Mon Sep 17 00:00:00 2001
|
||||
From: Claudiu Zissulescu <claziss@synopsys.com>
|
||||
Date: Wed, 11 Nov 2020 12:31:10 +0200
|
||||
Subject: [PATCH] arc: Refurbish adc/sbc patterns
|
||||
|
||||
The adc/sbc patterns were unecessary spliting, remove that and
|
||||
associated functions.
|
||||
|
||||
gcc/ChangeLog:
|
||||
|
||||
2020-10-11 Claudiu Zissulescu <claziss@synopsys.com>
|
||||
|
||||
* config/arc/arc-protos.h (arc_scheduling_not_expected): Remove
|
||||
it.
|
||||
(arc_sets_cc_p): Likewise.
|
||||
(arc_need_delay): Likewise.
|
||||
* config/arc/arc.c (arc_sets_cc_p): Likewise.
|
||||
(arc_need_delay): Likewise.
|
||||
(arc_scheduling_not_expected): Likewise.
|
||||
* config/arc/arc.md: Convert adc/sbc patterns to simple
|
||||
instruction definitions.
|
||||
|
||||
Signed-off-by: Claudiu Zissulescu <claziss@synopsys.com>
|
||||
Signed-off-by: Veronika Kremneva <kremneva@synopsys.com>
|
||||
---
|
||||
gcc/config/arc/arc-protos.h | 3 --
|
||||
gcc/config/arc/arc.c | 53 -------------------------
|
||||
gcc/config/arc/arc.md | 95 ++++++++++++++-------------------------------
|
||||
3 files changed, 29 insertions(+), 122 deletions(-)
|
||||
|
||||
diff --git a/gcc/config/arc/arc-protos.h b/gcc/config/arc/arc-protos.h
|
||||
index c72d78e3b9e..de4cf47c818 100644
|
||||
--- a/gcc/config/arc/arc-protos.h
|
||||
+++ b/gcc/config/arc/arc-protos.h
|
||||
@@ -90,10 +90,7 @@ extern void split_subsi (rtx *);
|
||||
extern void arc_split_move (rtx *);
|
||||
extern const char *arc_short_long (rtx_insn *insn, const char *, const char *);
|
||||
extern rtx arc_regno_use_in (unsigned int, rtx);
|
||||
-extern bool arc_scheduling_not_expected (void);
|
||||
-extern bool arc_sets_cc_p (rtx_insn *insn);
|
||||
extern int arc_label_align (rtx_insn *label);
|
||||
-extern bool arc_need_delay (rtx_insn *insn);
|
||||
extern bool arc_text_label (rtx_insn *insn);
|
||||
|
||||
extern bool arc_short_comparison_p (rtx, int);
|
||||
diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c
|
||||
index fcb83c4e23e..2daf83dd009 100644
|
||||
--- a/gcc/config/arc/arc.c
|
||||
+++ b/gcc/config/arc/arc.c
|
||||
@@ -10341,59 +10341,6 @@ arc_attr_type (rtx_insn *insn)
|
||||
return get_attr_type (insn);
|
||||
}
|
||||
|
||||
-/* Return true if insn sets the condition codes. */
|
||||
-
|
||||
-bool
|
||||
-arc_sets_cc_p (rtx_insn *insn)
|
||||
-{
|
||||
- if (NONJUMP_INSN_P (insn))
|
||||
- if (rtx_sequence *seq = dyn_cast <rtx_sequence *> (PATTERN (insn)))
|
||||
- insn = seq->insn (seq->len () - 1);
|
||||
- return arc_attr_type (insn) == TYPE_COMPARE;
|
||||
-}
|
||||
-
|
||||
-/* Return true if INSN is an instruction with a delay slot we may want
|
||||
- to fill. */
|
||||
-
|
||||
-bool
|
||||
-arc_need_delay (rtx_insn *insn)
|
||||
-{
|
||||
- rtx_insn *next;
|
||||
-
|
||||
- if (!flag_delayed_branch)
|
||||
- return false;
|
||||
- /* The return at the end of a function needs a delay slot. */
|
||||
- if (NONJUMP_INSN_P (insn) && GET_CODE (PATTERN (insn)) == USE
|
||||
- && (!(next = next_active_insn (insn))
|
||||
- || ((!NONJUMP_INSN_P (next) || GET_CODE (PATTERN (next)) != SEQUENCE)
|
||||
- && arc_attr_type (next) == TYPE_RETURN))
|
||||
- && (!TARGET_PAD_RETURN
|
||||
- || (prev_active_insn (insn)
|
||||
- && prev_active_insn (prev_active_insn (insn))
|
||||
- && prev_active_insn (prev_active_insn (prev_active_insn (insn))))))
|
||||
- return true;
|
||||
- if (NONJUMP_INSN_P (insn)
|
||||
- ? (GET_CODE (PATTERN (insn)) == USE
|
||||
- || GET_CODE (PATTERN (insn)) == CLOBBER
|
||||
- || GET_CODE (PATTERN (insn)) == SEQUENCE)
|
||||
- : JUMP_P (insn)
|
||||
- ? (GET_CODE (PATTERN (insn)) == ADDR_VEC
|
||||
- || GET_CODE (PATTERN (insn)) == ADDR_DIFF_VEC)
|
||||
- : !CALL_P (insn))
|
||||
- return false;
|
||||
- return num_delay_slots (insn) != 0;
|
||||
-}
|
||||
-
|
||||
-/* Return true if the scheduling pass(es) has/have already run,
|
||||
- i.e. where possible, we should try to mitigate high latencies
|
||||
- by different instruction selection. */
|
||||
-
|
||||
-bool
|
||||
-arc_scheduling_not_expected (void)
|
||||
-{
|
||||
- return cfun->machine->arc_reorg_started;
|
||||
-}
|
||||
-
|
||||
/* Code has a minimum p2 alignment of 1, which we must restore after
|
||||
an ADDR_DIFF_VEC. */
|
||||
|
||||
diff --git a/gcc/config/arc/arc.md b/gcc/config/arc/arc.md
|
||||
index d4d9f59a3ea..6c09c86884f 100644
|
||||
--- a/gcc/config/arc/arc.md
|
||||
+++ b/gcc/config/arc/arc.md
|
||||
@@ -2857,43 +2857,25 @@ archs4x, archs4xd"
|
||||
(set_attr "type" "compare")
|
||||
(set_attr "length" "4,4,8")])
|
||||
|
||||
-; w/c/c comes first (rather than w/0/C_0) to prevent the middle-end
|
||||
-; needlessly prioritizing the matching constraint.
|
||||
-; Rcw/0/C_0 comes before w/c/L so that the lower latency conditional
|
||||
-; execution is used where possible.
|
||||
-(define_insn_and_split "adc"
|
||||
- [(set (match_operand:SI 0 "dest_reg_operand" "=w,Rcw,w,Rcw,w")
|
||||
- (plus:SI (plus:SI (ltu:SI (reg:CC_C CC_REG) (const_int 0))
|
||||
- (match_operand:SI 1 "nonmemory_operand"
|
||||
- "%c,0,c,0,cCal"))
|
||||
- (match_operand:SI 2 "nonmemory_operand" "c,C_0,L,I,cCal")))]
|
||||
+(define_insn "adc"
|
||||
+ [(set (match_operand:SI 0 "register_operand" "=r, r,r,r, r,r")
|
||||
+ (plus:SI
|
||||
+ (plus:SI
|
||||
+ (ltu:SI (reg:CC_C CC_REG) (const_int 0))
|
||||
+ (match_operand:SI 1 "nonmemory_operand" "%r, 0,r,0,Cal,r"))
|
||||
+ (match_operand:SI 2 "nonmemory_operand" "r,C_0,L,I, r,Cal")))]
|
||||
"register_operand (operands[1], SImode)
|
||||
|| register_operand (operands[2], SImode)"
|
||||
"@
|
||||
- adc %0,%1,%2
|
||||
- add.cs %0,%1,1
|
||||
- adc %0,%1,%2
|
||||
- adc %0,%1,%2
|
||||
- adc %0,%1,%2"
|
||||
- ; if we have a bad schedule after sched2, split.
|
||||
- "reload_completed
|
||||
- && !optimize_size && (!TARGET_ARC600_FAMILY)
|
||||
- && arc_scheduling_not_expected ()
|
||||
- && arc_sets_cc_p (prev_nonnote_insn (insn))
|
||||
- /* If next comes a return or other insn that needs a delay slot,
|
||||
- expect the adc to get into the delay slot. */
|
||||
- && next_nonnote_insn (insn)
|
||||
- && !arc_need_delay (next_nonnote_insn (insn))
|
||||
- /* Restore operands before emitting. */
|
||||
- && (extract_insn_cached (insn), 1)"
|
||||
- [(set (match_dup 0) (match_dup 3))
|
||||
- (cond_exec
|
||||
- (ltu (reg:CC_C CC_REG) (const_int 0))
|
||||
- (set (match_dup 0) (plus:SI (match_dup 0) (const_int 1))))]
|
||||
- "operands[3] = simplify_gen_binary (PLUS, SImode, operands[1], operands[2]);"
|
||||
+ adc\\t%0,%1,%2
|
||||
+ add.cs\\t%0,%1,1
|
||||
+ adc\\t%0,%1,%2
|
||||
+ adc\\t%0,%1,%2
|
||||
+ adc\\t%0,%1,%2
|
||||
+ adc\\t%0,%1,%2"
|
||||
[(set_attr "cond" "use")
|
||||
(set_attr "type" "cc_arith")
|
||||
- (set_attr "length" "4,4,4,4,8")])
|
||||
+ (set_attr "length" "4,4,4,4,8,8")])
|
||||
|
||||
; combiner-splitter cmp / scc -> cmp / adc
|
||||
(define_split
|
||||
@@ -3025,7 +3007,7 @@ archs4x, archs4xd"
|
||||
DONE;
|
||||
}
|
||||
emit_insn (gen_sub_f (l0, l1, l2));
|
||||
- emit_insn (gen_sbc (h0, h1, h2, gen_rtx_REG (CCmode, CC_REG)));
|
||||
+ emit_insn (gen_sbc (h0, h1, h2));
|
||||
DONE;
|
||||
")
|
||||
|
||||
@@ -3040,44 +3022,25 @@ archs4x, archs4xd"
|
||||
(set_attr "type" "cc_arith")
|
||||
(set_attr "length" "4")])
|
||||
|
||||
-; w/c/c comes first (rather than Rcw/0/C_0) to prevent the middle-end
|
||||
-; needlessly prioritizing the matching constraint.
|
||||
-; Rcw/0/C_0 comes before w/c/L so that the lower latency conditional execution
|
||||
-; is used where possible.
|
||||
-(define_insn_and_split "sbc"
|
||||
- [(set (match_operand:SI 0 "dest_reg_operand" "=w,Rcw,w,Rcw,w")
|
||||
- (minus:SI (minus:SI (match_operand:SI 1 "nonmemory_operand"
|
||||
- "c,0,c,0,cCal")
|
||||
- (ltu:SI (match_operand:CC_C 3 "cc_use_register")
|
||||
- (const_int 0)))
|
||||
- (match_operand:SI 2 "nonmemory_operand" "c,C_0,L,I,cCal")))]
|
||||
+(define_insn "sbc"
|
||||
+ [(set (match_operand:SI 0 "dest_reg_operand" "=r,r,r,r,r,r")
|
||||
+ (minus:SI
|
||||
+ (minus:SI
|
||||
+ (match_operand:SI 1 "nonmemory_operand" "r, 0,r,0, r,Cal")
|
||||
+ (ltu:SI (reg:CC_C CC_REG) (const_int 0)))
|
||||
+ (match_operand:SI 2 "nonmemory_operand" "r,C_0,L,I,Cal,r")))]
|
||||
"register_operand (operands[1], SImode)
|
||||
|| register_operand (operands[2], SImode)"
|
||||
"@
|
||||
- sbc %0,%1,%2
|
||||
- sub.cs %0,%1,1
|
||||
- sbc %0,%1,%2
|
||||
- sbc %0,%1,%2
|
||||
- sbc %0,%1,%2"
|
||||
- ; if we have a bad schedule after sched2, split.
|
||||
- "reload_completed
|
||||
- && !optimize_size && (!TARGET_ARC600_FAMILY)
|
||||
- && arc_scheduling_not_expected ()
|
||||
- && arc_sets_cc_p (prev_nonnote_insn (insn))
|
||||
- /* If next comes a return or other insn that needs a delay slot,
|
||||
- expect the adc to get into the delay slot. */
|
||||
- && next_nonnote_insn (insn)
|
||||
- && !arc_need_delay (next_nonnote_insn (insn))
|
||||
- /* Restore operands before emitting. */
|
||||
- && (extract_insn_cached (insn), 1)"
|
||||
- [(set (match_dup 0) (match_dup 4))
|
||||
- (cond_exec
|
||||
- (ltu (reg:CC_C CC_REG) (const_int 0))
|
||||
- (set (match_dup 0) (plus:SI (match_dup 0) (const_int -1))))]
|
||||
- "operands[4] = simplify_gen_binary (MINUS, SImode, operands[1], operands[2]);"
|
||||
+ sbc\\t%0,%1,%2
|
||||
+ sub.cs\\t%0,%1,1
|
||||
+ sbc\\t%0,%1,%2
|
||||
+ sbc\\t%0,%1,%2
|
||||
+ sbc\\t%0,%1,%2
|
||||
+ sbc\\t%0,%1,%2"
|
||||
[(set_attr "cond" "use")
|
||||
(set_attr "type" "cc_arith")
|
||||
- (set_attr "length" "4,4,4,4,8")])
|
||||
+ (set_attr "length" "4,4,4,4,8,8")])
|
||||
|
||||
(define_insn "sub_f"
|
||||
[(set (reg:CC CC_REG)
|
||||
--
|
||||
2.16.2
|
||||
|
||||
@@ -0,0 +1,325 @@
|
||||
From 472472ee0aaccb6389747d6281c34c558bcca7d8 Mon Sep 17 00:00:00 2001
|
||||
From: Romain Naour <romain.naour@gmail.com>
|
||||
Date: Wed, 20 Jan 2021 23:26:29 +0100
|
||||
Subject: [PATCH] Revert "re PR target/92095 (internal error with -O1
|
||||
-mcpu=niagara2 -fPIE)"
|
||||
|
||||
This reverts commit 0a83f1a441d7aaadecb368c237b6ee70bd7b91d6.
|
||||
|
||||
Building the Buildroot defconfig qemu_sparc_ss10_defconfig using
|
||||
gcc 8.4, 9.3 and 10 produce a broken rootfs that trigger illegal
|
||||
instruction messages.
|
||||
|
||||
gcc 8.3, 9.2 are the latest working gcc version.
|
||||
git bisect between gcc 8.4 and 8.4 allowed to identify
|
||||
the commit that introcuce the regression.
|
||||
|
||||
Reverting this patch allowed to produce a working rootfs.
|
||||
|
||||
Signed-off-by: Romain Naour <romain.naour@gmail.com>
|
||||
Cc: Eric Botcazou <ebotcazou@gcc.gnu.org>
|
||||
---
|
||||
gcc/config/sparc/sparc-protos.h | 1 -
|
||||
gcc/config/sparc/sparc.c | 121 +++++++-----------
|
||||
gcc/config/sparc/sparc.md | 5 +-
|
||||
.../gcc.c-torture/compile/20191108-1.c | 14 --
|
||||
gcc/testsuite/gcc.target/sparc/overflow-3.c | 2 +-
|
||||
gcc/testsuite/gcc.target/sparc/overflow-4.c | 2 +-
|
||||
gcc/testsuite/gcc.target/sparc/overflow-5.c | 2 +-
|
||||
7 files changed, 53 insertions(+), 94 deletions(-)
|
||||
delete mode 100644 gcc/testsuite/gcc.c-torture/compile/20191108-1.c
|
||||
|
||||
diff --git a/gcc/config/sparc/sparc-protos.h b/gcc/config/sparc/sparc-protos.h
|
||||
index f525cd7a422..0d9f47af644 100644
|
||||
--- a/gcc/config/sparc/sparc-protos.h
|
||||
+++ b/gcc/config/sparc/sparc-protos.h
|
||||
@@ -69,7 +69,6 @@ extern void sparc_split_reg_mem (rtx, rtx, machine_mode);
|
||||
extern void sparc_split_mem_reg (rtx, rtx, machine_mode);
|
||||
extern int sparc_split_reg_reg_legitimate (rtx, rtx);
|
||||
extern void sparc_split_reg_reg (rtx, rtx, machine_mode);
|
||||
-extern const char *output_load_pcrel_sym (rtx *);
|
||||
extern const char *output_ubranch (rtx, rtx_insn *);
|
||||
extern const char *output_cbranch (rtx, rtx, int, int, int, rtx_insn *);
|
||||
extern const char *output_return (rtx_insn *);
|
||||
diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c
|
||||
index aefced85fe1..3ff6f9200f6 100644
|
||||
--- a/gcc/config/sparc/sparc.c
|
||||
+++ b/gcc/config/sparc/sparc.c
|
||||
@@ -4192,6 +4192,13 @@ eligible_for_sibcall_delay (rtx_insn *trial)
|
||||
static bool
|
||||
sparc_cannot_force_const_mem (machine_mode mode, rtx x)
|
||||
{
|
||||
+ /* After IRA has run in PIC mode, it is too late to put anything into the
|
||||
+ constant pool if the PIC register hasn't already been initialized. */
|
||||
+ if ((lra_in_progress || reload_in_progress)
|
||||
+ && flag_pic
|
||||
+ && !crtl->uses_pic_offset_table)
|
||||
+ return true;
|
||||
+
|
||||
switch (GET_CODE (x))
|
||||
{
|
||||
case CONST_INT:
|
||||
@@ -4227,11 +4234,9 @@ sparc_cannot_force_const_mem (machine_mode mode, rtx x)
|
||||
}
|
||||
|
||||
/* Global Offset Table support. */
|
||||
-static GTY(()) rtx got_symbol_rtx = NULL_RTX;
|
||||
-static GTY(()) rtx got_register_rtx = NULL_RTX;
|
||||
static GTY(()) rtx got_helper_rtx = NULL_RTX;
|
||||
-
|
||||
-static GTY(()) bool got_helper_needed = false;
|
||||
+static GTY(()) rtx got_register_rtx = NULL_RTX;
|
||||
+static GTY(()) rtx got_symbol_rtx = NULL_RTX;
|
||||
|
||||
/* Return the SYMBOL_REF for the Global Offset Table. */
|
||||
|
||||
@@ -4244,6 +4249,27 @@ sparc_got (void)
|
||||
return got_symbol_rtx;
|
||||
}
|
||||
|
||||
+#ifdef HAVE_GAS_HIDDEN
|
||||
+# define USE_HIDDEN_LINKONCE 1
|
||||
+#else
|
||||
+# define USE_HIDDEN_LINKONCE 0
|
||||
+#endif
|
||||
+
|
||||
+static void
|
||||
+get_pc_thunk_name (char name[32], unsigned int regno)
|
||||
+{
|
||||
+ const char *reg_name = reg_names[regno];
|
||||
+
|
||||
+ /* Skip the leading '%' as that cannot be used in a
|
||||
+ symbol name. */
|
||||
+ reg_name += 1;
|
||||
+
|
||||
+ if (USE_HIDDEN_LINKONCE)
|
||||
+ sprintf (name, "__sparc_get_pc_thunk.%s", reg_name);
|
||||
+ else
|
||||
+ ASM_GENERATE_INTERNAL_LABEL (name, "LADDPC", regno);
|
||||
+}
|
||||
+
|
||||
/* Wrapper around the load_pcrel_sym{si,di} patterns. */
|
||||
|
||||
static rtx
|
||||
@@ -4263,78 +4289,30 @@ gen_load_pcrel_sym (rtx op0, rtx op1, rtx op2)
|
||||
return insn;
|
||||
}
|
||||
|
||||
-/* Output the load_pcrel_sym{si,di} patterns. */
|
||||
-
|
||||
-const char *
|
||||
-output_load_pcrel_sym (rtx *operands)
|
||||
-{
|
||||
- if (flag_delayed_branch)
|
||||
- {
|
||||
- output_asm_insn ("sethi\t%%hi(%a1-4), %0", operands);
|
||||
- output_asm_insn ("call\t%a2", operands);
|
||||
- output_asm_insn (" add\t%0, %%lo(%a1+4), %0", operands);
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- output_asm_insn ("sethi\t%%hi(%a1-8), %0", operands);
|
||||
- output_asm_insn ("add\t%0, %%lo(%a1-4), %0", operands);
|
||||
- output_asm_insn ("call\t%a2", operands);
|
||||
- output_asm_insn (" nop", NULL);
|
||||
- }
|
||||
-
|
||||
- if (operands[2] == got_helper_rtx)
|
||||
- got_helper_needed = true;
|
||||
-
|
||||
- return "";
|
||||
-}
|
||||
-
|
||||
-#ifdef HAVE_GAS_HIDDEN
|
||||
-# define USE_HIDDEN_LINKONCE 1
|
||||
-#else
|
||||
-# define USE_HIDDEN_LINKONCE 0
|
||||
-#endif
|
||||
-
|
||||
/* Emit code to load the GOT register. */
|
||||
|
||||
void
|
||||
load_got_register (void)
|
||||
{
|
||||
- rtx insn;
|
||||
+ if (!got_register_rtx)
|
||||
+ got_register_rtx = gen_rtx_REG (Pmode, GLOBAL_OFFSET_TABLE_REGNUM);
|
||||
|
||||
if (TARGET_VXWORKS_RTP)
|
||||
- {
|
||||
- if (!got_register_rtx)
|
||||
- got_register_rtx = pic_offset_table_rtx;
|
||||
-
|
||||
- insn = gen_vxworks_load_got ();
|
||||
- }
|
||||
+ emit_insn (gen_vxworks_load_got ());
|
||||
else
|
||||
{
|
||||
- if (!got_register_rtx)
|
||||
- got_register_rtx = gen_rtx_REG (Pmode, GLOBAL_OFFSET_TABLE_REGNUM);
|
||||
-
|
||||
/* The GOT symbol is subject to a PC-relative relocation so we need a
|
||||
helper function to add the PC value and thus get the final value. */
|
||||
if (!got_helper_rtx)
|
||||
{
|
||||
char name[32];
|
||||
-
|
||||
- /* Skip the leading '%' as that cannot be used in a symbol name. */
|
||||
- if (USE_HIDDEN_LINKONCE)
|
||||
- sprintf (name, "__sparc_get_pc_thunk.%s",
|
||||
- reg_names[REGNO (got_register_rtx)] + 1);
|
||||
- else
|
||||
- ASM_GENERATE_INTERNAL_LABEL (name, "LADDPC",
|
||||
- REGNO (got_register_rtx));
|
||||
-
|
||||
+ get_pc_thunk_name (name, GLOBAL_OFFSET_TABLE_REGNUM);
|
||||
got_helper_rtx = gen_rtx_SYMBOL_REF (Pmode, ggc_strdup (name));
|
||||
}
|
||||
|
||||
- insn
|
||||
- = gen_load_pcrel_sym (got_register_rtx, sparc_got (), got_helper_rtx);
|
||||
+ emit_insn (gen_load_pcrel_sym (got_register_rtx, sparc_got (),
|
||||
+ got_helper_rtx));
|
||||
}
|
||||
-
|
||||
- emit_insn (insn);
|
||||
}
|
||||
|
||||
/* Ensure that we are not using patterns that are not OK with PIC. */
|
||||
@@ -5499,7 +5477,7 @@ save_local_or_in_reg_p (unsigned int regno, int leaf_function)
|
||||
return true;
|
||||
|
||||
/* GOT register (%l7) if needed. */
|
||||
- if (got_register_rtx && regno == REGNO (got_register_rtx))
|
||||
+ if (regno == GLOBAL_OFFSET_TABLE_REGNUM && got_register_rtx)
|
||||
return true;
|
||||
|
||||
/* If the function accesses prior frames, the frame pointer and the return
|
||||
@@ -12542,9 +12520,10 @@ static void
|
||||
sparc_file_end (void)
|
||||
{
|
||||
/* If we need to emit the special GOT helper function, do so now. */
|
||||
- if (got_helper_needed)
|
||||
+ if (got_helper_rtx)
|
||||
{
|
||||
const char *name = XSTR (got_helper_rtx, 0);
|
||||
+ const char *reg_name = reg_names[GLOBAL_OFFSET_TABLE_REGNUM];
|
||||
#ifdef DWARF2_UNWIND_INFO
|
||||
bool do_cfi;
|
||||
#endif
|
||||
@@ -12581,22 +12560,17 @@ sparc_file_end (void)
|
||||
#ifdef DWARF2_UNWIND_INFO
|
||||
do_cfi = dwarf2out_do_cfi_asm ();
|
||||
if (do_cfi)
|
||||
- output_asm_insn (".cfi_startproc", NULL);
|
||||
+ fprintf (asm_out_file, "\t.cfi_startproc\n");
|
||||
#endif
|
||||
if (flag_delayed_branch)
|
||||
- {
|
||||
- output_asm_insn ("jmp\t%%o7+8", NULL);
|
||||
- output_asm_insn (" add\t%%o7, %0, %0", &got_register_rtx);
|
||||
- }
|
||||
+ fprintf (asm_out_file, "\tjmp\t%%o7+8\n\t add\t%%o7, %s, %s\n",
|
||||
+ reg_name, reg_name);
|
||||
else
|
||||
- {
|
||||
- output_asm_insn ("add\t%%o7, %0, %0", &got_register_rtx);
|
||||
- output_asm_insn ("jmp\t%%o7+8", NULL);
|
||||
- output_asm_insn (" nop", NULL);
|
||||
- }
|
||||
+ fprintf (asm_out_file, "\tadd\t%%o7, %s, %s\n\tjmp\t%%o7+8\n\t nop\n",
|
||||
+ reg_name, reg_name);
|
||||
#ifdef DWARF2_UNWIND_INFO
|
||||
if (do_cfi)
|
||||
- output_asm_insn (".cfi_endproc", NULL);
|
||||
+ fprintf (asm_out_file, "\t.cfi_endproc\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -13091,10 +13065,7 @@ sparc_init_pic_reg (void)
|
||||
edge entry_edge;
|
||||
rtx_insn *seq;
|
||||
|
||||
- /* In PIC mode, we need to always initialize the PIC register if optimization
|
||||
- is enabled, because we are called from IRA and LRA may later force things
|
||||
- to the constant pool for optimization purposes. */
|
||||
- if (!flag_pic || (!crtl->uses_pic_offset_table && !optimize))
|
||||
+ if (!crtl->uses_pic_offset_table)
|
||||
return;
|
||||
|
||||
start_sequence ();
|
||||
diff --git a/gcc/config/sparc/sparc.md b/gcc/config/sparc/sparc.md
|
||||
index 231c0d84778..899804b80ae 100644
|
||||
--- a/gcc/config/sparc/sparc.md
|
||||
+++ b/gcc/config/sparc/sparc.md
|
||||
@@ -1604,7 +1604,10 @@
|
||||
(clobber (reg:P O7_REG))]
|
||||
"REGNO (operands[0]) == INTVAL (operands[3])"
|
||||
{
|
||||
- return output_load_pcrel_sym (operands);
|
||||
+ if (flag_delayed_branch)
|
||||
+ return "sethi\t%%hi(%a1-4), %0\n\tcall\t%a2\n\t add\t%0, %%lo(%a1+4), %0";
|
||||
+ else
|
||||
+ return "sethi\t%%hi(%a1-8), %0\n\tadd\t%0, %%lo(%a1-4), %0\n\tcall\t%a2\n\t nop";
|
||||
}
|
||||
[(set (attr "type") (const_string "multi"))
|
||||
(set (attr "length")
|
||||
diff --git a/gcc/testsuite/gcc.c-torture/compile/20191108-1.c b/gcc/testsuite/gcc.c-torture/compile/20191108-1.c
|
||||
deleted file mode 100644
|
||||
index 7929751bb06..00000000000
|
||||
--- a/gcc/testsuite/gcc.c-torture/compile/20191108-1.c
|
||||
+++ /dev/null
|
||||
@@ -1,14 +0,0 @@
|
||||
-/* PR target/92095 */
|
||||
-/* Testcase by Sergei Trofimovich <slyfox@inbox.ru> */
|
||||
-
|
||||
-typedef union {
|
||||
- double a;
|
||||
- int b[2];
|
||||
-} c;
|
||||
-
|
||||
-double d(int e)
|
||||
-{
|
||||
- c f;
|
||||
- (&f)->b[0] = 15728640;
|
||||
- return e ? -(&f)->a : (&f)->a;
|
||||
-}
|
||||
diff --git a/gcc/testsuite/gcc.target/sparc/overflow-3.c b/gcc/testsuite/gcc.target/sparc/overflow-3.c
|
||||
index 52d6ab2b688..86dddfb09e6 100644
|
||||
--- a/gcc/testsuite/gcc.target/sparc/overflow-3.c
|
||||
+++ b/gcc/testsuite/gcc.target/sparc/overflow-3.c
|
||||
@@ -1,6 +1,6 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-require-effective-target lp64 } */
|
||||
-/* { dg-options "-O -fno-pie" } */
|
||||
+/* { dg-options "-O" } */
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
diff --git a/gcc/testsuite/gcc.target/sparc/overflow-4.c b/gcc/testsuite/gcc.target/sparc/overflow-4.c
|
||||
index c6121b958c3..019feee335c 100644
|
||||
--- a/gcc/testsuite/gcc.target/sparc/overflow-4.c
|
||||
+++ b/gcc/testsuite/gcc.target/sparc/overflow-4.c
|
||||
@@ -1,6 +1,6 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-require-effective-target lp64 } */
|
||||
-/* { dg-options "-O -fno-pie -mno-vis3 -mno-vis4" } */
|
||||
+/* { dg-options "-O -mno-vis3 -mno-vis4" } */
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
diff --git a/gcc/testsuite/gcc.target/sparc/overflow-5.c b/gcc/testsuite/gcc.target/sparc/overflow-5.c
|
||||
index f00283f6e7b..67d4ac38095 100644
|
||||
--- a/gcc/testsuite/gcc.target/sparc/overflow-5.c
|
||||
+++ b/gcc/testsuite/gcc.target/sparc/overflow-5.c
|
||||
@@ -1,6 +1,6 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-require-effective-target lp64 } */
|
||||
-/* { dg-options "-O -fno-pie -mvis3" } */
|
||||
+/* { dg-options "-O -mvis3" } */
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
--
|
||||
2.25.4
|
||||
|
||||
@@ -0,0 +1,322 @@
|
||||
From bb9b71752267444b4360442b89129bfc0ae938d3 Mon Sep 17 00:00:00 2001
|
||||
From: Romain Naour <romain.naour@gmail.com>
|
||||
Date: Wed, 20 Jan 2021 23:06:07 +0100
|
||||
Subject: [PATCH] Revert "re PR target/92095 (internal error with -O1
|
||||
-mcpu=niagara2 -fPIE)"
|
||||
|
||||
This reverts commit 3fcce773f0f914c0499b130c6e9efa0e45ee54a0.
|
||||
|
||||
Building the Buildroot defconfig qemu_sparc_ss10_defconfig using
|
||||
gcc 8.4, 9.3 and 10 produce a broken rootfs that trigger illegal
|
||||
instruction messages.
|
||||
|
||||
gcc 8.3, 9.2 are the latest working gcc version.
|
||||
git bisect between gcc 8.4 and 8.4 allowed to identify
|
||||
the commit that introcuce the regression.
|
||||
|
||||
Reverting this patch allowed to produce a working rootfs.
|
||||
|
||||
Signed-off-by: Romain Naour <romain.naour@gmail.com>
|
||||
Cc: Eric Botcazou <ebotcazou@gcc.gnu.org>
|
||||
---
|
||||
gcc/config/sparc/sparc-protos.h | 1 -
|
||||
gcc/config/sparc/sparc.c | 121 +++++++-----------
|
||||
gcc/config/sparc/sparc.md | 5 +-
|
||||
.../gcc.c-torture/compile/20191108-1.c | 14 --
|
||||
gcc/testsuite/gcc.target/sparc/overflow-3.c | 2 +-
|
||||
gcc/testsuite/gcc.target/sparc/overflow-4.c | 2 +-
|
||||
gcc/testsuite/gcc.target/sparc/overflow-5.c | 2 +-
|
||||
7 files changed, 53 insertions(+), 94 deletions(-)
|
||||
delete mode 100644 gcc/testsuite/gcc.c-torture/compile/20191108-1.c
|
||||
|
||||
diff --git a/gcc/config/sparc/sparc-protos.h b/gcc/config/sparc/sparc-protos.h
|
||||
index b3f73c2f2bf..71a067e871c 100644
|
||||
--- a/gcc/config/sparc/sparc-protos.h
|
||||
+++ b/gcc/config/sparc/sparc-protos.h
|
||||
@@ -69,7 +69,6 @@ extern void sparc_split_reg_mem (rtx, rtx, machine_mode);
|
||||
extern void sparc_split_mem_reg (rtx, rtx, machine_mode);
|
||||
extern int sparc_split_reg_reg_legitimate (rtx, rtx);
|
||||
extern void sparc_split_reg_reg (rtx, rtx, machine_mode);
|
||||
-extern const char *output_load_pcrel_sym (rtx *);
|
||||
extern const char *output_ubranch (rtx, rtx_insn *);
|
||||
extern const char *output_cbranch (rtx, rtx, int, int, int, rtx_insn *);
|
||||
extern const char *output_return (rtx_insn *);
|
||||
diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c
|
||||
index 73032d33596..db1b428db90 100644
|
||||
--- a/gcc/config/sparc/sparc.c
|
||||
+++ b/gcc/config/sparc/sparc.c
|
||||
@@ -4200,6 +4200,13 @@ eligible_for_sibcall_delay (rtx_insn *trial)
|
||||
static bool
|
||||
sparc_cannot_force_const_mem (machine_mode mode, rtx x)
|
||||
{
|
||||
+ /* After IRA has run in PIC mode, it is too late to put anything into the
|
||||
+ constant pool if the PIC register hasn't already been initialized. */
|
||||
+ if ((lra_in_progress || reload_in_progress)
|
||||
+ && flag_pic
|
||||
+ && !crtl->uses_pic_offset_table)
|
||||
+ return true;
|
||||
+
|
||||
switch (GET_CODE (x))
|
||||
{
|
||||
case CONST_INT:
|
||||
@@ -4235,11 +4242,9 @@ sparc_cannot_force_const_mem (machine_mode mode, rtx x)
|
||||
}
|
||||
|
||||
/* Global Offset Table support. */
|
||||
-static GTY(()) rtx got_symbol_rtx = NULL_RTX;
|
||||
-static GTY(()) rtx got_register_rtx = NULL_RTX;
|
||||
static GTY(()) rtx got_helper_rtx = NULL_RTX;
|
||||
-
|
||||
-static GTY(()) bool got_helper_needed = false;
|
||||
+static GTY(()) rtx got_register_rtx = NULL_RTX;
|
||||
+static GTY(()) rtx got_symbol_rtx = NULL_RTX;
|
||||
|
||||
/* Return the SYMBOL_REF for the Global Offset Table. */
|
||||
|
||||
@@ -4252,6 +4257,27 @@ sparc_got (void)
|
||||
return got_symbol_rtx;
|
||||
}
|
||||
|
||||
+#ifdef HAVE_GAS_HIDDEN
|
||||
+# define USE_HIDDEN_LINKONCE 1
|
||||
+#else
|
||||
+# define USE_HIDDEN_LINKONCE 0
|
||||
+#endif
|
||||
+
|
||||
+static void
|
||||
+get_pc_thunk_name (char name[32], unsigned int regno)
|
||||
+{
|
||||
+ const char *reg_name = reg_names[regno];
|
||||
+
|
||||
+ /* Skip the leading '%' as that cannot be used in a
|
||||
+ symbol name. */
|
||||
+ reg_name += 1;
|
||||
+
|
||||
+ if (USE_HIDDEN_LINKONCE)
|
||||
+ sprintf (name, "__sparc_get_pc_thunk.%s", reg_name);
|
||||
+ else
|
||||
+ ASM_GENERATE_INTERNAL_LABEL (name, "LADDPC", regno);
|
||||
+}
|
||||
+
|
||||
/* Wrapper around the load_pcrel_sym{si,di} patterns. */
|
||||
|
||||
static rtx
|
||||
@@ -4271,78 +4297,30 @@ gen_load_pcrel_sym (rtx op0, rtx op1, rtx op2)
|
||||
return insn;
|
||||
}
|
||||
|
||||
-/* Output the load_pcrel_sym{si,di} patterns. */
|
||||
-
|
||||
-const char *
|
||||
-output_load_pcrel_sym (rtx *operands)
|
||||
-{
|
||||
- if (flag_delayed_branch)
|
||||
- {
|
||||
- output_asm_insn ("sethi\t%%hi(%a1-4), %0", operands);
|
||||
- output_asm_insn ("call\t%a2", operands);
|
||||
- output_asm_insn (" add\t%0, %%lo(%a1+4), %0", operands);
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- output_asm_insn ("sethi\t%%hi(%a1-8), %0", operands);
|
||||
- output_asm_insn ("add\t%0, %%lo(%a1-4), %0", operands);
|
||||
- output_asm_insn ("call\t%a2", operands);
|
||||
- output_asm_insn (" nop", NULL);
|
||||
- }
|
||||
-
|
||||
- if (operands[2] == got_helper_rtx)
|
||||
- got_helper_needed = true;
|
||||
-
|
||||
- return "";
|
||||
-}
|
||||
-
|
||||
-#ifdef HAVE_GAS_HIDDEN
|
||||
-# define USE_HIDDEN_LINKONCE 1
|
||||
-#else
|
||||
-# define USE_HIDDEN_LINKONCE 0
|
||||
-#endif
|
||||
-
|
||||
/* Emit code to load the GOT register. */
|
||||
|
||||
void
|
||||
load_got_register (void)
|
||||
{
|
||||
- rtx insn;
|
||||
+ if (!got_register_rtx)
|
||||
+ got_register_rtx = gen_rtx_REG (Pmode, GLOBAL_OFFSET_TABLE_REGNUM);
|
||||
|
||||
if (TARGET_VXWORKS_RTP)
|
||||
- {
|
||||
- if (!got_register_rtx)
|
||||
- got_register_rtx = pic_offset_table_rtx;
|
||||
-
|
||||
- insn = gen_vxworks_load_got ();
|
||||
- }
|
||||
+ emit_insn (gen_vxworks_load_got ());
|
||||
else
|
||||
{
|
||||
- if (!got_register_rtx)
|
||||
- got_register_rtx = gen_rtx_REG (Pmode, GLOBAL_OFFSET_TABLE_REGNUM);
|
||||
-
|
||||
/* The GOT symbol is subject to a PC-relative relocation so we need a
|
||||
helper function to add the PC value and thus get the final value. */
|
||||
if (!got_helper_rtx)
|
||||
{
|
||||
char name[32];
|
||||
-
|
||||
- /* Skip the leading '%' as that cannot be used in a symbol name. */
|
||||
- if (USE_HIDDEN_LINKONCE)
|
||||
- sprintf (name, "__sparc_get_pc_thunk.%s",
|
||||
- reg_names[REGNO (got_register_rtx)] + 1);
|
||||
- else
|
||||
- ASM_GENERATE_INTERNAL_LABEL (name, "LADDPC",
|
||||
- REGNO (got_register_rtx));
|
||||
-
|
||||
+ get_pc_thunk_name (name, GLOBAL_OFFSET_TABLE_REGNUM);
|
||||
got_helper_rtx = gen_rtx_SYMBOL_REF (Pmode, ggc_strdup (name));
|
||||
}
|
||||
|
||||
- insn
|
||||
- = gen_load_pcrel_sym (got_register_rtx, sparc_got (), got_helper_rtx);
|
||||
+ emit_insn (gen_load_pcrel_sym (got_register_rtx, sparc_got (),
|
||||
+ got_helper_rtx));
|
||||
}
|
||||
-
|
||||
- emit_insn (insn);
|
||||
}
|
||||
|
||||
/* Ensure that we are not using patterns that are not OK with PIC. */
|
||||
@@ -5494,7 +5472,7 @@ save_local_or_in_reg_p (unsigned int regno, int leaf_function)
|
||||
return true;
|
||||
|
||||
/* GOT register (%l7) if needed. */
|
||||
- if (got_register_rtx && regno == REGNO (got_register_rtx))
|
||||
+ if (regno == GLOBAL_OFFSET_TABLE_REGNUM && got_register_rtx)
|
||||
return true;
|
||||
|
||||
/* If the function accesses prior frames, the frame pointer and the return
|
||||
@@ -12475,9 +12453,10 @@ static void
|
||||
sparc_file_end (void)
|
||||
{
|
||||
/* If we need to emit the special GOT helper function, do so now. */
|
||||
- if (got_helper_needed)
|
||||
+ if (got_helper_rtx)
|
||||
{
|
||||
const char *name = XSTR (got_helper_rtx, 0);
|
||||
+ const char *reg_name = reg_names[GLOBAL_OFFSET_TABLE_REGNUM];
|
||||
#ifdef DWARF2_UNWIND_INFO
|
||||
bool do_cfi;
|
||||
#endif
|
||||
@@ -12514,22 +12493,17 @@ sparc_file_end (void)
|
||||
#ifdef DWARF2_UNWIND_INFO
|
||||
do_cfi = dwarf2out_do_cfi_asm ();
|
||||
if (do_cfi)
|
||||
- output_asm_insn (".cfi_startproc", NULL);
|
||||
+ fprintf (asm_out_file, "\t.cfi_startproc\n");
|
||||
#endif
|
||||
if (flag_delayed_branch)
|
||||
- {
|
||||
- output_asm_insn ("jmp\t%%o7+8", NULL);
|
||||
- output_asm_insn (" add\t%%o7, %0, %0", &got_register_rtx);
|
||||
- }
|
||||
+ fprintf (asm_out_file, "\tjmp\t%%o7+8\n\t add\t%%o7, %s, %s\n",
|
||||
+ reg_name, reg_name);
|
||||
else
|
||||
- {
|
||||
- output_asm_insn ("add\t%%o7, %0, %0", &got_register_rtx);
|
||||
- output_asm_insn ("jmp\t%%o7+8", NULL);
|
||||
- output_asm_insn (" nop", NULL);
|
||||
- }
|
||||
+ fprintf (asm_out_file, "\tadd\t%%o7, %s, %s\n\tjmp\t%%o7+8\n\t nop\n",
|
||||
+ reg_name, reg_name);
|
||||
#ifdef DWARF2_UNWIND_INFO
|
||||
if (do_cfi)
|
||||
- output_asm_insn (".cfi_endproc", NULL);
|
||||
+ fprintf (asm_out_file, "\t.cfi_endproc\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -13035,10 +13009,7 @@ sparc_init_pic_reg (void)
|
||||
edge entry_edge;
|
||||
rtx_insn *seq;
|
||||
|
||||
- /* In PIC mode, we need to always initialize the PIC register if optimization
|
||||
- is enabled, because we are called from IRA and LRA may later force things
|
||||
- to the constant pool for optimization purposes. */
|
||||
- if (!flag_pic || (!crtl->uses_pic_offset_table && !optimize))
|
||||
+ if (!crtl->uses_pic_offset_table)
|
||||
return;
|
||||
|
||||
start_sequence ();
|
||||
diff --git a/gcc/config/sparc/sparc.md b/gcc/config/sparc/sparc.md
|
||||
index 468e2cc5d3b..25134bd1148 100644
|
||||
--- a/gcc/config/sparc/sparc.md
|
||||
+++ b/gcc/config/sparc/sparc.md
|
||||
@@ -1601,7 +1601,10 @@
|
||||
(clobber (reg:P O7_REG))]
|
||||
"REGNO (operands[0]) == INTVAL (operands[3])"
|
||||
{
|
||||
- return output_load_pcrel_sym (operands);
|
||||
+ if (flag_delayed_branch)
|
||||
+ return "sethi\t%%hi(%a1-4), %0\n\tcall\t%a2\n\t add\t%0, %%lo(%a1+4), %0";
|
||||
+ else
|
||||
+ return "sethi\t%%hi(%a1-8), %0\n\tadd\t%0, %%lo(%a1-4), %0\n\tcall\t%a2\n\t nop";
|
||||
}
|
||||
[(set (attr "type") (const_string "multi"))
|
||||
(set (attr "length")
|
||||
diff --git a/gcc/testsuite/gcc.c-torture/compile/20191108-1.c b/gcc/testsuite/gcc.c-torture/compile/20191108-1.c
|
||||
deleted file mode 100644
|
||||
index 7929751bb06..00000000000
|
||||
--- a/gcc/testsuite/gcc.c-torture/compile/20191108-1.c
|
||||
+++ /dev/null
|
||||
@@ -1,14 +0,0 @@
|
||||
-/* PR target/92095 */
|
||||
-/* Testcase by Sergei Trofimovich <slyfox@inbox.ru> */
|
||||
-
|
||||
-typedef union {
|
||||
- double a;
|
||||
- int b[2];
|
||||
-} c;
|
||||
-
|
||||
-double d(int e)
|
||||
-{
|
||||
- c f;
|
||||
- (&f)->b[0] = 15728640;
|
||||
- return e ? -(&f)->a : (&f)->a;
|
||||
-}
|
||||
diff --git a/gcc/testsuite/gcc.target/sparc/overflow-3.c b/gcc/testsuite/gcc.target/sparc/overflow-3.c
|
||||
index 18253bb6e5e..8cb24f52f7b 100644
|
||||
--- a/gcc/testsuite/gcc.target/sparc/overflow-3.c
|
||||
+++ b/gcc/testsuite/gcc.target/sparc/overflow-3.c
|
||||
@@ -1,5 +1,5 @@
|
||||
/* { dg-do compile } */
|
||||
-/* { dg-options "-O -fno-pie" } */
|
||||
+/* { dg-options "-O" } */
|
||||
/* { dg-require-effective-target lp64 } */
|
||||
|
||||
#include <stdbool.h>
|
||||
diff --git a/gcc/testsuite/gcc.target/sparc/overflow-4.c b/gcc/testsuite/gcc.target/sparc/overflow-4.c
|
||||
index fb30877efb9..868edea2b9e 100644
|
||||
--- a/gcc/testsuite/gcc.target/sparc/overflow-4.c
|
||||
+++ b/gcc/testsuite/gcc.target/sparc/overflow-4.c
|
||||
@@ -1,5 +1,5 @@
|
||||
/* { dg-do compile } */
|
||||
-/* { dg-options "-O -fno-pie -mno-vis3" } */
|
||||
+/* { dg-options "-O -mno-vis3" } */
|
||||
/* { dg-require-effective-target lp64 } */
|
||||
|
||||
#include <stdbool.h>
|
||||
diff --git a/gcc/testsuite/gcc.target/sparc/overflow-5.c b/gcc/testsuite/gcc.target/sparc/overflow-5.c
|
||||
index 509d957715d..501ce04f7a1 100644
|
||||
--- a/gcc/testsuite/gcc.target/sparc/overflow-5.c
|
||||
+++ b/gcc/testsuite/gcc.target/sparc/overflow-5.c
|
||||
@@ -1,5 +1,5 @@
|
||||
/* { dg-do compile } */
|
||||
-/* { dg-options "-O -fno-pie -mvis3" } */
|
||||
+/* { dg-options "-O -mvis3" } */
|
||||
/* { dg-require-effective-target lp64 } */
|
||||
|
||||
#include <stdbool.h>
|
||||
--
|
||||
2.25.4
|
||||
|
||||
@@ -0,0 +1,325 @@
|
||||
From 0d7fe4806d9dce76367c193d5199df6a2b98009f Mon Sep 17 00:00:00 2001
|
||||
From: Romain Naour <romain.naour@gmail.com>
|
||||
Date: Wed, 20 Jan 2021 23:22:16 +0100
|
||||
Subject: [PATCH] Revert "re PR target/92095 (internal error with -O1
|
||||
-mcpu=niagara2 -fPIE)"
|
||||
|
||||
This reverts commit 6bf2990842388101897b6f465524cbc295ee8cf9.
|
||||
|
||||
Building the Buildroot defconfig qemu_sparc_ss10_defconfig using
|
||||
gcc 8.4, 9.3 and 10 produce a broken rootfs that trigger illegal
|
||||
instruction messages.
|
||||
|
||||
gcc 8.3, 9.2 are the latest working gcc version.
|
||||
git bisect between gcc 8.4 and 8.4 allowed to identify
|
||||
the commit that introcuce the regression.
|
||||
|
||||
Reverting this patch allowed to produce a working rootfs.
|
||||
|
||||
Signed-off-by: Romain Naour <romain.naour@gmail.com>
|
||||
Cc: Eric Botcazou <ebotcazou@gcc.gnu.org>
|
||||
---
|
||||
gcc/config/sparc/sparc-protos.h | 1 -
|
||||
gcc/config/sparc/sparc.c | 121 +++++++-----------
|
||||
gcc/config/sparc/sparc.md | 5 +-
|
||||
.../gcc.c-torture/compile/20191108-1.c | 14 --
|
||||
gcc/testsuite/gcc.target/sparc/overflow-3.c | 2 +-
|
||||
gcc/testsuite/gcc.target/sparc/overflow-4.c | 2 +-
|
||||
gcc/testsuite/gcc.target/sparc/overflow-5.c | 2 +-
|
||||
7 files changed, 53 insertions(+), 94 deletions(-)
|
||||
delete mode 100644 gcc/testsuite/gcc.c-torture/compile/20191108-1.c
|
||||
|
||||
diff --git a/gcc/config/sparc/sparc-protos.h b/gcc/config/sparc/sparc-protos.h
|
||||
index ef1adb69ede..9bdae7b9faa 100644
|
||||
--- a/gcc/config/sparc/sparc-protos.h
|
||||
+++ b/gcc/config/sparc/sparc-protos.h
|
||||
@@ -69,7 +69,6 @@ extern void sparc_split_reg_mem (rtx, rtx, machine_mode);
|
||||
extern void sparc_split_mem_reg (rtx, rtx, machine_mode);
|
||||
extern int sparc_split_reg_reg_legitimate (rtx, rtx);
|
||||
extern void sparc_split_reg_reg (rtx, rtx, machine_mode);
|
||||
-extern const char *output_load_pcrel_sym (rtx *);
|
||||
extern const char *output_ubranch (rtx, rtx_insn *);
|
||||
extern const char *output_cbranch (rtx, rtx, int, int, int, rtx_insn *);
|
||||
extern const char *output_return (rtx_insn *);
|
||||
diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c
|
||||
index a993aab7639..2974d174e93 100644
|
||||
--- a/gcc/config/sparc/sparc.c
|
||||
+++ b/gcc/config/sparc/sparc.c
|
||||
@@ -4205,6 +4205,13 @@ eligible_for_sibcall_delay (rtx_insn *trial)
|
||||
static bool
|
||||
sparc_cannot_force_const_mem (machine_mode mode, rtx x)
|
||||
{
|
||||
+ /* After IRA has run in PIC mode, it is too late to put anything into the
|
||||
+ constant pool if the PIC register hasn't already been initialized. */
|
||||
+ if ((lra_in_progress || reload_in_progress)
|
||||
+ && flag_pic
|
||||
+ && !crtl->uses_pic_offset_table)
|
||||
+ return true;
|
||||
+
|
||||
switch (GET_CODE (x))
|
||||
{
|
||||
case CONST_INT:
|
||||
@@ -4240,11 +4247,9 @@ sparc_cannot_force_const_mem (machine_mode mode, rtx x)
|
||||
}
|
||||
|
||||
/* Global Offset Table support. */
|
||||
-static GTY(()) rtx got_symbol_rtx = NULL_RTX;
|
||||
-static GTY(()) rtx got_register_rtx = NULL_RTX;
|
||||
static GTY(()) rtx got_helper_rtx = NULL_RTX;
|
||||
-
|
||||
-static GTY(()) bool got_helper_needed = false;
|
||||
+static GTY(()) rtx got_register_rtx = NULL_RTX;
|
||||
+static GTY(()) rtx got_symbol_rtx = NULL_RTX;
|
||||
|
||||
/* Return the SYMBOL_REF for the Global Offset Table. */
|
||||
|
||||
@@ -4257,6 +4262,27 @@ sparc_got (void)
|
||||
return got_symbol_rtx;
|
||||
}
|
||||
|
||||
+#ifdef HAVE_GAS_HIDDEN
|
||||
+# define USE_HIDDEN_LINKONCE 1
|
||||
+#else
|
||||
+# define USE_HIDDEN_LINKONCE 0
|
||||
+#endif
|
||||
+
|
||||
+static void
|
||||
+get_pc_thunk_name (char name[32], unsigned int regno)
|
||||
+{
|
||||
+ const char *reg_name = reg_names[regno];
|
||||
+
|
||||
+ /* Skip the leading '%' as that cannot be used in a
|
||||
+ symbol name. */
|
||||
+ reg_name += 1;
|
||||
+
|
||||
+ if (USE_HIDDEN_LINKONCE)
|
||||
+ sprintf (name, "__sparc_get_pc_thunk.%s", reg_name);
|
||||
+ else
|
||||
+ ASM_GENERATE_INTERNAL_LABEL (name, "LADDPC", regno);
|
||||
+}
|
||||
+
|
||||
/* Wrapper around the load_pcrel_sym{si,di} patterns. */
|
||||
|
||||
static rtx
|
||||
@@ -4276,78 +4302,30 @@ gen_load_pcrel_sym (rtx op0, rtx op1, rtx op2)
|
||||
return insn;
|
||||
}
|
||||
|
||||
-/* Output the load_pcrel_sym{si,di} patterns. */
|
||||
-
|
||||
-const char *
|
||||
-output_load_pcrel_sym (rtx *operands)
|
||||
-{
|
||||
- if (flag_delayed_branch)
|
||||
- {
|
||||
- output_asm_insn ("sethi\t%%hi(%a1-4), %0", operands);
|
||||
- output_asm_insn ("call\t%a2", operands);
|
||||
- output_asm_insn (" add\t%0, %%lo(%a1+4), %0", operands);
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- output_asm_insn ("sethi\t%%hi(%a1-8), %0", operands);
|
||||
- output_asm_insn ("add\t%0, %%lo(%a1-4), %0", operands);
|
||||
- output_asm_insn ("call\t%a2", operands);
|
||||
- output_asm_insn (" nop", NULL);
|
||||
- }
|
||||
-
|
||||
- if (operands[2] == got_helper_rtx)
|
||||
- got_helper_needed = true;
|
||||
-
|
||||
- return "";
|
||||
-}
|
||||
-
|
||||
-#ifdef HAVE_GAS_HIDDEN
|
||||
-# define USE_HIDDEN_LINKONCE 1
|
||||
-#else
|
||||
-# define USE_HIDDEN_LINKONCE 0
|
||||
-#endif
|
||||
-
|
||||
/* Emit code to load the GOT register. */
|
||||
|
||||
void
|
||||
load_got_register (void)
|
||||
{
|
||||
- rtx insn;
|
||||
+ if (!got_register_rtx)
|
||||
+ got_register_rtx = gen_rtx_REG (Pmode, GLOBAL_OFFSET_TABLE_REGNUM);
|
||||
|
||||
if (TARGET_VXWORKS_RTP)
|
||||
- {
|
||||
- if (!got_register_rtx)
|
||||
- got_register_rtx = pic_offset_table_rtx;
|
||||
-
|
||||
- insn = gen_vxworks_load_got ();
|
||||
- }
|
||||
+ emit_insn (gen_vxworks_load_got ());
|
||||
else
|
||||
{
|
||||
- if (!got_register_rtx)
|
||||
- got_register_rtx = gen_rtx_REG (Pmode, GLOBAL_OFFSET_TABLE_REGNUM);
|
||||
-
|
||||
/* The GOT symbol is subject to a PC-relative relocation so we need a
|
||||
helper function to add the PC value and thus get the final value. */
|
||||
if (!got_helper_rtx)
|
||||
{
|
||||
char name[32];
|
||||
-
|
||||
- /* Skip the leading '%' as that cannot be used in a symbol name. */
|
||||
- if (USE_HIDDEN_LINKONCE)
|
||||
- sprintf (name, "__sparc_get_pc_thunk.%s",
|
||||
- reg_names[REGNO (got_register_rtx)] + 1);
|
||||
- else
|
||||
- ASM_GENERATE_INTERNAL_LABEL (name, "LADDPC",
|
||||
- REGNO (got_register_rtx));
|
||||
-
|
||||
+ get_pc_thunk_name (name, GLOBAL_OFFSET_TABLE_REGNUM);
|
||||
got_helper_rtx = gen_rtx_SYMBOL_REF (Pmode, ggc_strdup (name));
|
||||
}
|
||||
|
||||
- insn
|
||||
- = gen_load_pcrel_sym (got_register_rtx, sparc_got (), got_helper_rtx);
|
||||
+ emit_insn (gen_load_pcrel_sym (got_register_rtx, sparc_got (),
|
||||
+ got_helper_rtx));
|
||||
}
|
||||
-
|
||||
- emit_insn (insn);
|
||||
}
|
||||
|
||||
/* Ensure that we are not using patterns that are not OK with PIC. */
|
||||
@@ -5512,7 +5490,7 @@ save_local_or_in_reg_p (unsigned int regno, int leaf_function)
|
||||
return true;
|
||||
|
||||
/* GOT register (%l7) if needed. */
|
||||
- if (got_register_rtx && regno == REGNO (got_register_rtx))
|
||||
+ if (regno == GLOBAL_OFFSET_TABLE_REGNUM && got_register_rtx)
|
||||
return true;
|
||||
|
||||
/* If the function accesses prior frames, the frame pointer and the return
|
||||
@@ -12555,9 +12533,10 @@ static void
|
||||
sparc_file_end (void)
|
||||
{
|
||||
/* If we need to emit the special GOT helper function, do so now. */
|
||||
- if (got_helper_needed)
|
||||
+ if (got_helper_rtx)
|
||||
{
|
||||
const char *name = XSTR (got_helper_rtx, 0);
|
||||
+ const char *reg_name = reg_names[GLOBAL_OFFSET_TABLE_REGNUM];
|
||||
#ifdef DWARF2_UNWIND_INFO
|
||||
bool do_cfi;
|
||||
#endif
|
||||
@@ -12594,22 +12573,17 @@ sparc_file_end (void)
|
||||
#ifdef DWARF2_UNWIND_INFO
|
||||
do_cfi = dwarf2out_do_cfi_asm ();
|
||||
if (do_cfi)
|
||||
- output_asm_insn (".cfi_startproc", NULL);
|
||||
+ fprintf (asm_out_file, "\t.cfi_startproc\n");
|
||||
#endif
|
||||
if (flag_delayed_branch)
|
||||
- {
|
||||
- output_asm_insn ("jmp\t%%o7+8", NULL);
|
||||
- output_asm_insn (" add\t%%o7, %0, %0", &got_register_rtx);
|
||||
- }
|
||||
+ fprintf (asm_out_file, "\tjmp\t%%o7+8\n\t add\t%%o7, %s, %s\n",
|
||||
+ reg_name, reg_name);
|
||||
else
|
||||
- {
|
||||
- output_asm_insn ("add\t%%o7, %0, %0", &got_register_rtx);
|
||||
- output_asm_insn ("jmp\t%%o7+8", NULL);
|
||||
- output_asm_insn (" nop", NULL);
|
||||
- }
|
||||
+ fprintf (asm_out_file, "\tadd\t%%o7, %s, %s\n\tjmp\t%%o7+8\n\t nop\n",
|
||||
+ reg_name, reg_name);
|
||||
#ifdef DWARF2_UNWIND_INFO
|
||||
if (do_cfi)
|
||||
- output_asm_insn (".cfi_endproc", NULL);
|
||||
+ fprintf (asm_out_file, "\t.cfi_endproc\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -13115,10 +13089,7 @@ sparc_init_pic_reg (void)
|
||||
edge entry_edge;
|
||||
rtx_insn *seq;
|
||||
|
||||
- /* In PIC mode, we need to always initialize the PIC register if optimization
|
||||
- is enabled, because we are called from IRA and LRA may later force things
|
||||
- to the constant pool for optimization purposes. */
|
||||
- if (!flag_pic || (!crtl->uses_pic_offset_table && !optimize))
|
||||
+ if (!crtl->uses_pic_offset_table)
|
||||
return;
|
||||
|
||||
start_sequence ();
|
||||
diff --git a/gcc/config/sparc/sparc.md b/gcc/config/sparc/sparc.md
|
||||
index 0a6e27ffa83..7af62d599b9 100644
|
||||
--- a/gcc/config/sparc/sparc.md
|
||||
+++ b/gcc/config/sparc/sparc.md
|
||||
@@ -1604,7 +1604,10 @@
|
||||
(clobber (reg:P O7_REG))]
|
||||
"REGNO (operands[0]) == INTVAL (operands[3])"
|
||||
{
|
||||
- return output_load_pcrel_sym (operands);
|
||||
+ if (flag_delayed_branch)
|
||||
+ return "sethi\t%%hi(%a1-4), %0\n\tcall\t%a2\n\t add\t%0, %%lo(%a1+4), %0";
|
||||
+ else
|
||||
+ return "sethi\t%%hi(%a1-8), %0\n\tadd\t%0, %%lo(%a1-4), %0\n\tcall\t%a2\n\t nop";
|
||||
}
|
||||
[(set (attr "type") (const_string "multi"))
|
||||
(set (attr "length")
|
||||
diff --git a/gcc/testsuite/gcc.c-torture/compile/20191108-1.c b/gcc/testsuite/gcc.c-torture/compile/20191108-1.c
|
||||
deleted file mode 100644
|
||||
index 7929751bb06..00000000000
|
||||
--- a/gcc/testsuite/gcc.c-torture/compile/20191108-1.c
|
||||
+++ /dev/null
|
||||
@@ -1,14 +0,0 @@
|
||||
-/* PR target/92095 */
|
||||
-/* Testcase by Sergei Trofimovich <slyfox@inbox.ru> */
|
||||
-
|
||||
-typedef union {
|
||||
- double a;
|
||||
- int b[2];
|
||||
-} c;
|
||||
-
|
||||
-double d(int e)
|
||||
-{
|
||||
- c f;
|
||||
- (&f)->b[0] = 15728640;
|
||||
- return e ? -(&f)->a : (&f)->a;
|
||||
-}
|
||||
diff --git a/gcc/testsuite/gcc.target/sparc/overflow-3.c b/gcc/testsuite/gcc.target/sparc/overflow-3.c
|
||||
index 52d6ab2b688..86dddfb09e6 100644
|
||||
--- a/gcc/testsuite/gcc.target/sparc/overflow-3.c
|
||||
+++ b/gcc/testsuite/gcc.target/sparc/overflow-3.c
|
||||
@@ -1,6 +1,6 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-require-effective-target lp64 } */
|
||||
-/* { dg-options "-O -fno-pie" } */
|
||||
+/* { dg-options "-O" } */
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
diff --git a/gcc/testsuite/gcc.target/sparc/overflow-4.c b/gcc/testsuite/gcc.target/sparc/overflow-4.c
|
||||
index c6121b958c3..019feee335c 100644
|
||||
--- a/gcc/testsuite/gcc.target/sparc/overflow-4.c
|
||||
+++ b/gcc/testsuite/gcc.target/sparc/overflow-4.c
|
||||
@@ -1,6 +1,6 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-require-effective-target lp64 } */
|
||||
-/* { dg-options "-O -fno-pie -mno-vis3 -mno-vis4" } */
|
||||
+/* { dg-options "-O -mno-vis3 -mno-vis4" } */
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
diff --git a/gcc/testsuite/gcc.target/sparc/overflow-5.c b/gcc/testsuite/gcc.target/sparc/overflow-5.c
|
||||
index f00283f6e7b..67d4ac38095 100644
|
||||
--- a/gcc/testsuite/gcc.target/sparc/overflow-5.c
|
||||
+++ b/gcc/testsuite/gcc.target/sparc/overflow-5.c
|
||||
@@ -1,6 +1,6 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-require-effective-target lp64 } */
|
||||
-/* { dg-options "-O -fno-pie -mvis3" } */
|
||||
+/* { dg-options "-O -mvis3" } */
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
--
|
||||
2.25.4
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
From 0ac781b0b0deef5c02c32a70ac484f882c3f4dd0 Mon Sep 17 00:00:00 2001
|
||||
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
Date: Tue, 24 Dec 2019 18:55:57 +0100
|
||||
Subject: [PATCH] fix matroska build without js, taglib or atrailers
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
i2i function is used in matroska_handler.cc but this function is defined
|
||||
only if defined(HAVE_JS) || defined(HAVE_TAGLIB) || defined(ATRAILERS)
|
||||
as a result compilation fails if HAVE_MATROSKA is set but HAVE_JS,
|
||||
HAVE_TAGLIG or ATRAILERS are not.
|
||||
|
||||
Backported from: 0ac781b0b0deef5c02c32a70ac484f882c3f4dd0
|
||||
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
|
||||
---
|
||||
src/string_converter.cc | 2 +-
|
||||
src/string_converter.h | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/string_converter.cc b/src/string_converter.cc
|
||||
index f669c661..7a3c55d7 100644
|
||||
--- a/src/string_converter.cc
|
||||
+++ b/src/string_converter.cc
|
||||
@@ -218,7 +218,7 @@ Ref<StringConverter> StringConverter::p2i()
|
||||
}
|
||||
#endif
|
||||
|
||||
-#if defined(HAVE_JS) || defined(HAVE_TAGLIB) || defined(ATRAILERS)
|
||||
+#if defined(HAVE_JS) || defined(HAVE_TAGLIB) || defined(ATRAILERS) || defined(HAVE_MATROSKA)
|
||||
|
||||
Ref<StringConverter> StringConverter::i2i()
|
||||
{
|
||||
diff --git a/src/string_converter.h b/src/string_converter.h
|
||||
index 58495430..f75bf833 100644
|
||||
--- a/src/string_converter.h
|
||||
+++ b/src/string_converter.h
|
||||
@@ -65,7 +65,7 @@ public:
|
||||
static zmm::Ref<StringConverter> p2i();
|
||||
|
||||
#endif
|
||||
-#if defined(HAVE_JS) || defined(HAVE_TAGLIB) || defined(ATRAILERS)
|
||||
+#if defined(HAVE_JS) || defined(HAVE_TAGLIB) || defined(ATRAILERS) || defined(HAVE_MATROSKA)
|
||||
/// \brief safeguard - internal to internal - needed to catch some
|
||||
/// scenarious where the user may have forgotten to add proper conversion
|
||||
/// in the script.
|
||||
--
|
||||
2.26.1
|
||||
|
||||
@@ -1,63 +0,0 @@
|
||||
From 7fdcabd80c823694d190e5baa8c657ffcae5e777 Mon Sep 17 00:00:00 2001
|
||||
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
Date: Fri, 31 Jan 2020 17:14:11 +0100
|
||||
Subject: [PATCH] cmake/FindLibMagic.cmake: fix static linking
|
||||
|
||||
libmagic can optionally depends on xz (for lzma) or bzip2 since version
|
||||
5.38 and
|
||||
https://github.com/file/file/commit/b259a07ea95827f565faa20f0316e5b2704064f7
|
||||
so use pkg-config to retrieve those static dependencies and avoid the
|
||||
following build failure:
|
||||
|
||||
[100%] Linking CXX executable gerbera
|
||||
/home/br-user/autobuild/run/instance-0/output-1/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/8.3.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: /home/br-user/autobuild/run/instance-0/output-1/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libmagic.a(compress.o): in function `uncompressbuf':
|
||||
compress.c:(.text+0x69c): undefined reference to `BZ2_bzDecompressInit'
|
||||
/home/br-user/autobuild/run/instance-0/output-1/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/8.3.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: compress.c:(.text+0x710): undefined reference to `BZ2_bzDecompress'
|
||||
/home/br-user/autobuild/run/instance-0/output-1/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/8.3.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: compress.c:(.text+0x730): undefined reference to `BZ2_bzDecompressEnd'
|
||||
/home/br-user/autobuild/run/instance-0/output-1/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/8.3.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: compress.c:(.text+0x7bc): undefined reference to `lzma_auto_decoder'
|
||||
/home/br-user/autobuild/run/instance-0/output-1/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/8.3.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: compress.c:(.text+0x828): undefined reference to `lzma_code'
|
||||
/home/br-user/autobuild/run/instance-0/output-1/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/8.3.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: compress.c:(.text+0x848): undefined reference to `lzma_end'
|
||||
|
||||
It should be noted that libmagic.pc is not currently provided in the
|
||||
official file package (which provides libmagic), an issue has been
|
||||
opened to add libmagic.pc: https://bugs.astron.com/view.php?id=136
|
||||
|
||||
Fixes:
|
||||
- http://autobuild.buildroot.org/results/37b1ef54dc41100689f311fbc31fc9300dc6ae63
|
||||
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
[Retrieved from:
|
||||
https://github.com/gerbera/gerbera/commit/7fdcabd80c823694d190e5baa8c657ffcae5e777]
|
||||
---
|
||||
cmake/FindLibMagic.cmake | 15 +++++++++++++--
|
||||
1 file changed, 13 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/cmake/FindLibMagic.cmake b/cmake/FindLibMagic.cmake
|
||||
index f68ab923..04995af4 100644
|
||||
--- a/cmake/FindLibMagic.cmake
|
||||
+++ b/cmake/FindLibMagic.cmake
|
||||
@@ -1,11 +1,22 @@
|
||||
INCLUDE (FindPackageHandleStandardArgs)
|
||||
|
||||
-FIND_PATH(MAGIC_INCLUDE_DIR magic.h)
|
||||
-FIND_LIBRARY(MAGIC_LIBRARIES NAMES magic)
|
||||
+find_package(PkgConfig QUIET)
|
||||
+
|
||||
+pkg_check_modules(PC_MAGIC QUIET libmagic)
|
||||
+
|
||||
+FIND_PATH(MAGIC_INCLUDE_DIR magic.h
|
||||
+ HINTS ${PC_MAGIC_INCLUDEDIR} ${PC_MAGIC_INCLUDE_DIRS})
|
||||
+FIND_LIBRARY(MAGIC_LIBRARIES NAMES magic
|
||||
+ HINTS ${PC_MAGIC_LIBDIR} ${PC_MAGIC_LIBRARY_DIRS})
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set MAGIC_FOUND to TRUE
|
||||
find_package_handle_standard_args(MAGIC DEFAULT_MSG MAGIC_LIBRARIES)
|
||||
|
||||
+if (MAGIC_FOUND)
|
||||
+ set (MAGIC_LIBRARIES ${MAGIC_LIBRARY} ${PC_MAGIC_LIBRARIES})
|
||||
+ set (MAGIC_INCLUDE_DIRS ${MAGIC_INCLUDE_DIR} )
|
||||
+endif ()
|
||||
+
|
||||
MARK_AS_ADVANCED(
|
||||
MAGIC_LIBRARIES
|
||||
MAGIC_INCLUDE_DIRS )
|
||||
@@ -1,37 +0,0 @@
|
||||
From aab2eacbaad10759294f4fd74bbb5ecef3cf3a8d Mon Sep 17 00:00:00 2001
|
||||
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
Date: Tue, 24 Dec 2019 22:57:18 +0100
|
||||
Subject: [PATCH] cmake/FindMatroska: fix static linking
|
||||
|
||||
Fix static linking with libmatrasoka by adding PC_EBM_LIBRARIES to
|
||||
EBML_LIBRARIES and PC_MAT_LIBRARIES to MATROSKA_LIBRARIES
|
||||
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
[Retrieved from:
|
||||
https://github.com/gerbera/gerbera/commit/aab2eacbaad10759294f4fd74bbb5ecef3cf3a8d]
|
||||
---
|
||||
cmake/FindMatroska.cmake | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/cmake/FindMatroska.cmake b/cmake/FindMatroska.cmake
|
||||
index 4b09a5ec..12ca593d 100644
|
||||
--- a/cmake/FindMatroska.cmake
|
||||
+++ b/cmake/FindMatroska.cmake
|
||||
@@ -23,7 +23,7 @@ FIND_LIBRARY(EBML_LIBRARY ebml
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(EBML
|
||||
REQUIRED_VARS EBML_LIBRARY EBML_INCLUDE_DIR)
|
||||
if (EBML_FOUND)
|
||||
- set (EBML_LIBRARIES ${EBML_LIBRARY})
|
||||
+ set (EBML_LIBRARIES ${EBML_LIBRARY} ${PC_EBM_LIBRARIES})
|
||||
set (EBML_INCLUDE_DIRS ${EBML_INCLUDE_DIR} )
|
||||
endif ()
|
||||
MARK_AS_ADVANCED(
|
||||
@@ -41,7 +41,7 @@ find_library(MATROSKA_LIBRARY matroska
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(MATROSKA
|
||||
REQUIRED_VARS MATROSKA_LIBRARY MATROSKA_INCLUDE_DIR)
|
||||
if (MATROSKA_FOUND)
|
||||
- set (MATROSKA_LIBRARIES ${MATROSKA_LIBRARY})
|
||||
+ set (MATROSKA_LIBRARIES ${MATROSKA_LIBRARY} ${PC_MAT_LIBRARIES})
|
||||
set (MATROSKA_INCLUDE_DIRS ${MATROSKA_INCLUDE_DIR} )
|
||||
endif ()
|
||||
MARK_AS_ADVANCED(
|
||||
@@ -3,12 +3,15 @@ config BR2_PACKAGE_GERBERA
|
||||
depends on BR2_USE_MMU # fork()
|
||||
depends on BR2_TOOLCHAIN_HAS_ATOMIC
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS
|
||||
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_7 # C++17 optional
|
||||
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_8 # C++17 filesystem
|
||||
depends on BR2_INSTALL_LIBSTDCPP
|
||||
depends on !BR2_PACKAGE_LIBUPNP # libupnp18
|
||||
select BR2_PACKAGE_EXPAT
|
||||
depends on BR2_USE_WCHAR # fmt
|
||||
select BR2_PACKAGE_FMT
|
||||
select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
|
||||
select BR2_PACKAGE_LIBUPNP18
|
||||
select BR2_PACKAGE_LIBUPNP if !BR2_PACKAGE_LIBNPUPNP
|
||||
select BR2_PACKAGE_PUGIXML
|
||||
select BR2_PACKAGE_PUGIXML_XPATH_SUPPORT
|
||||
select BR2_PACKAGE_SPDLOG
|
||||
select BR2_PACKAGE_SQLITE
|
||||
select BR2_PACKAGE_UTIL_LINUX
|
||||
select BR2_PACKAGE_UTIL_LINUX_LIBUUID
|
||||
@@ -19,9 +22,8 @@ config BR2_PACKAGE_GERBERA
|
||||
|
||||
https://gerbera.io
|
||||
|
||||
comment "gerbera needs a toolchain w/ C++, threads, gcc >= 7"
|
||||
comment "gerbera needs a toolchain w/ C++, threads, wchar, gcc >= 8"
|
||||
depends on BR2_USE_MMU
|
||||
depends on BR2_TOOLCHAIN_HAS_ATOMIC
|
||||
depends on !BR2_PACKAGE_LIBUPNP
|
||||
depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || \
|
||||
!BR2_TOOLCHAIN_GCC_AT_LEAST_7
|
||||
!BR2_USE_WCHAR || !BR2_TOOLCHAIN_GCC_AT_LEAST_8
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
# Locally computed:
|
||||
sha256 904a9031c85ac805e4c139f363510226952683d7257acd1dee25ba1e97fd7651 gerbera-1.4.0.tar.gz
|
||||
sha256 cae4138373be41fd2be75faf41ce7efbcf49fb17d0e05ad1c51cc01ac335b9b6 LICENSE.md
|
||||
sha256 cbe7ea78977db8c02fcca1759ed149f199a590afaf4a6d21ffcca8623d1a0cc5 gerbera-1.6.4.tar.gz
|
||||
sha256 cae4138373be41fd2be75faf41ce7efbcf49fb17d0e05ad1c51cc01ac335b9b6 LICENSE.md
|
||||
|
||||
@@ -4,14 +4,15 @@
|
||||
#
|
||||
################################################################################
|
||||
|
||||
GERBERA_VERSION = 1.4.0
|
||||
GERBERA_VERSION = 1.6.4
|
||||
GERBERA_SITE = $(call github,gerbera,gerbera,v$(GERBERA_VERSION))
|
||||
GERBERA_LICENSE = GPL-2.0
|
||||
GERBERA_LICENSE_FILES = LICENSE.md
|
||||
GERBERA_DEPENDENCIES = \
|
||||
expat \
|
||||
fmt \
|
||||
host-pkgconf \
|
||||
libupnp18 \
|
||||
pugixml \
|
||||
spdlog \
|
||||
sqlite \
|
||||
util-linux \
|
||||
zlib
|
||||
@@ -70,6 +71,15 @@ else
|
||||
GERBERA_CONF_OPTS += -DWITH_MATROSKA=OFF
|
||||
endif
|
||||
|
||||
# Either libupnp or libnpupnp are guranteed to be enabled
|
||||
ifeq ($(BR2_PACKAGE_LIBNPUPNP),y)
|
||||
GERBERA_DEPENDENCIES += libnpupnp
|
||||
GERBERA_CONF_OPTS += -DWITH_NPUPNP=ON
|
||||
else
|
||||
GERBERA_DEPENDENCIES += libupnp
|
||||
GERBERA_CONF_OPTS += -DWITH_NPUPNP=OFF
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_MYSQL),y)
|
||||
GERBERA_DEPENDENCIES += mysql
|
||||
GERBERA_CONF_OPTS += -DWITH_MYSQL=ON
|
||||
|
||||
13
package/glibc/0001-disable-gcc-check.patch
Normal file
13
package/glibc/0001-disable-gcc-check.patch
Normal file
@@ -0,0 +1,13 @@
|
||||
diff -urN glibc-2.19.old/configure glibc-2.19/configure
|
||||
--- a/configure 2014-02-07 10:04:38.000000000 +0100
|
||||
+++ b/configure 2021-02-02 21:40:26.394577004 +0100
|
||||
@@ -4719,7 +4719,7 @@
|
||||
$as_echo "$ac_prog_version" >&6; }
|
||||
fi
|
||||
if test $ac_verc_fail = yes; then
|
||||
- critic_missing="$critic_missing gcc"
|
||||
+ echo "Ignorning failed GCC check"
|
||||
fi
|
||||
|
||||
for ac_prog in gnumake gmake make
|
||||
|
||||
54
package/glibc/0002-arm-build.patch
Normal file
54
package/glibc/0002-arm-build.patch
Normal file
@@ -0,0 +1,54 @@
|
||||
From 175cef4163dd60f95106cfd5f593b8a4e09d02c9 Mon Sep 17 00:00:00 2001
|
||||
From: Joseph Myers <joseph@codesourcery.com>
|
||||
Date: Tue, 20 May 2014 21:27:13 +0000
|
||||
Subject: [PATCH] Fix ARM build with GCC trunk.
|
||||
|
||||
sysdeps/unix/sysv/linux/arm/unwind-resume.c and
|
||||
ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c have static
|
||||
variables that are written in C code but only read from toplevel asms.
|
||||
Current GCC trunk now optimizes away such apparently write-only static
|
||||
variables, so causing a build failure. This patch marks those
|
||||
variables with __attribute_used__ to avoid that optimization.
|
||||
|
||||
Tested that this fixes the build for ARM.
|
||||
|
||||
* ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c
|
||||
(libgcc_s_resume): Use __attribute_used__.
|
||||
* sysdeps/unix/sysv/linux/arm/unwind-resume.c (libgcc_s_resume):
|
||||
Likewise.
|
||||
---
|
||||
ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c | 3 ++-
|
||||
sysdeps/unix/sysv/linux/arm/unwind-resume.c | 3 ++-
|
||||
3 files changed, 11 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c
|
||||
index 6ccd9b43a1..660d1488e1 100644
|
||||
--- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c
|
||||
+++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c
|
||||
@@ -22,7 +22,8 @@
|
||||
#include <pthreadP.h>
|
||||
|
||||
static void *libgcc_s_handle;
|
||||
-static void (*libgcc_s_resume) (struct _Unwind_Exception *exc);
|
||||
+static void (*libgcc_s_resume) (struct _Unwind_Exception *exc)
|
||||
+ __attribute_used__;
|
||||
static _Unwind_Reason_Code (*libgcc_s_personality)
|
||||
(_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *);
|
||||
static _Unwind_Reason_Code (*libgcc_s_forcedunwind)
|
||||
diff --git a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c
|
||||
index bff3e2b4f1..1f1eb71741 100644
|
||||
--- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c
|
||||
+++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c
|
||||
@@ -20,7 +20,8 @@
|
||||
#include <stdio.h>
|
||||
#include <unwind.h>
|
||||
|
||||
-static void (*libgcc_s_resume) (struct _Unwind_Exception *exc);
|
||||
+static void (*libgcc_s_resume) (struct _Unwind_Exception *exc)
|
||||
+ __attribute_used__;
|
||||
static _Unwind_Reason_Code (*libgcc_s_personality)
|
||||
(_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *);
|
||||
|
||||
--
|
||||
2.27.0
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
# Locally calculated (fetched from Github)
|
||||
sha256 e1f2c9b424a4e0c00e7ad123a4204f7bc8afd3c504aeb8c79b1086509fd67176 glibc-2.31-54-g6fdf971c9dbf7dac9bea552113fe4694015bbc4d.tar.gz
|
||||
|
||||
# Hashes for license files
|
||||
sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING
|
||||
sha256 dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551 COPYING.LIB
|
||||
sha256 b33d0bd9f685b46853548814893a6135e74430d12f6d94ab3eba42fc591f83bc LICENSES
|
||||
@@ -1,7 +0,0 @@
|
||||
# Locally calculated (fetched from Github)
|
||||
sha256 07f3804abbc6a23315f09568686c0e5bb81d714251cf537d25a36f826cae540b glibc-2.32-2-g386543bc4495f658dcce6cd4d11e4ba6574a46f5.tar.gz
|
||||
|
||||
# Hashes for license files
|
||||
sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING
|
||||
sha256 dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551 COPYING.LIB
|
||||
sha256 b33d0bd9f685b46853548814893a6135e74430d12f6d94ab3eba42fc591f83bc LICENSES
|
||||
@@ -1,7 +0,0 @@
|
||||
# Locally calculated (fetched from Github)
|
||||
sha256 c3828224d69a42f5b6982cbec8ae01cf494fe975ce9023e36ff2c10a2fb93e42 glibc-2.32.9000-69-gbd394d131c10c9ec22c6424197b79410042eed99.tar.gz
|
||||
|
||||
# Hashes for license files
|
||||
sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING
|
||||
sha256 dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551 COPYING.LIB
|
||||
sha256 b33d0bd9f685b46853548814893a6135e74430d12f6d94ab3eba42fc591f83bc LICENSES
|
||||
@@ -1,2 +0,0 @@
|
||||
# Locally calculated (fetched from https://github.com/c-sky/glibc)
|
||||
sha512 9deb2deceefe347d72de13510a5baa3de00f94c684f3b25e136ca3660f61e65a69f2115abb488c2ab0fa93cda8535853ce1e13e186efcc8434ecc4049efd82b5 glibc-7630ed2fa60caea98f500e4a7a51b88f9bf1e176.tar.gz
|
||||
@@ -1,2 +1 @@
|
||||
# This hash file is not used; instead, update the
|
||||
# hash files in the per-version sub-directories.
|
||||
sha512 a82a5cc87ad135a40772841b3beb184a5ce34861e5f76a12a6ce3ccd88c5dc45afcae20ce57f5e2d7b945f63d053465780a3ef0eeb0d4dbcd29f1b8004ee1254 glibc-2.19.tar.gz
|
||||
|
||||
@@ -4,32 +4,8 @@
|
||||
#
|
||||
################################################################################
|
||||
|
||||
ifeq ($(BR2_csky),y)
|
||||
GLIBC_VERSION = 7630ed2fa60caea98f500e4a7a51b88f9bf1e176
|
||||
GLIBC_SITE = $(call github,c-sky,glibc,$(GLIBC_VERSION))
|
||||
else
|
||||
# Generate version string using:
|
||||
# git describe --match 'glibc-*' --abbrev=40 origin/release/MAJOR.MINOR/master | cut -d '-' -f 2-
|
||||
# When updating the version, please also update localedef
|
||||
ifeq ($(BR2_arc),y)
|
||||
# ARC support in upstream was merged in 2.32 release
|
||||
# This can be removed once BR upgrades to 2.32 or later
|
||||
GLIBC_VERSION = 2.32-2-g386543bc4495f658dcce6cd4d11e4ba6574a46f5
|
||||
else ifeq ($(BR2_RISCV_32),y)
|
||||
# RISC-V 32-bit (RV32) requires glibc 2.33 or newer
|
||||
# Until 2.33 is released, just use master
|
||||
GLIBC_VERSION = 2.32.9000-69-gbd394d131c10c9ec22c6424197b79410042eed99
|
||||
else
|
||||
GLIBC_VERSION = 2.31-54-g6fdf971c9dbf7dac9bea552113fe4694015bbc4d
|
||||
endif
|
||||
# Upstream doesn't officially provide an https download link.
|
||||
# There is one (https://sourceware.org/git/glibc.git) but it's not reliable,
|
||||
# sometimes the connection times out. So use an unofficial github mirror.
|
||||
# When updating the version, check it on the official repository;
|
||||
# *NEVER* decide on a version string by looking at the mirror.
|
||||
# Then check that the mirror has been synced already (happens once a day.)
|
||||
GLIBC_SITE = $(call github,bminor,glibc,$(GLIBC_VERSION))
|
||||
endif
|
||||
GLIBC_VERSION = 2.19
|
||||
GLIBC_SITE = https://ftp.gnu.org/gnu/glibc
|
||||
|
||||
GLIBC_LICENSE = GPL-2.0+ (programs), LGPL-2.1+, BSD-3-Clause, MIT (library)
|
||||
GLIBC_LICENSE_FILES = COPYING COPYING.LIB LICENSES
|
||||
|
||||
175
package/gmrender-resurrect/0001-Drop-UpnpInit.patch
Normal file
175
package/gmrender-resurrect/0001-Drop-UpnpInit.patch
Normal file
@@ -0,0 +1,175 @@
|
||||
From dc8c4d4dc234311b3099e7f1efadf5d9733c81e9 Mon Sep 17 00:00:00 2001
|
||||
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
Date: Fri, 21 Aug 2020 21:29:00 +0200
|
||||
Subject: [PATCH] Drop UpnpInit
|
||||
|
||||
UpnpInit has been dropped from libupnp 1.14.x as it can't be fixed
|
||||
against CallStranger a.k.a. CVE-2020-12695 so replace it by UpnpInit2
|
||||
which is available since version 1.6.7 and
|
||||
https://github.com/pupnp/pupnp/commit/2bcbdffd89a70364147d345ec5e70a3fce5cbc29
|
||||
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
[Upstream status:
|
||||
https://github.com/hzeller/gmrender-resurrect/pull/214]
|
||||
---
|
||||
dist-scripts/centos7/README.md | 2 +-
|
||||
dist-scripts/debian/gmediarender.1 | 8 ++------
|
||||
dist-scripts/fedora/README.md | 2 +-
|
||||
src/main.c | 13 ++++---------
|
||||
src/upnp_device.c | 18 +++++++++---------
|
||||
src/upnp_device.h | 2 +-
|
||||
6 files changed, 18 insertions(+), 27 deletions(-)
|
||||
|
||||
diff --git a/dist-scripts/centos7/README.md b/dist-scripts/centos7/README.md
|
||||
index 278d777..ed82fb6 100644
|
||||
--- a/dist-scripts/centos7/README.md
|
||||
+++ b/dist-scripts/centos7/README.md
|
||||
@@ -45,7 +45,7 @@ Additional configuration is also recommended, sice there's no configuration file
|
||||
# vi /etc/systemd/system/gmediarender.service.d/customize.conf # or nano, or emacs, or whatever editor you like
|
||||
[Service]
|
||||
ExecStart=
|
||||
- ExecStart=/usr/bin/gmediarender --port=49494 --ip-address=<your_IP_address> -f "DLNA Renderer GMediaRender"
|
||||
+ ExecStart=/usr/bin/gmediarender --port=49494 --interface-name=<your_interface_name> -f "DLNA Renderer GMediaRender"
|
||||
|
||||
# systemctl daemon-reload
|
||||
# systemctl start gmediarender.service
|
||||
diff --git a/dist-scripts/debian/gmediarender.1 b/dist-scripts/debian/gmediarender.1
|
||||
index 96123ff..b2b1359 100644
|
||||
--- a/dist-scripts/debian/gmediarender.1
|
||||
+++ b/dist-scripts/debian/gmediarender.1
|
||||
@@ -50,12 +50,8 @@ Usually, it is desirable for the renderer
|
||||
to show up on controllers under a recognisable and unique name. This is
|
||||
the option to set that name.
|
||||
.TP
|
||||
-.B \-I, \-\-ip\-address \fI\<ip-address\>\fP
|
||||
-The local IP address the service is running and advertised on.
|
||||
-
|
||||
-This can
|
||||
-only be a single address, and must be explicitly specified (i.e. not
|
||||
-0.0.0.0).
|
||||
+.B \-I, \-\-interface\-name \fI\<interface-name\>\fP
|
||||
+The local interface name the service is running and advertised on.
|
||||
.TP
|
||||
.B \-p, \-\-port \fI\<port>\fP
|
||||
Port to listen to. [49152..65535].
|
||||
diff --git a/dist-scripts/fedora/README.md b/dist-scripts/fedora/README.md
|
||||
index 7b9ea4b..45aa536 100644
|
||||
--- a/dist-scripts/fedora/README.md
|
||||
+++ b/dist-scripts/fedora/README.md
|
||||
@@ -43,7 +43,7 @@ Additional configuration is also recommended, sice there's no configuration file
|
||||
# vi /etc/systemd/system/gmediarender.service.d/customize.conf # or nano, or emacs, or whatever editor you like
|
||||
[Service]
|
||||
ExecStart=
|
||||
- ExecStart=/usr/bin/gmediarender --port=49494 --ip-address=<your_IP_address> -f "DLNA Renderer GMediaRender"
|
||||
+ ExecStart=/usr/bin/gmediarender --port=49494 --interface-name=<your_interface_name> -f "DLNA Renderer GMediaRender"
|
||||
|
||||
# systemctl daemon-reload
|
||||
# systemctl start gmediarender.service
|
||||
diff --git a/src/main.c b/src/main.c
|
||||
index ef720e3..2030c49 100644
|
||||
--- a/src/main.c
|
||||
+++ b/src/main.c
|
||||
@@ -69,11 +69,7 @@ static gboolean show_transport_scpd = FALSE;
|
||||
static gboolean show_outputs = FALSE;
|
||||
static gboolean daemon_mode = FALSE;
|
||||
|
||||
-// IP-address seems strange in libupnp: they actually don't bind to
|
||||
-// that address, but to INADDR_ANY (miniserver.c in upnp library).
|
||||
-// Apparently they just use this for the advertisement ? Anyway, 0.0.0.0 would
|
||||
-// not work.
|
||||
-static const gchar *ip_address = NULL;
|
||||
+static const gchar *interface_name = NULL;
|
||||
static int listen_port = 49494;
|
||||
|
||||
#ifdef GMRENDER_UUID
|
||||
@@ -92,9 +88,8 @@ static const gchar *mime_filter = NULL;
|
||||
static GOptionEntry option_entries[] = {
|
||||
{ "version", 0, 0, G_OPTION_ARG_NONE, &show_version,
|
||||
"Output version information and exit", NULL },
|
||||
- { "ip-address", 'I', 0, G_OPTION_ARG_STRING, &ip_address,
|
||||
- "The local IP address the service is running and advertised "
|
||||
- "(only one, 0.0.0.0 won't work)", NULL },
|
||||
+ { "interface-name", 'I', 0, G_OPTION_ARG_STRING, &interface_name,
|
||||
+ "The local interface name the service is running and advertised", NULL },
|
||||
// The following is not very reliable, as libupnp does not set
|
||||
// SO_REUSEADDR by default, so it might increment (sending patch).
|
||||
{ "port", 'p', 0, G_OPTION_ARG_INT, &listen_port,
|
||||
@@ -302,7 +297,7 @@ int main(int argc, char **argv)
|
||||
listen_port);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
- device = upnp_device_init(upnp_renderer, ip_address, listen_port);
|
||||
+ device = upnp_device_init(upnp_renderer, interface_name, listen_port);
|
||||
if (device == NULL) {
|
||||
Log_error("main", "ERROR: Failed to initialize UPnP device");
|
||||
return EXIT_FAILURE;
|
||||
diff --git a/src/upnp_device.c b/src/upnp_device.c
|
||||
index db65e4f..3151238 100644
|
||||
--- a/src/upnp_device.c
|
||||
+++ b/src/upnp_device.c
|
||||
@@ -416,13 +416,13 @@ static UPNP_CALLBACK(event_handler, EventType, event, userdata)
|
||||
|
||||
static gboolean initialize_device(struct upnp_device_descriptor *device_def,
|
||||
struct upnp_device *result_device,
|
||||
- const char *ip_address,
|
||||
+ const char *interface_name,
|
||||
unsigned short port)
|
||||
{
|
||||
int rc;
|
||||
char *buf;
|
||||
|
||||
- rc = UpnpInit(ip_address, port);
|
||||
+ rc = UpnpInit2(interface_name, port);
|
||||
/* There have been situations reported in which UPNP had issues
|
||||
* initializing right after network came up. #129
|
||||
*/
|
||||
@@ -430,13 +430,13 @@ static gboolean initialize_device(struct upnp_device_descriptor *device_def,
|
||||
static const int kRetryTimeMs = 1000;
|
||||
while (rc != UPNP_E_SUCCESS && retries_left--) {
|
||||
usleep(kRetryTimeMs * 1000);
|
||||
- Log_error("upnp", "UpnpInit(ip=%s, port=%d) Error: %s (%d). Retrying... (%ds)",
|
||||
- ip_address, port, UpnpGetErrorMessage(rc), rc, retries_left);
|
||||
- rc = UpnpInit(ip_address, port);
|
||||
+ Log_error("upnp", "UpnpInit2(interface=%s, port=%d) Error: %s (%d). Retrying... (%ds)",
|
||||
+ interface_name, port, UpnpGetErrorMessage(rc), rc, retries_left);
|
||||
+ rc = UpnpInit2(interface_name, port);
|
||||
}
|
||||
if (UPNP_E_SUCCESS != rc) {
|
||||
- Log_error("upnp", "UpnpInit(ip=%s, port=%d) Error: %s (%d). Giving up.",
|
||||
- ip_address, port, UpnpGetErrorMessage(rc), rc);
|
||||
+ Log_error("upnp", "UpnpInit2(interface=%s, port=%d) Error: %s (%d). Giving up.",
|
||||
+ interface_name, port, UpnpGetErrorMessage(rc), rc);
|
||||
return FALSE;
|
||||
}
|
||||
Log_info("upnp", "Registered IP=%s port=%d\n",
|
||||
@@ -483,7 +483,7 @@ static gboolean initialize_device(struct upnp_device_descriptor *device_def,
|
||||
}
|
||||
|
||||
struct upnp_device *upnp_device_init(struct upnp_device_descriptor *device_def,
|
||||
- const char *ip_address,
|
||||
+ const char *interface_name,
|
||||
unsigned short port)
|
||||
{
|
||||
int rc;
|
||||
@@ -516,7 +516,7 @@ struct upnp_device *upnp_device_init(struct upnp_device_descriptor *device_def,
|
||||
webserver_register_buf(srv->scpd_url, buf, "text/xml");
|
||||
}
|
||||
|
||||
- if (!initialize_device(device_def, result_device, ip_address, port)) {
|
||||
+ if (!initialize_device(device_def, result_device, interface_name, port)) {
|
||||
UpnpFinish();
|
||||
free(result_device);
|
||||
return NULL;
|
||||
diff --git a/src/upnp_device.h b/src/upnp_device.h
|
||||
index 3e635e1..8c8e783 100644
|
||||
--- a/src/upnp_device.h
|
||||
+++ b/src/upnp_device.h
|
||||
@@ -49,7 +49,7 @@ struct upnp_device;
|
||||
struct action_event;
|
||||
|
||||
struct upnp_device *upnp_device_init(struct upnp_device_descriptor *device_def,
|
||||
- const char *ip_address,
|
||||
+ const char *interface_name,
|
||||
unsigned short port);
|
||||
|
||||
void upnp_device_shutdown(struct upnp_device *device);
|
||||
@@ -5,7 +5,7 @@ config BR2_PACKAGE_GMRENDER_RESURRECT
|
||||
depends on BR2_USE_MMU # gstreamer1
|
||||
select BR2_PACKAGE_GSTREAMER1
|
||||
select BR2_PACKAGE_GST1_PLUGINS_BASE # run-time only
|
||||
select BR2_PACKAGE_LIBUPNP18 if !BR2_PACKAGE_LIBUPNP
|
||||
select BR2_PACKAGE_LIBUPNP
|
||||
help
|
||||
UPnP (DLNA) media renderer based on gstreamer
|
||||
|
||||
|
||||
@@ -13,6 +13,6 @@ GMRENDER_RESURRECT_LICENSE = GPL-2.0+
|
||||
GMRENDER_RESURRECT_LICENSE_FILES = COPYING
|
||||
GMRENDER_RESURRECT_DEPENDENCIES = \
|
||||
gstreamer1 \
|
||||
$(if $(BR2_PACKAGE_LIBUPNP),libupnp,libupnp18)
|
||||
libupnp
|
||||
|
||||
$(eval $(autotools-package))
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
comment "gnuradio needs a toolchain w/ C++, NPTL, wchar, dynamic library"
|
||||
depends on BR2_USE_MMU
|
||||
depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
|
||||
depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || \
|
||||
!BR2_TOOLCHAIN_HAS_THREADS_NPTL || BR2_STATIC_LIBS
|
||||
|
||||
@@ -13,6 +14,7 @@ config BR2_PACKAGE_GNURADIO
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
|
||||
depends on BR2_USE_MMU # use fork()
|
||||
depends on BR2_USE_WCHAR # boost
|
||||
depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS # boost-atomic
|
||||
depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # boost-thread
|
||||
select BR2_PACKAGE_BOOST
|
||||
select BR2_PACKAGE_BOOST_ATOMIC
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
comment "gqrx needs a toolchain w/ C++, threads, wchar, dynamic library"
|
||||
depends on BR2_USE_MMU # gnuradio
|
||||
depends on BR2_TOOLCHAIN_HAS_SYNC_4 || BR2_TOOLCHAIN_HAS_ATOMIC
|
||||
depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
|
||||
depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || \
|
||||
!BR2_USE_WCHAR || !BR2_STATIC_LIBS
|
||||
|
||||
@@ -19,6 +20,7 @@ config BR2_PACKAGE_GQRX
|
||||
depends on BR2_USE_WCHAR # boost
|
||||
depends on BR2_TOOLCHAIN_HAS_SYNC_4 || BR2_TOOLCHAIN_HAS_ATOMIC
|
||||
depends on BR2_PACKAGE_QT5
|
||||
depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS # gnuradio -> boost-atomic
|
||||
depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # gnuradio
|
||||
select BR2_PACKAGE_BOOST
|
||||
select BR2_PACKAGE_BOOST_PROGRAM_OPTIONS
|
||||
|
||||
@@ -1,199 +0,0 @@
|
||||
From 23ed73623810a0894c8efd9eb79dd38483794a3b Mon Sep 17 00:00:00 2001
|
||||
From: Fabrice Fontaine <fabrice.fontaine@orange.com>
|
||||
Date: Thu, 20 Aug 2020 18:17:03 +0200
|
||||
Subject: [PATCH] fix build with gcc 10
|
||||
|
||||
This will fix build failures with -fno-common which is enabled by
|
||||
default with gcc 10
|
||||
|
||||
Fixes:
|
||||
- http://autobuild.buildroot.org/results/f296984c3851fc28341210e36ef1b55b2edac209
|
||||
|
||||
Signed-off-by: Fabrice Fontaine <fabrice.fontaine@orange.com>
|
||||
[Retrieved from:
|
||||
https://github.com/Orange-OpenSource/igd2-for-linux/commit/23ed73623810a0894c8efd9eb79dd38483794a3b]
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
---
|
||||
linuxigd2/src/gatedevice.c | 37 +++++++++++++++++++++++++++++++++
|
||||
linuxigd2/src/gatedevice.h | 42 +++++++++-----------------------------
|
||||
linuxigd2/src/pinholev6.c | 2 ++
|
||||
linuxigd2/src/pinholev6.h | 2 +-
|
||||
linuxigd2/src/pmlist.c | 5 +++++
|
||||
linuxigd2/src/pmlist.h | 2 +-
|
||||
linuxigd2/src/wanipv6fw.h | 3 ---
|
||||
7 files changed, 56 insertions(+), 37 deletions(-)
|
||||
|
||||
diff --git a/linuxigd2/src/gatedevice.c b/linuxigd2/src/gatedevice.c
|
||||
index 8be53e5..a50525d 100644
|
||||
--- a/linuxigd2/src/gatedevice.c
|
||||
+++ b/linuxigd2/src/gatedevice.c
|
||||
@@ -41,6 +41,43 @@
|
||||
#include "wanipv6fw.h"
|
||||
#include "config.h"
|
||||
|
||||
+// Thread which contains all kind of timers and threads used in gatedevice.c and deviceprotection.c
|
||||
+TimerThread gExpirationTimerThread;
|
||||
+
|
||||
+// IGD Device Globals
|
||||
+UpnpDevice_Handle deviceHandle;
|
||||
+UpnpDevice_Handle deviceHandleIPv6;
|
||||
+UpnpDevice_Handle deviceHandleIPv6UlaGua;
|
||||
+char *gateUDN;
|
||||
+char *wanUDN;
|
||||
+char *wanConnectionUDN;
|
||||
+char *lanUDN;
|
||||
+long int startup_time;
|
||||
+unsigned long connection_stats[STATS_LIMIT]; // this is used for defining if connection is in idling
|
||||
+long int idle_time;
|
||||
+
|
||||
+// State Variables
|
||||
+char ConnectionType[50];
|
||||
+char PossibleConnectionTypes[50];
|
||||
+char ConnectionStatus[20];
|
||||
+char LastConnectionError[35];
|
||||
+long int AutoDisconnectTime;
|
||||
+long int IdleDisconnectTime;
|
||||
+long int WarnDisconnectDelay;
|
||||
+int RSIPAvailable;
|
||||
+int NATEnabled;
|
||||
+char ExternalIPAddress[INET6_ADDRSTRLEN];
|
||||
+int PortMappingNumberOfEntries;
|
||||
+int PortMappingEnabled;
|
||||
+char RemoteHost[INET6_ADDRSTRLEN]; // updated IPv6 addrss length 16 -> 46
|
||||
+long int SystemUpdateID;
|
||||
+
|
||||
+// WANEthLinkConfig state variables
|
||||
+char EthernetLinkStatus[12];
|
||||
+
|
||||
+char FirewallEnabled[2];
|
||||
+char InboundPinholeAllowed[2];
|
||||
+
|
||||
//Definitions for mapping expiration timer thread
|
||||
static ThreadPool gExpirationThreadPool;
|
||||
static ThreadPoolJob gEventUpdateJob;
|
||||
diff --git a/linuxigd2/src/gatedevice.h b/linuxigd2/src/gatedevice.h
|
||||
index 28d6b21..dbaa0c2 100644
|
||||
--- a/linuxigd2/src/gatedevice.h
|
||||
+++ b/linuxigd2/src/gatedevice.h
|
||||
@@ -33,42 +33,20 @@
|
||||
#include "util.h"
|
||||
|
||||
// Thread which contains all kind of timers and threads used in gatedevice.c and deviceprotection.c
|
||||
-TimerThread gExpirationTimerThread;
|
||||
+extern TimerThread gExpirationTimerThread;
|
||||
|
||||
// IGD Device Globals
|
||||
-UpnpDevice_Handle deviceHandle;
|
||||
-UpnpDevice_Handle deviceHandleIPv6;
|
||||
-UpnpDevice_Handle deviceHandleIPv6UlaGua;
|
||||
-char *gateUDN;
|
||||
-char *wanUDN;
|
||||
-char *wanConnectionUDN;
|
||||
-char *lanUDN;
|
||||
-long int startup_time;
|
||||
-unsigned long connection_stats[STATS_LIMIT]; // this is used for defining if connection is in idling
|
||||
-long int idle_time;
|
||||
-
|
||||
-// State Variables
|
||||
-char ConnectionType[50];
|
||||
-char PossibleConnectionTypes[50];
|
||||
-char ConnectionStatus[20];
|
||||
-char LastConnectionError[35];
|
||||
-long int AutoDisconnectTime;
|
||||
-long int IdleDisconnectTime;
|
||||
-long int WarnDisconnectDelay;
|
||||
-int RSIPAvailable;
|
||||
-int NATEnabled;
|
||||
-char ExternalIPAddress[INET6_ADDRSTRLEN];
|
||||
-int PortMappingNumberOfEntries;
|
||||
-int PortMappingEnabled;
|
||||
-char RemoteHost[INET6_ADDRSTRLEN]; // updated IPv6 addrss length 16 -> 46
|
||||
-long int SystemUpdateID;
|
||||
-
|
||||
-// WANEthLinkConfig state variables
|
||||
-char EthernetLinkStatus[12];
|
||||
+extern UpnpDevice_Handle deviceHandle;
|
||||
+extern UpnpDevice_Handle deviceHandleIPv6;
|
||||
+extern UpnpDevice_Handle deviceHandleIPv6UlaGua;
|
||||
+extern char *gateUDN;
|
||||
+extern char *wanUDN;
|
||||
+extern char *wanConnectionUDN;
|
||||
+extern char *lanUDN;
|
||||
|
||||
// Linked list for portmapping entries
|
||||
-struct portMap *pmlist_Head;
|
||||
-struct portMap *pmlist_Current;
|
||||
+extern struct portMap *pmlist_Head;
|
||||
+extern struct portMap *pmlist_Current;
|
||||
|
||||
// WanIPConnection Actions
|
||||
int EventHandler(Upnp_EventType EventType, void *Event, void *Cookie);
|
||||
diff --git a/linuxigd2/src/pinholev6.c b/linuxigd2/src/pinholev6.c
|
||||
index 44e8a19..78f886d 100644
|
||||
--- a/linuxigd2/src/pinholev6.c
|
||||
+++ b/linuxigd2/src/pinholev6.c
|
||||
@@ -41,6 +41,8 @@ extern "C" {
|
||||
#include "gatedevice.h"
|
||||
#include "pinholev6.h"
|
||||
|
||||
+struct pinholev6 *ph_first;
|
||||
+
|
||||
static const char * add_rule_str = "ip6tables -I %s " //upnp forward chain
|
||||
"-i %s " //input interface
|
||||
"-o %s " //output interface
|
||||
diff --git a/linuxigd2/src/pinholev6.h b/linuxigd2/src/pinholev6.h
|
||||
index 295b9f9..353ae27 100644
|
||||
--- a/linuxigd2/src/pinholev6.h
|
||||
+++ b/linuxigd2/src/pinholev6.h
|
||||
@@ -37,7 +37,7 @@ struct pinholev6 {
|
||||
|
||||
struct pinholev6 *next;
|
||||
|
||||
-} *ph_first;
|
||||
+};
|
||||
|
||||
struct phv6_expirationEvent
|
||||
{
|
||||
diff --git a/linuxigd2/src/pmlist.c b/linuxigd2/src/pmlist.c
|
||||
index 1b3fe05..95d0c61 100644
|
||||
--- a/linuxigd2/src/pmlist.c
|
||||
+++ b/linuxigd2/src/pmlist.c
|
||||
@@ -41,6 +41,11 @@
|
||||
#include "iptc.h"
|
||||
#endif
|
||||
|
||||
+// Linked list for portmapping entries
|
||||
+struct portMap *pmlist_Head;
|
||||
+struct portMap *pmlist_Current;
|
||||
+struct portMap *pmlist_Tail;
|
||||
+
|
||||
/**
|
||||
* Create new portMap struct of rule to add iptables.
|
||||
* portMap-struct is internal presentation of iptables rule in IGD.
|
||||
diff --git a/linuxigd2/src/pmlist.h b/linuxigd2/src/pmlist.h
|
||||
index 436d228..017500d 100644
|
||||
--- a/linuxigd2/src/pmlist.h
|
||||
+++ b/linuxigd2/src/pmlist.h
|
||||
@@ -57,7 +57,7 @@ struct portMap
|
||||
|
||||
struct portMap* next;
|
||||
struct portMap* prev;
|
||||
-} *pmlist_Head, *pmlist_Tail, *pmlist_Current;
|
||||
+};
|
||||
|
||||
//struct portMap* pmlist_NewNode(void);
|
||||
struct portMap* pmlist_NewNode(int enabled, long int duration, char *remoteHost,
|
||||
diff --git a/linuxigd2/src/wanipv6fw.h b/linuxigd2/src/wanipv6fw.h
|
||||
index 55419fe..a50d267 100644
|
||||
--- a/linuxigd2/src/wanipv6fw.h
|
||||
+++ b/linuxigd2/src/wanipv6fw.h
|
||||
@@ -46,9 +46,6 @@ extern "C" {
|
||||
#define ERR_SRC_ADD_WILDCARD 708
|
||||
#define ERR_NO_TRAFFIC 709
|
||||
|
||||
-char FirewallEnabled[2];
|
||||
-char InboundPinholeAllowed[2];
|
||||
-
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
int InitFirewallv6(void);
|
||||
@@ -18,7 +18,7 @@ config BR2_PACKAGE_IGD2_FOR_LINUX
|
||||
|
||||
Please edit /etc/upnpd.conf before using upnpd!
|
||||
|
||||
https://github.com/ffontaine/igd2-for-linux
|
||||
https://github.com/Orange-OpenSource/igd2-for-linux
|
||||
|
||||
comment "igd2-for-linux needs a toolchain w/ threads, wchar"
|
||||
depends on BR2_USE_MMU
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# Locally computed:
|
||||
sha256 523545a26b0d662e9f6913bec2518df6e70f4d497935d88983d994336a1b0ea9 igd2-for-linux-1.2.tar.gz
|
||||
sha256 204d8eff92f95aac4df6c8122bc1505f468f3a901e5a4cc08940e0ede1938994 linuxigd2/doc/LICENSE
|
||||
sha256 e3fcc7c9da4ad1ca16227b3b1b3712bcfb3f6ec922685eee7ae4a76edfa32bb4 igd2-for-linux-2.0.tar.gz
|
||||
sha256 204d8eff92f95aac4df6c8122bc1505f468f3a901e5a4cc08940e0ede1938994 linuxigd2/doc/LICENSE
|
||||
sha256 c8b99423cad48bb44e2cf52a496361404290865eac259a82da6d1e4331ececb3 linuxigd2/src/threadutil/COPYING
|
||||
|
||||
@@ -4,11 +4,12 @@
|
||||
#
|
||||
################################################################################
|
||||
|
||||
IGD2_FOR_LINUX_VERSION = 1.2
|
||||
IGD2_FOR_LINUX_SITE = $(call github,ffontaine,igd2-for-linux,v$(IGD2_FOR_LINUX_VERSION))
|
||||
IGD2_FOR_LINUX_VERSION = 2.0
|
||||
IGD2_FOR_LINUX_SITE = \
|
||||
$(call github,Orange-OpenSource,igd2-for-linux,v$(IGD2_FOR_LINUX_VERSION))
|
||||
|
||||
IGD2_FOR_LINUX_LICENSE = GPL-2.0
|
||||
IGD2_FOR_LINUX_LICENSE_FILES = linuxigd2/doc/LICENSE
|
||||
IGD2_FOR_LINUX_LICENSE = GPL-2.0, BSD-3-Clause
|
||||
IGD2_FOR_LINUX_LICENSE_FILES = linuxigd2/doc/LICENSE linuxigd2/src/threadutil/COPYING
|
||||
|
||||
IGD2_FOR_LINUX_DEPENDENCIES = libupnp
|
||||
|
||||
|
||||
@@ -0,0 +1,162 @@
|
||||
From da966a2ab1f5161cc0a21a4cd7e07edf732ebee9 Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com>
|
||||
Date: Thu, 19 Mar 2020 20:59:12 -0700
|
||||
Subject: [PATCH] build: fix Werror=format-overflow under gcc-10
|
||||
|
||||
Fixes: #870
|
||||
|
||||
With upcoming gcc-10 we start to see Werror=format-overflow reporting
|
||||
that we attempt to printf %s null strings.
|
||||
|
||||
Change-Id: I7a62bc98bf7dd6bcd61d475d7650a06aa1a70932
|
||||
Signed-off-by: Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com>
|
||||
[Retrieved from:
|
||||
https://github.com/intel/media-driver/commit/da966a2ab1f5161cc0a21a4cd7e07edf732ebee9]
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
---
|
||||
media_driver/linux/common/os/i915/xf86drm.c | 57 ++++++++++---------
|
||||
.../linux/ult/libdrm_mock/xf86drm_mock.c | 57 ++++++++++---------
|
||||
2 files changed, 58 insertions(+), 56 deletions(-)
|
||||
|
||||
diff --git a/media_driver/linux/common/os/i915/xf86drm.c b/media_driver/linux/common/os/i915/xf86drm.c
|
||||
index 7594bde99..d0fc1b7ac 100644
|
||||
--- a/media_driver/linux/common/os/i915/xf86drm.c
|
||||
+++ b/media_driver/linux/common/os/i915/xf86drm.c
|
||||
@@ -581,37 +581,38 @@ static int drmOpenByBusid(const char *busid, int type)
|
||||
|
||||
drmMsg("drmOpenByBusid: Searching for BusID %s\n", busid);
|
||||
for (i = base; i < base + DRM_MAX_MINOR; i++) {
|
||||
- fd = drmOpenMinor(i, 1, type);
|
||||
- drmMsg("drmOpenByBusid: drmOpenMinor returns %d\n", fd);
|
||||
- if (fd >= 0) {
|
||||
- /* We need to try for 1.4 first for proper PCI domain support
|
||||
- * and if that fails, we know the kernel is busted
|
||||
- */
|
||||
- sv.drm_di_major = 1;
|
||||
- sv.drm_di_minor = 4;
|
||||
- sv.drm_dd_major = -1; /* Don't care */
|
||||
- sv.drm_dd_minor = -1; /* Don't care */
|
||||
- if (drmSetInterfaceVersion(fd, &sv)) {
|
||||
+ fd = drmOpenMinor(i, 1, type);
|
||||
+ drmMsg("drmOpenByBusid: drmOpenMinor returns %d\n", fd);
|
||||
+ if (fd >= 0) {
|
||||
+ /* We need to try for 1.4 first for proper PCI domain support
|
||||
+ * and if that fails, we know the kernel is busted
|
||||
+ */
|
||||
+ sv.drm_di_major = 1;
|
||||
+ sv.drm_di_minor = 4;
|
||||
+ sv.drm_dd_major = -1; /* Don't care */
|
||||
+ sv.drm_dd_minor = -1; /* Don't care */
|
||||
+ if (drmSetInterfaceVersion(fd, &sv)) {
|
||||
#ifndef __alpha__
|
||||
- pci_domain_ok = 0;
|
||||
+ pci_domain_ok = 0;
|
||||
#endif
|
||||
- sv.drm_di_major = 1;
|
||||
- sv.drm_di_minor = 1;
|
||||
- sv.drm_dd_major = -1; /* Don't care */
|
||||
- sv.drm_dd_minor = -1; /* Don't care */
|
||||
- drmMsg("drmOpenByBusid: Interface 1.4 failed, trying 1.1\n");
|
||||
- drmSetInterfaceVersion(fd, &sv);
|
||||
- }
|
||||
- buf = drmGetBusid(fd);
|
||||
- drmMsg("drmOpenByBusid: drmGetBusid reports %s\n", buf);
|
||||
- if (buf && drmMatchBusID(buf, busid, pci_domain_ok)) {
|
||||
- drmFreeBusid(buf);
|
||||
- return fd;
|
||||
+ sv.drm_di_major = 1;
|
||||
+ sv.drm_di_minor = 1;
|
||||
+ sv.drm_dd_major = -1; /* Don't care */
|
||||
+ sv.drm_dd_minor = -1; /* Don't care */
|
||||
+ drmMsg("drmOpenByBusid: Interface 1.4 failed, trying 1.1\n");
|
||||
+ drmSetInterfaceVersion(fd, &sv);
|
||||
+ }
|
||||
+ buf = drmGetBusid(fd);
|
||||
+ if (buf) {
|
||||
+ drmMsg("drmOpenByBusid: drmGetBusid reports %s\n", buf);
|
||||
+ if (drmMatchBusID(buf, busid, pci_domain_ok)) {
|
||||
+ drmFreeBusid(buf);
|
||||
+ return fd;
|
||||
+ }
|
||||
+ drmFreeBusid(buf);
|
||||
+ }
|
||||
+ close(fd);
|
||||
}
|
||||
- if (buf)
|
||||
- drmFreeBusid(buf);
|
||||
- close(fd);
|
||||
- }
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
diff --git a/media_driver/linux/ult/libdrm_mock/xf86drm_mock.c b/media_driver/linux/ult/libdrm_mock/xf86drm_mock.c
|
||||
index 7e5246295..2e5863798 100644
|
||||
--- a/media_driver/linux/ult/libdrm_mock/xf86drm_mock.c
|
||||
+++ b/media_driver/linux/ult/libdrm_mock/xf86drm_mock.c
|
||||
@@ -790,37 +790,38 @@ static int drmOpenByBusid(const char *busid, int type)
|
||||
|
||||
drmMsg("drmOpenByBusid: Searching for BusID %s\n", busid);
|
||||
for (i = base; i < base + DRM_MAX_MINOR; i++) {
|
||||
- fd = drmOpenMinor(i, 1, type);
|
||||
- drmMsg("drmOpenByBusid: drmOpenMinor returns %d\n", fd);
|
||||
- if (fd >= 0) {
|
||||
- /* We need to try for 1.4 first for proper PCI domain support
|
||||
- * and if that fails, we know the kernel is busted
|
||||
- */
|
||||
- sv.drm_di_major = 1;
|
||||
- sv.drm_di_minor = 4;
|
||||
- sv.drm_dd_major = -1; /* Don't care */
|
||||
- sv.drm_dd_minor = -1; /* Don't care */
|
||||
- if (drmSetInterfaceVersion(fd, &sv)) {
|
||||
+ fd = drmOpenMinor(i, 1, type);
|
||||
+ drmMsg("drmOpenByBusid: drmOpenMinor returns %d\n", fd);
|
||||
+ if (fd >= 0) {
|
||||
+ /* We need to try for 1.4 first for proper PCI domain support
|
||||
+ * and if that fails, we know the kernel is busted
|
||||
+ */
|
||||
+ sv.drm_di_major = 1;
|
||||
+ sv.drm_di_minor = 4;
|
||||
+ sv.drm_dd_major = -1; /* Don't care */
|
||||
+ sv.drm_dd_minor = -1; /* Don't care */
|
||||
+ if (drmSetInterfaceVersion(fd, &sv)) {
|
||||
#ifndef __alpha__
|
||||
- pci_domain_ok = 0;
|
||||
+ pci_domain_ok = 0;
|
||||
#endif
|
||||
- sv.drm_di_major = 1;
|
||||
- sv.drm_di_minor = 1;
|
||||
- sv.drm_dd_major = -1; /* Don't care */
|
||||
- sv.drm_dd_minor = -1; /* Don't care */
|
||||
- drmMsg("drmOpenByBusid: Interface 1.4 failed, trying 1.1\n");
|
||||
- drmSetInterfaceVersion(fd, &sv);
|
||||
- }
|
||||
- buf = drmGetBusid(fd);
|
||||
- drmMsg("drmOpenByBusid: drmGetBusid reports %s\n", buf);
|
||||
- if (buf && drmMatchBusID(buf, busid, pci_domain_ok)) {
|
||||
- drmFreeBusid(buf);
|
||||
- return fd;
|
||||
+ sv.drm_di_major = 1;
|
||||
+ sv.drm_di_minor = 1;
|
||||
+ sv.drm_dd_major = -1; /* Don't care */
|
||||
+ sv.drm_dd_minor = -1; /* Don't care */
|
||||
+ drmMsg("drmOpenByBusid: Interface 1.4 failed, trying 1.1\n");
|
||||
+ drmSetInterfaceVersion(fd, &sv);
|
||||
+ }
|
||||
+ buf = drmGetBusid(fd);
|
||||
+ if (buf) {
|
||||
+ drmMsg("drmOpenByBusid: drmGetBusid reports %s\n", buf);
|
||||
+ if (drmMatchBusID(buf, busid, pci_domain_ok)) {
|
||||
+ drmFreeBusid(buf);
|
||||
+ return fd;
|
||||
+ }
|
||||
+ drmFreeBusid(buf);
|
||||
+ }
|
||||
+ close(fd);
|
||||
}
|
||||
- if (buf)
|
||||
- drmFreeBusid(buf);
|
||||
- close(fd);
|
||||
- }
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
@@ -22,9 +22,7 @@ INTEL_MEDIADRIVER_DEPENDENCIES = \
|
||||
INTEL_MEDIADRIVER_SUPPORTS_IN_SOURCE_BUILD = NO
|
||||
|
||||
INTEL_MEDIADRIVER_CONF_OPTS = \
|
||||
-DBUILD_ALONG_WITH_CMRTLIB=1 \
|
||||
-DINSTALL_DRIVERS_SYSCONF=OFF \
|
||||
-DMEDIA_RUN_TEST_SUITE=OFF \
|
||||
-DRUN_TEST_SUITE=OFF
|
||||
-DINSTALL_DRIVER_SYSCONF=OFF \
|
||||
-DMEDIA_RUN_TEST_SUITE=OFF
|
||||
|
||||
$(eval $(cmake-package))
|
||||
|
||||
@@ -2,7 +2,7 @@ config BR2_PACKAGE_KODI_PVR_ZATTOO
|
||||
bool "kodi-pvr-zattoo"
|
||||
select BR2_PACKAGE_KODI_PLATFORM
|
||||
select BR2_PACKAGE_LIBPLATFORM
|
||||
select BR2_PACKAGE_RAPIDXML
|
||||
select BR2_PACKAGE_RAPIDJSON
|
||||
select BR2_PACKAGE_TINYXML2
|
||||
help
|
||||
Kodi PVR-Addon for Zattoo
|
||||
|
||||
@@ -8,6 +8,6 @@ KODI_PVR_ZATTOO_VERSION = 18.1.21-Leia
|
||||
KODI_PVR_ZATTOO_SITE = $(call github,rbuehlma,pvr.zattoo,$(KODI_PVR_ZATTOO_VERSION))
|
||||
KODI_PVR_ZATTOO_LICENSE = GPL-2.0+
|
||||
KODI_PVR_ZATTOO_LICENSE_FILES = debian/copyright
|
||||
KODI_PVR_ZATTOO_DEPENDENCIES = kodi-platform libplatform rapidxml tinyxml2
|
||||
KODI_PVR_ZATTOO_DEPENDENCIES = kodi-platform libplatform rapidjson tinyxml2
|
||||
|
||||
$(eval $(cmake-package))
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
# Use the latest commit from release_90 branch.
|
||||
LIBCLC_VERSION = d1cbc92e2ceee59963f5c3a576382e5bba31f060
|
||||
LIBCLC_SITE = https://git.llvm.org/git/libclc
|
||||
LIBCLC_SITE = https://github.com/llvm-mirror/libclc
|
||||
LIBCLC_SITE_METHOD = git
|
||||
LIBCLC_LICENSE = Apache-2.0 with exceptions or MIT
|
||||
LIBCLC_LICENSE_FILES = LICENSE.TXT
|
||||
|
||||
@@ -3,6 +3,7 @@ config BR2_PACKAGE_LIBCPPRESTSDK
|
||||
depends on BR2_ENABLE_LOCALE
|
||||
depends on BR2_INSTALL_LIBSTDCPP
|
||||
depends on BR2_USE_WCHAR # boost
|
||||
depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS # boost-atomic
|
||||
depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # exception_ptr
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
|
||||
select BR2_PACKAGE_BOOST
|
||||
@@ -23,6 +24,7 @@ config BR2_PACKAGE_LIBCPPRESTSDK
|
||||
https://github.com/Microsoft/cpprestsdk
|
||||
|
||||
comment "libcpprestsdk needs a toolchain w/ NPTL, C++, wchar, locale"
|
||||
depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
|
||||
depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL || \
|
||||
!BR2_INSTALL_LIBSTDCPP || \
|
||||
!BR2_USE_WCHAR || !BR2_ENABLE_LOCALE
|
||||
|
||||
@@ -23,4 +23,8 @@ define LIBFUSE3_PERMISSIONS
|
||||
/usr/bin/fusermount3 f 4755 0 0 - - - - -
|
||||
endef
|
||||
|
||||
define LIBFUSE3_LINUX_CONFIG_FIXUPS
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_FUSE_FS)
|
||||
endef
|
||||
|
||||
$(eval $(meson-package))
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
config BR2_PACKAGE_LIBLLCP
|
||||
bool "libllcp"
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS # libusb
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS
|
||||
select BR2_PACKAGE_LIBNFC
|
||||
help
|
||||
Library extending libnfc with support for Logical Link Control
|
||||
Protocol.
|
||||
|
||||
https://github.com/nfc-tools/libllcp
|
||||
|
||||
comment "libllcp needs a toolchain w/ threads"
|
||||
depends on !BR2_TOOLCHAIN_HAS_THREADS
|
||||
|
||||
@@ -12,6 +12,6 @@ LIBODB_MYSQL_INSTALL_STAGING = YES
|
||||
LIBODB_MYSQL_LICENSE = GPL-2.0
|
||||
LIBODB_MYSQL_LICENSE_FILES = LICENSE
|
||||
LIBODB_MYSQL_DEPENDENCIES = libodb mysql
|
||||
LIBODB_MYSQL_CONF_ENV = LIBS="$(shell $(STAGING_DIR)/usr/bin/mysql_config --libs)"
|
||||
LIBODB_MYSQL_CONF_ENV = LIBS=`$(STAGING_DIR)/usr/bin/mysql_config --libs`
|
||||
|
||||
$(eval $(autotools-package))
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
comment "libtorrent-rasterbar needs a toolchain w/ C++, threads, wchar, gcc >= 4.9"
|
||||
depends on BR2_TOOLCHAIN_SUPPORTS_VARIADIC_MI_THUNK
|
||||
depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735
|
||||
depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR || \
|
||||
!BR2_HOST_GCC_AT_LEAST_4_9 || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
|
||||
depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || \
|
||||
!BR2_USE_WCHAR || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
|
||||
|
||||
comment "libtorrent-rasterbar needs exception_ptr"
|
||||
depends on BR2_TOOLCHAIN_SUPPORTS_VARIADIC_MI_THUNK
|
||||
@@ -11,7 +11,6 @@ comment "libtorrent-rasterbar needs exception_ptr"
|
||||
config BR2_PACKAGE_LIBTORRENT_RASTERBAR
|
||||
bool "libtorrent-rasterbar"
|
||||
depends on BR2_INSTALL_LIBSTDCPP # boost
|
||||
depends on BR2_HOST_GCC_AT_LEAST_4_9 # C++11
|
||||
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C++11
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS # boost
|
||||
depends on BR2_TOOLCHAIN_SUPPORTS_VARIADIC_MI_THUNK
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
# Locally computed:
|
||||
sha256 c5a300b86775435c076d58a79cc0d5a977d76027d2a7d721590729b7f369fa43 libupnp-1.6.25.tar.bz2
|
||||
sha256 0375955c8a79d6e8fa0792d45d00fc4e7710d7ac95bcbd27f9225a83f5c946fd LICENSE
|
||||
sha256 ecb23d4291968c8a7bdd4eb16fc2250dbacc16b354345a13342d67f571d35ceb libupnp-1.14.0.tar.bz2
|
||||
sha256 c8b99423cad48bb44e2cf52a496361404290865eac259a82da6d1e4331ececb3 COPYING
|
||||
|
||||
@@ -4,12 +4,24 @@
|
||||
#
|
||||
################################################################################
|
||||
|
||||
LIBUPNP_VERSION = 1.6.25
|
||||
LIBUPNP_VERSION = 1.14.0
|
||||
LIBUPNP_SOURCE = libupnp-$(LIBUPNP_VERSION).tar.bz2
|
||||
LIBUPNP_SITE = http://downloads.sourceforge.net/project/pupnp/pupnp/libUPnP%20$(LIBUPNP_VERSION)
|
||||
LIBUPNP_SITE = \
|
||||
http://downloads.sourceforge.net/project/pupnp/pupnp/libupnp-$(LIBUPNP_VERSION)
|
||||
LIBUPNP_CONF_ENV = ac_cv_lib_compat_ftime=no
|
||||
LIBUPNP_INSTALL_STAGING = YES
|
||||
LIBUPNP_LICENSE = BSD-3-Clause
|
||||
LIBUPNP_LICENSE_FILES = LICENSE
|
||||
LIBUPNP_LICENSE_FILES = COPYING
|
||||
LIBUPNP_DEPENDENCIES = host-pkgconf
|
||||
|
||||
# Bind the internal miniserver socket with reuseaddr to allow clean restarts.
|
||||
LIBUPNP_CONF_OPTS += --enable-reuseaddr
|
||||
|
||||
ifeq ($(BR2_PACKAGE_OPENSSL),y)
|
||||
LIBUPNP_CONF_OPTS += --enable-open-ssl
|
||||
LIBUPNP_DEPENDENCIES += openssl
|
||||
else
|
||||
LIBUPNP_CONF_OPTS += --disable-open-ssl
|
||||
endif
|
||||
|
||||
$(eval $(autotools-package))
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
config BR2_PACKAGE_LIBUPNP18
|
||||
bool "libupnp18"
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS
|
||||
depends on !BR2_PACKAGE_LIBUPNP
|
||||
help
|
||||
The portable SDK for UPnP(tm) Devices (libupnp) provides
|
||||
developers with an API and open source code for building
|
||||
control points, devices, and bridges that are compliant with
|
||||
Version 1.0 of the Universal Plug and Play Device Architecture
|
||||
Specification
|
||||
|
||||
http://pupnp.sourceforge.net/
|
||||
|
||||
comment "libupnp18 needs a toolchain w/ threads"
|
||||
depends on !BR2_PACKAGE_LIBUPNP
|
||||
depends on !BR2_TOOLCHAIN_HAS_THREADS
|
||||
@@ -1,5 +0,0 @@
|
||||
# From https://sourceforge.net/projects/pupnp/files/pupnp/libupnp-1.8.7/libupnp-1.8.7.tar.bz2.sha1
|
||||
sha1 2ea3011180c58b0584f0cb73cc8e685a0a1c4ec8 libupnp-1.8.7.tar.bz2
|
||||
# Locally computed:
|
||||
sha256 e38c69b2b67322e67cd53680db9b02c7c1f720a47a3cd626fd89d57d2dca93b8 libupnp-1.8.7.tar.bz2
|
||||
sha256 c8b99423cad48bb44e2cf52a496361404290865eac259a82da6d1e4331ececb3 COPYING
|
||||
@@ -1,26 +0,0 @@
|
||||
################################################################################
|
||||
#
|
||||
# libupnp18
|
||||
#
|
||||
################################################################################
|
||||
|
||||
LIBUPNP18_VERSION = 1.8.7
|
||||
LIBUPNP18_SOURCE = libupnp-$(LIBUPNP18_VERSION).tar.bz2
|
||||
LIBUPNP18_SITE = http://downloads.sourceforge.net/project/pupnp/pupnp/libupnp-$(LIBUPNP18_VERSION)
|
||||
LIBUPNP18_CONF_ENV = ac_cv_lib_compat_ftime=no
|
||||
LIBUPNP18_INSTALL_STAGING = YES
|
||||
LIBUPNP18_LICENSE = BSD-3-Clause
|
||||
LIBUPNP18_LICENSE_FILES = COPYING
|
||||
LIBUPNP18_DEPENDENCIES = host-pkgconf
|
||||
|
||||
# Bind the internal miniserver socket with reuseaddr to allow clean restarts.
|
||||
LIBUPNP18_CONF_OPTS += --enable-reuseaddr
|
||||
|
||||
ifeq ($(BR2_PACKAGE_OPENSSL),y)
|
||||
LIBUPNP18_CONF_OPTS += --enable-open-ssl
|
||||
LIBUPNP18_DEPENDENCIES += openssl
|
||||
else
|
||||
LIBUPNP18_CONF_OPTS += --disable-open-ssl
|
||||
endif
|
||||
|
||||
$(eval $(autotools-package))
|
||||
@@ -346,13 +346,13 @@ endchoice
|
||||
|
||||
config BR2_DEFAULT_KERNEL_HEADERS
|
||||
string
|
||||
default "4.4.248" if BR2_KERNEL_HEADERS_4_4
|
||||
default "4.9.248" if BR2_KERNEL_HEADERS_4_9
|
||||
default "4.14.212" if BR2_KERNEL_HEADERS_4_14
|
||||
default "4.19.163" if BR2_KERNEL_HEADERS_4_19
|
||||
default "5.4.83" if BR2_KERNEL_HEADERS_5_4
|
||||
default "4.4.253" if BR2_KERNEL_HEADERS_4_4
|
||||
default "4.9.253" if BR2_KERNEL_HEADERS_4_9
|
||||
default "4.14.217" if BR2_KERNEL_HEADERS_4_14
|
||||
default "4.19.171" if BR2_KERNEL_HEADERS_4_19
|
||||
default "5.4.93" if BR2_KERNEL_HEADERS_5_4
|
||||
default "5.8.18" if BR2_KERNEL_HEADERS_5_8
|
||||
default "5.9.14" if BR2_KERNEL_HEADERS_5_9
|
||||
default "5.9.16" if BR2_KERNEL_HEADERS_5_9
|
||||
default BR2_DEFAULT_KERNEL_VERSION if BR2_KERNEL_HEADERS_VERSION
|
||||
default "custom" if BR2_KERNEL_HEADERS_CUSTOM_TARBALL
|
||||
default BR2_KERNEL_HEADERS_CUSTOM_REPO_VERSION \
|
||||
|
||||
@@ -17,8 +17,7 @@ LUAROCKS_CONFIG_FILE = $(LUAROCKS_CONFIG_DIR)/luarocks/config.lua
|
||||
HOST_LUAROCKS_CONFIG_FILE = $(LUAROCKS_CONFIG_DIR)/luarocks/host-config.lua
|
||||
|
||||
define LUAROCKS_ADDON_EXTRACT
|
||||
mkdir $(@D)/src/luarocks/cmd/external
|
||||
cp package/luarocks/buildroot.lua $(@D)/src/luarocks/cmd/external/buildroot.lua
|
||||
$(INSTALL) -D -m 0644 package/luarocks/buildroot.lua $(@D)/src/luarocks/cmd/external/buildroot.lua
|
||||
endef
|
||||
HOST_LUAROCKS_POST_EXTRACT_HOOKS += LUAROCKS_ADDON_EXTRACT
|
||||
|
||||
|
||||
@@ -390,7 +390,7 @@ config BR2_PACKAGE_MPD_TCP
|
||||
config BR2_PACKAGE_MPD_UPNP
|
||||
bool "UPnP"
|
||||
select BR2_PACKAGE_EXPAT
|
||||
select BR2_PACKAGE_LIBUPNP18 if !BR2_PACKAGE_LIBUPNP
|
||||
select BR2_PACKAGE_LIBUPNP
|
||||
select BR2_PACKAGE_MPD_CURL
|
||||
help
|
||||
Enable MPD UPnP client support.
|
||||
|
||||
@@ -304,7 +304,7 @@ endif
|
||||
ifeq ($(BR2_PACKAGE_MPD_UPNP),y)
|
||||
MPD_DEPENDENCIES += \
|
||||
expat \
|
||||
$(if $(BR2_PACKAGE_LIBUPNP),libupnp,libupnp18)
|
||||
libupnp
|
||||
MPD_CONF_OPTS += -Dupnp=enabled
|
||||
else
|
||||
MPD_CONF_OPTS += -Dupnp=disabled
|
||||
@@ -333,6 +333,8 @@ endif
|
||||
|
||||
define MPD_INSTALL_EXTRA_FILES
|
||||
$(INSTALL) -m 0644 -D package/mpd/mpd.conf $(TARGET_DIR)/etc/mpd.conf
|
||||
mkdir -p $(TARGET_DIR)/var/lib/mpd/music
|
||||
mkdir -p $(TARGET_DIR)/var/lib/mpd/playlists
|
||||
endef
|
||||
|
||||
MPD_POST_INSTALL_TARGET_HOOKS += MPD_INSTALL_EXTRA_FILES
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
From f55b1a37e2c43b67e7fd7f6a39afe2b2316b7cf9 Mon Sep 17 00:00:00 2001
|
||||
From 922855e245c8bdadc0d24b5b706549b18fb5f079 Mon Sep 17 00:00:00 2001
|
||||
From: Alexander Egorenkov <egorenar-dev@posteo.net>
|
||||
Date: Mon, 31 Aug 2020 19:05:46 +0200
|
||||
Date: Sat, 21 Nov 2020 11:08:56 +0100
|
||||
Subject: [PATCH] kpartx, libmultipath: use pkg-config to get path to
|
||||
headers
|
||||
|
||||
@@ -9,9 +9,9 @@ to enable cross-compilation.
|
||||
|
||||
Signed-off-by: Alexander Egorenkov <egorenar-dev@posteo.net>
|
||||
---
|
||||
kpartx/Makefile | 2 +-
|
||||
libmultipath/Makefile | 8 ++++----
|
||||
2 files changed, 5 insertions(+), 5 deletions(-)
|
||||
kpartx/Makefile | 2 +-
|
||||
libmultipath/Makefile | 12 ++++++------
|
||||
2 files changed, 7 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/kpartx/Makefile b/kpartx/Makefile
|
||||
index 2906a984..29573890 100644
|
||||
@@ -27,10 +27,10 @@ index 2906a984..29573890 100644
|
||||
endif
|
||||
|
||||
diff --git a/libmultipath/Makefile b/libmultipath/Makefile
|
||||
index e5651e49..51ad0193 100644
|
||||
index 62ba16e8..3ad9130c 100644
|
||||
--- a/libmultipath/Makefile
|
||||
+++ b/libmultipath/Makefile
|
||||
@@ -20,19 +20,19 @@ ifdef SYSTEMD
|
||||
@@ -20,27 +20,27 @@ ifdef SYSTEMD
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -39,6 +39,11 @@ index e5651e49..51ad0193 100644
|
||||
CFLAGS += -DLIBDM_API_FLUSH -D_GNU_SOURCE
|
||||
endif
|
||||
|
||||
-ifneq ($(call check_func,dm_task_get_errno,/usr/include/libdevmapper.h),0)
|
||||
+ifneq ($(call check_func,dm_task_get_errno,$(shell $(PKG_CONFIG) --variable=includedir devmapper)/libdevmapper.h),0)
|
||||
CFLAGS += -DLIBDM_API_GET_ERRNO
|
||||
endif
|
||||
|
||||
-ifneq ($(call check_func,dm_task_set_cookie,/usr/include/libdevmapper.h),0)
|
||||
+ifneq ($(call check_func,dm_task_set_cookie,$(shell $(PKG_CONFIG) --variable=includedir devmapper)/libdevmapper.h),0)
|
||||
CFLAGS += -DLIBDM_API_COOKIE
|
||||
@@ -54,6 +59,11 @@ index e5651e49..51ad0193 100644
|
||||
CFLAGS += -DLIBDM_API_DEFERRED
|
||||
endif
|
||||
|
||||
-ifneq ($(call check_func,dm_hold_control_dev,/usr/include/libdevmapper.h),0)
|
||||
+ifneq ($(call check_func,dm_hold_control_dev,$(shell $(PKG_CONFIG) --variable=includedir devmapper)/libdevmapper.h),0)
|
||||
CFLAGS += -DLIBDM_API_HOLD_CONTROL
|
||||
endif
|
||||
|
||||
--
|
||||
2.28.0
|
||||
2.29.2
|
||||
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
From 48f537b9fef4f9db761466b8951fb63243f06602 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Hesse <mail@eworm.de>
|
||||
Date: Wed, 6 May 2020 09:35:47 +0200
|
||||
Subject: [PATCH] libmpathpersist: depend on libmultipath
|
||||
|
||||
Without this the build fails with:
|
||||
|
||||
/usr/bin/ld: cannot find -lmultipath
|
||||
|
||||
Signed-off-by: Christian Hesse <mail@eworm.de>
|
||||
Signed-off-by: Alexander Egorenkov <egorenar-dev@posteo.net>
|
||||
---
|
||||
Makefile | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 1dee3680..ba1d73ba 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -28,7 +28,7 @@ all: $(BUILDDIRS)
|
||||
$(BUILDDIRS):
|
||||
$(MAKE) -C $@
|
||||
|
||||
-multipath multipathd mpathpersist: libmultipath
|
||||
+libmpathpersist multipath multipathd mpathpersist: libmultipath
|
||||
mpathpersist: libmpathpersist
|
||||
|
||||
$(BUILDDIRS.clean):
|
||||
--
|
||||
2.28.0
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
From 82129852d74785267f95ef598ac483ff9af38a55 Mon Sep 17 00:00:00 2001
|
||||
From: "mail@eworm.de" <mail@eworm.de>
|
||||
Date: Sat, 25 Apr 2020 21:11:13 +0200
|
||||
Subject: [PATCH] fix boolean value with json-c 0.14
|
||||
|
||||
Upstream json-c removed the TRUE and FALSE defines in commit
|
||||
0992aac61f8b087efd7094e9ac2b84fa9c040fcd.
|
||||
|
||||
[mwilck]: Use stdbool.h, and keep the log message unchanged.
|
||||
|
||||
Signed-off-by: Christian Hesse <mail@eworm.de>
|
||||
Signed-off-by: Martin Wilck <mwilck@suse.com>
|
||||
Signed-off-by: Alexander Egorenkov <egorenar-dev@posteo.net>
|
||||
---
|
||||
libdmmp/libdmmp_private.h | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/libdmmp/libdmmp_private.h b/libdmmp/libdmmp_private.h
|
||||
index ac85b63f..b1a6ddea 100644
|
||||
--- a/libdmmp/libdmmp_private.h
|
||||
+++ b/libdmmp/libdmmp_private.h
|
||||
@@ -30,6 +30,7 @@
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
+#include <stdbool.h>
|
||||
#include <json.h>
|
||||
|
||||
#include "libdmmp/libdmmp.h"
|
||||
@@ -82,7 +83,7 @@ static out_type func_name(struct dmmp_context *ctx, const char *var_name) { \
|
||||
do { \
|
||||
json_type j_type = json_type_null; \
|
||||
json_object *j_obj_tmp = NULL; \
|
||||
- if (json_object_object_get_ex(j_obj, key, &j_obj_tmp) != TRUE) { \
|
||||
+ if (json_object_object_get_ex(j_obj, key, &j_obj_tmp) != true) { \
|
||||
_error(ctx, "Invalid JSON output from multipathd IPC: " \
|
||||
"key '%s' not found", key); \
|
||||
rc = DMMP_ERR_IPC_ERROR; \
|
||||
--
|
||||
2.28.0
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
From ec2b935d2af33651f34de8bd6e428156005c2e3d Mon Sep 17 00:00:00 2001
|
||||
From: Martin Wilck <mwilck@suse.com>
|
||||
Date: Tue, 12 May 2020 22:13:51 +0200
|
||||
Subject: [PATCH] multipath-tools Makefile: add install dependency
|
||||
|
||||
$(libdir) must exist before running "make install" on prioritizer, checker,
|
||||
and foreign libraries.
|
||||
|
||||
Cc: Christian Hesse <mail@eworm.de>
|
||||
|
||||
Signed-off-by: Martin Wilck <mwilck@suse.com>
|
||||
Signed-off-by: Alexander Egorenkov <egorenar-dev@posteo.net>
|
||||
---
|
||||
Makefile | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index fec3b73b..8bcaba66 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -32,6 +32,10 @@ libmultipath libdmmp: libmpathcmd
|
||||
libmpathpersist multipath multipathd: libmultipath
|
||||
mpathpersist multipathd: libmpathpersist
|
||||
|
||||
+libmultipath/checkers.install \
|
||||
+ libmultipath/prioritizers.install \
|
||||
+ libmultipath/foreign.install: libmultipath.install
|
||||
+
|
||||
$(BUILDDIRS.clean):
|
||||
$(MAKE) -C ${@:.clean=} clean
|
||||
|
||||
--
|
||||
2.28.0
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# Locally computed:
|
||||
sha256 ccd73bf67621161d9e42d1a770c3a7efff6e252433e8b8ed5f64a88cb5e7151d multipath-tools-0.8.4.tar.gz
|
||||
sha256 b7993225104d90ddd8024fd838faf300bea5e83d91203eab98e29512acebd69c COPYING
|
||||
sha256 0549ebe39fd3950ec49c16304da408c2bfe1b18d386d8e6647b5bcb60363c8aa multipath-tools-0.8.5.tar.gz
|
||||
sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 LICENSES/GPL-2.0
|
||||
sha256 3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986 LICENSES/GPL-3.0
|
||||
sha256 b7993225104d90ddd8024fd838faf300bea5e83d91203eab98e29512acebd69c LICENSES/LGPL-2.0
|
||||
sha256 dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551 LICENSES/LGPL-2.1
|
||||
sha256 afa9db94ff46f8d011251273f547ba958da6a0150a2b797b10fa8c8cfa74bbda README.md
|
||||
|
||||
@@ -4,12 +4,28 @@
|
||||
#
|
||||
################################################################################
|
||||
|
||||
MULTIPATH_TOOLS_VERSION = 0.8.4
|
||||
MULTIPATH_TOOLS_SITE = $(call github,openSUSE,multipath-tools,$(MULTIPATH_TOOLS_VERSION))
|
||||
MULTIPATH_TOOLS_LICENSE = LGPL-2.0
|
||||
MULTIPATH_TOOLS_LICENSE_FILES = COPYING
|
||||
MULTIPATH_TOOLS_VERSION = 0.8.5
|
||||
MULTIPATH_TOOLS_SITE = $(call github,opensvc,multipath-tools,$(MULTIPATH_TOOLS_VERSION))
|
||||
|
||||
MULTIPATH_TOOLS_LICENSE = \
|
||||
LGPL-2.0 (default), \
|
||||
LGPL-2.1+ (libmpathcmd), \
|
||||
GPL-2.0+ (libmultipath), \
|
||||
GPL-3.0+ (libdmmp)
|
||||
MULTIPATH_TOOLS_LICENSE_FILES = \
|
||||
LICENSES/GPL-2.0 \
|
||||
LICENSES/GPL-3.0 \
|
||||
LICENSES/LGPL-2.0 \
|
||||
LICENSES/LGPL-2.1 \
|
||||
README.md
|
||||
|
||||
MULTIPATH_TOOLS_DEPENDENCIES = lvm2 json-c readline udev liburcu libaio host-pkgconf
|
||||
MULTIPATH_TOOLS_MAKE_OPTS = LIB="lib" RUN="run" OPTFLAGS="" STACKPROT=""
|
||||
MULTIPATH_TOOLS_MAKE_OPTS = \
|
||||
LIB="lib" \
|
||||
RUN="run" \
|
||||
OPTFLAGS="" \
|
||||
STACKPROT="" \
|
||||
WARNFLAGS=""
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD),y)
|
||||
MULTIPATH_TOOLS_DEPENDENCIES += systemd
|
||||
|
||||
40
package/mutt/0002-CVE-2021-3181-1.patch
Normal file
40
package/mutt/0002-CVE-2021-3181-1.patch
Normal file
@@ -0,0 +1,40 @@
|
||||
From 4a2becbdb4422aaffe3ce314991b9d670b7adf17 Mon Sep 17 00:00:00 2001
|
||||
From: Kevin McCarthy <kevin@8t8.us>
|
||||
Date: Sun, 17 Jan 2021 10:40:37 -0800
|
||||
Subject: [PATCH] Fix memory leak parsing group addresses without a display
|
||||
name.
|
||||
|
||||
When there was a group address terminator with no previous
|
||||
addresses (including the group display-name), an address would be
|
||||
allocated but not attached to the address list.
|
||||
|
||||
Change this to only allocate when last exists.
|
||||
|
||||
It would be more correct to not allocate at all unless we are inside a
|
||||
group list, but I will address that in a separate commit to master.
|
||||
|
||||
[Retrieved from:
|
||||
https://git.launchpad.net/ubuntu/+source/mutt/plain/debian/patches/CVE-2021-3181-1.patch?h=import/1.14.6-1ubuntu0.2]
|
||||
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
|
||||
---
|
||||
rfc822.c | 5 ++---
|
||||
1 file changed, 2 insertions(+), 3 deletions(-)
|
||||
|
||||
Index: mutt-1.14.6/rfc822.c
|
||||
===================================================================
|
||||
--- mutt-1.14.6.orig/rfc822.c
|
||||
+++ mutt-1.14.6/rfc822.c
|
||||
@@ -491,11 +491,10 @@ ADDRESS *rfc822_parse_adrlist (ADDRESS *
|
||||
#endif
|
||||
|
||||
/* add group terminator */
|
||||
- cur = rfc822_new_address ();
|
||||
if (last)
|
||||
{
|
||||
- last->next = cur;
|
||||
- last = cur;
|
||||
+ last->next = rfc822_new_address ();
|
||||
+ last = last->next;
|
||||
}
|
||||
|
||||
phraselen = 0;
|
||||
53
package/mutt/0003-CVE-2021-3181-2.patch
Normal file
53
package/mutt/0003-CVE-2021-3181-2.patch
Normal file
@@ -0,0 +1,53 @@
|
||||
From 939b02b33ae29bc0d642570c1dcfd4b339037d19 Mon Sep 17 00:00:00 2001
|
||||
From: Kevin McCarthy <kevin@8t8.us>
|
||||
Date: Sun, 17 Jan 2021 10:53:19 -0800
|
||||
Subject: [PATCH] Don't allocate a group terminator unless we are in a
|
||||
group-list.
|
||||
|
||||
This will reduce memory allocation for garbage/spam address lists.
|
||||
|
||||
It also makes no sense to store a terminator when there wasn't a
|
||||
display-name indicating the start of a group.
|
||||
|
||||
[Retrieved from:
|
||||
https://git.launchpad.net/ubuntu/+source/mutt/plain/debian/patches/CVE-2021-3181-2.patch?h=import/1.14.6-1ubuntu0.2]
|
||||
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
|
||||
---
|
||||
rfc822.c | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
Index: mutt-1.14.6/rfc822.c
|
||||
===================================================================
|
||||
--- mutt-1.14.6.orig/rfc822.c
|
||||
+++ mutt-1.14.6/rfc822.c
|
||||
@@ -378,7 +378,7 @@ add_addrspec (ADDRESS **top, ADDRESS **l
|
||||
|
||||
ADDRESS *rfc822_parse_adrlist (ADDRESS *top, const char *s)
|
||||
{
|
||||
- int ws_pending, nl;
|
||||
+ int ws_pending, nl, in_group = 0;
|
||||
#ifdef EXACT_ADDRESS
|
||||
const char *begin;
|
||||
#endif
|
||||
@@ -455,6 +455,7 @@ ADDRESS *rfc822_parse_adrlist (ADDRESS *
|
||||
terminate_buffer (phrase, phraselen);
|
||||
cur->mailbox = safe_strdup (phrase);
|
||||
cur->group = 1;
|
||||
+ in_group = 1;
|
||||
|
||||
if (last)
|
||||
last->next = cur;
|
||||
@@ -491,11 +492,12 @@ ADDRESS *rfc822_parse_adrlist (ADDRESS *
|
||||
#endif
|
||||
|
||||
/* add group terminator */
|
||||
- if (last)
|
||||
+ if (last && in_group)
|
||||
{
|
||||
last->next = rfc822_new_address ();
|
||||
last = last->next;
|
||||
}
|
||||
+ in_group = 0;
|
||||
|
||||
phraselen = 0;
|
||||
commentlen = 0;
|
||||
30
package/mutt/0004-CVE-2021-3181-3.patch
Normal file
30
package/mutt/0004-CVE-2021-3181-3.patch
Normal file
@@ -0,0 +1,30 @@
|
||||
From d4305208955c5cdd9fe96dfa61e7c1e14e176a14 Mon Sep 17 00:00:00 2001
|
||||
From: Kevin McCarthy <kevin@8t8.us>
|
||||
Date: Sun, 17 Jan 2021 11:05:36 -0800
|
||||
Subject: [PATCH] Add group terminator if it is left off.
|
||||
|
||||
If there is no terminating ";" add one to the list, to make the text
|
||||
re-rendering correct.
|
||||
|
||||
[Retrieved from:
|
||||
https://git.launchpad.net/ubuntu/+source/mutt/plain/debian/patches/CVE-2021-3181-3.patch?h=import/1.14.6-1ubuntu0.2]
|
||||
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
|
||||
---
|
||||
rfc822.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
Index: mutt-1.14.6/rfc822.c
|
||||
===================================================================
|
||||
--- mutt-1.14.6.orig/rfc822.c
|
||||
+++ mutt-1.14.6/rfc822.c
|
||||
@@ -560,6 +560,10 @@ ADDRESS *rfc822_parse_adrlist (ADDRESS *
|
||||
last->val = mutt_substrdup (begin, s - nl < begin ? begin : s - nl);
|
||||
#endif
|
||||
|
||||
+ /* add group terminator, if it was left off */
|
||||
+ if (last && in_group)
|
||||
+ last->next = rfc822_new_address ();
|
||||
+
|
||||
return top;
|
||||
}
|
||||
|
||||
@@ -14,6 +14,11 @@ MUTT_CONF_OPTS = --disable-doc --disable-smtp
|
||||
# 0001-Ensure-IMAP-connection-is-closed-after-a-connection-error.patch
|
||||
MUTT_IGNORE_CVES += CVE-2020-28896
|
||||
|
||||
# 0002-CVE-2021-3181-1.patch
|
||||
# 0003-CVE-2021-3181-2.patch
|
||||
# 0004-CVE-2021-3181-3.patch
|
||||
MUTT_IGNORE_CVES += CVE-2021-3181
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBICONV),y)
|
||||
MUTT_DEPENDENCIES += libiconv
|
||||
MUTT_CONF_OPTS += --enable-iconv
|
||||
|
||||
@@ -7,7 +7,6 @@ config BR2_PACKAGE_NFS_UTILS
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS # libtirpc, rpcbind
|
||||
depends on BR2_USE_MMU # fork()
|
||||
select BR2_PACKAGE_LIBTIRPC # IPv6 requires libtirpc
|
||||
select BR2_PACKAGE_RPCBIND # runtime
|
||||
help
|
||||
The NFS Linux kernel server.
|
||||
|
||||
@@ -28,6 +27,7 @@ config BR2_PACKAGE_NFS_UTILS_RPC_LOCKD
|
||||
config BR2_PACKAGE_NFS_UTILS_RPC_NFSD
|
||||
bool "rpc.nfsd"
|
||||
default y
|
||||
select BR2_PACKAGE_RPCBIND # runtime
|
||||
help
|
||||
NFS server
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# From https://nodejs.org/dist/v12.19.1/SHASUMS256.txt
|
||||
sha256 74077e0cc3db000a6f3cc685b220e609807b61adc8e7d8243e8511d478d1b17d node-v12.19.1.tar.xz
|
||||
# From https://nodejs.org/dist/v12.20.1/SHASUMS256.txt
|
||||
sha256 e00eee325d705b2bfa9929b7d061eb2315402d7e8548945eac9870bf84321853 node-v12.20.1.tar.xz
|
||||
|
||||
# Hash for license file
|
||||
sha256 0dc03af08b95ea0c1e27f8fd591dee4383eb6f2c304db6eb6cdfb6751f7da87b LICENSE
|
||||
sha256 221417a7ca275112a5ac54639b36ee3c5184e74631ea1e1b01b701293b655190 LICENSE
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user