Update Buildroot 2020.02.2 (#682)

Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
This commit is contained in:
Pascal Vizeli 2020-05-20 17:32:11 +02:00 committed by GitHub
parent ce3c80641b
commit 035e3884d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
264 changed files with 4460 additions and 1085 deletions

View File

@ -1,5 +0,0 @@
#
# Automatically generated file; DO NOT EDIT.
#
# No br2-external tree defined.

View File

@ -1,5 +0,0 @@
#
# Automatically generated file; DO NOT EDIT.
#
# No br2-external tree defined.

View File

@ -1,5 +0,0 @@
#
# Automatically generated file; DO NOT EDIT.
#
# No br2-external tree defined.

View File

@ -1,5 +0,0 @@
#
# Automatically generated file; DO NOT EDIT.
#
# No br2-external tree defined.

View File

@ -1,5 +0,0 @@
#
# Automatically generated file; DO NOT EDIT.
#
# No br2-external tree defined.

View File

@ -1,10 +0,0 @@
#
# Automatically generated file; DO NOT EDIT.
#
BR2_EXTERNAL ?=
BR2_EXTERNAL_NAMES =
BR2_EXTERNAL_DIRS =
BR2_EXTERNAL_MKS =
# No br2-external tree defined.

View File

@ -1,3 +1,45 @@
2020.02.2, released May 12th, 2020
Important / security related fixes.
Musl: Disallow on PPC64 cores without AltiVec support
(E.G. e5500).
fs/cpio: Correctly handle booting with 'console='
release: Ensure temporary .br2-external.* files are not
included in the release tarball
Defconfigs: Fix various mistyped config options, or config
options where the dependencies were no longer met.
Updated/fixed packages: apache, azure-iot-sdk-c, binutils,
boinc, c-ares, cvs, docker-cli, docker-containerd,
docker-engine, domoticz, e2fsprogs, efl, evtest, exim, ffmpeg,
freerdp, gcc, gflags, glibc, gnuconfig, haproxy, imx-gpu-2d,
irrlicht, jpeg kodi-pvr-vuplus, libarchive, libcoap,
libfpm-extra, libglib2, libhtp, libid3tag, libinput, libmad,
libopenssl, libsepol, libssh, libv4l, libvncserver, libwpe,
localedef, mariadb, matchbox, mbedtls, mc, mesa3d-headers,
meson, midori, msgpack, netsnmp, nginx, ogre, openjdk,
openldap, openvpn, p7zip, paho-mqtt-c, php, polkit, python,
python-attrs, python-crossbar, python-dpkt, python-flask,
python-future, python-iptables, python-jedi, python-markdown2,
python3, qemu, qpdf, qt5, samba4, squashfs, squid, strongswan,
suricata, tzdata, util-linux, vlc, wget, webkitgtk,
wireguard-linux-compat, wireshark, wpebackend-fdo, wpewebkit,
zic
Issues resolved (http://bugs.uclibc.org):
#11866: initramfs file system fails to boot using Grub on EFI x86_64
#12271: python-iptables runtime dependencies
#12726: systemctl preset-all failed for ctrl-alt-del.target
#12751: OpenJdk package installation issues on target
#12796: Update OpenSSL to Version 1.1.1g to patch CVE-2020-1967
#12811: bootstrap stuck and no login prompt
#12841: util-linux/sfdisk 2.35.1 fails on sector-size header
2020.02.1, released April 10th, 2020 2020.02.1, released April 10th, 2020
Important / security related fixes. Important / security related fixes.

View File

@ -484,18 +484,12 @@ F: package/sunxi-boards/
N: Carlos Santos <unixmania@gmail.com> N: Carlos Santos <unixmania@gmail.com>
F: package/busybox/ F: package/busybox/
F: package/cups/
F: package/cups-filters/
F: package/gtest/
F: package/initscripts/ F: package/initscripts/
F: package/intel-microcode/ F: package/intel-microcode/
F: package/libpam-radius-auth/
F: package/libpam-tacplus/
F: package/liburiparser/ F: package/liburiparser/
F: package/modem-manager/ F: package/modem-manager/
F: package/pamtester/ F: package/pamtester/
F: package/pcm-tools/ F: package/pcm-tools/
F: package/perl-file-util/
F: package/skeleton-custom/ F: package/skeleton-custom/
F: package/skeleton-init-common/ F: package/skeleton-init-common/
F: package/skeleton-init-none/ F: package/skeleton-init-none/
@ -676,7 +670,7 @@ F: linux/linux-ext-ev3dev-linux-drivers.mk
F: package/brickd/ F: package/brickd/
F: package/ev3dev-linux-drivers/ F: package/ev3dev-linux-drivers/
N: Davide Viti <zinosat@tiscali.it> N: Davide Viti <zinosat@gmail.com>
F: package/flann/ F: package/flann/
F: package/python-paho-mqtt/ F: package/python-paho-mqtt/
F: package/qhull/ F: package/qhull/
@ -2090,9 +2084,6 @@ F: package/libfreeimage/
N: Renaud Aubin <root@renaud.io> N: Renaud Aubin <root@renaud.io>
F: package/libhttpparser/ F: package/libhttpparser/
N: Rhys Williams <github@wilberforce.co.nz>
F: package/lirc-tools/
N: Ricardo Martincoski <ricardo.martincoski@datacom.com.br> N: Ricardo Martincoski <ricardo.martincoski@datacom.com.br>
F: package/atop/ F: package/atop/
F: package/thermald/ F: package/thermald/

View File

@ -92,9 +92,9 @@ all:
.PHONY: all .PHONY: all
# Set and export the version string # Set and export the version string
export BR2_VERSION := 2020.02.1 export BR2_VERSION := 2020.02.2
# Actual time the release is cut (for reproducible builds) # Actual time the release is cut (for reproducible builds)
BR2_VERSION_EPOCH = 1586551000 BR2_VERSION_EPOCH = 1589285000
# Save running make version since it's clobbered by the make package # Save running make version since it's clobbered by the make package
RUNNING_MAKE_VERSION := $(MAKE_VERSION) RUNNING_MAKE_VERSION := $(MAKE_VERSION)
@ -1189,7 +1189,7 @@ release: OUT = buildroot-$(BR2_VERSION)
release: release:
git archive --format=tar --prefix=$(OUT)/ HEAD > $(OUT).tar git archive --format=tar --prefix=$(OUT)/ HEAD > $(OUT).tar
$(MAKE) O=$(OUT) manual-html manual-text manual-pdf $(MAKE) O=$(OUT) manual-html manual-text manual-pdf
$(MAKE) O=$(OUT) clean $(MAKE) O=$(OUT) distclean
tar rf $(OUT).tar $(OUT) tar rf $(OUT).tar $(OUT)
gzip -9 -c < $(OUT).tar > $(OUT).tar.gz gzip -9 -c < $(OUT).tar > $(OUT).tar.gz
bzip2 -9 -c < $(OUT).tar > $(OUT).tar.bz2 bzip2 -9 -c < $(OUT).tar > $(OUT).tar.bz2

View File

@ -1,176 +0,0 @@
ODROIDC2-UBOOT-CONFIG
########################################################################
# Changes made to this are overwritten every time there's a new upgrade
# To make your changes permanent change it on
# boot.ini.default
# After changing it on boot.ini.default run the bootini command to
# rewrite this file with your personal permanent settings.
# Documentation: http://odroid.com/dokuwiki/doku.php?id=en:c2_persistent_bootini
########################################################################
# Possible screen resolutions
# Uncomment only a single Line! The line with setenv written.
# At least one mode must be selected.
# Custom modeline!
# To use custom modeline you need to disable all the below resolutions
# and setup your own!
# For more information check our wiki:
# http://odroid.com/dokuwiki/doku.php?id=en:c2_hdmi_autosetting
# Example below:
# setenv m "custombuilt"
# setenv modeline "1920,1200,154000,74040,60,1920,1968,2000,2080,1200,1202,1208,1235,1,0,1"
# 480 Lines (720x480)
# setenv m "480i60hz" # Interlaced 60Hz
# setenv m "480i_rpt" # Interlaced for Rear Projection Televisions 60Hz
# setenv m "480p60hz" # 480 Progressive 60Hz
# setenv m "480p_rpt" # 480 Progressive for Rear Projection Televisions 60Hz
# 576 Lines (720x576)
# setenv m "576i50hz" # Interlaced 50Hz
# setenv m "576i_rpt" # Interlaced for Rear Projection Televisions 50Hz
# setenv m "576p50hz" # Progressive 50Hz
# setenv m "576p_rpt" # Progressive for Rear Projection Televisions 50Hz
# 720 Lines (1280x720)
# setenv m "720p50hz" # 50Hz
# setenv m "720p60hz" # 60Hz
# 1080 Lines (1920x1080)
# setenv m "1080i60hz" # Interlaced 60Hz
setenv m "1080p60hz" # Progressive 60Hz
# setenv m "1080i50hz" # Interlaced 50Hz
# setenv m "1080p50hz" # Progressive 50Hz
# setenv m "1080p24hz" # Progressive 24Hz
# 4K (3840x2160)
# setenv m "2160p30hz" # Progressive 30Hz
# setenv m "2160p25hz" # Progressive 25Hz
# setenv m "2160p24hz" # Progressive 24Hz
# setenv m "smpte24hz" # Progressive 24Hz SMPTE
# setenv m "2160p50hz" # Progressive 50Hz
# setenv m "2160p60hz" # Progressive 60Hz
# setenv m "2160p50hz420" # Progressive 50Hz with YCbCr 4:2:0 (Requires TV/Monitor that supports it)
# setenv m "2160p60hz420" # Progressive 60Hz with YCbCr 4:2:0 (Requires TV/Monitor that supports it)
### VESA modes ###
# setenv m "640x480p60hz"
# setenv m "800x480p60hz"
# setenv m "480x800p60hz"
# setenv m "800x600p60hz"
# setenv m "1024x600p60hz"
# setenv m "1024x768p60hz"
# setenv m "1280x800p60hz"
# setenv m "1280x1024p60hz"
# setenv m "1360x768p60hz"
# setenv m "1440x900p60hz"
# setenv m "1600x900p60hz"
# setenv m "1680x1050p60hz"
# setenv m "1600x1200p60hz"
# setenv m "1920x1200p60hz"
# setenv m "2560x1080p60hz"
# setenv m "2560x1440p60hz"
# setenv m "2560x1600p60hz"
# setenv m "3440x1440p60hz"
# HDMI BPP Mode
setenv m_bpp "32"
# setenv m_bpp "24"
# setenv m_bpp "16"
# HDMI DVI/VGA modes
# By default its set to HDMI, if needed change below.
# Uncomment only a single Line.
# setenv vout "dvi"
# setenv vout "vga"
# HDMI HotPlug Detection control
# Allows you to force HDMI thinking that the cable is connected.
# true = HDMI will believe that cable is always connected
# false = will let board/monitor negotiate the connection status
setenv hpd "true"
# setenv hpd "false"
# Monitor output
# Controls if HDMI PHY should output anything to the monitor
setenv monitor_onoff "false" # true or false
# Server Mode (aka. No Graphics)
# Setting nographics to 1 will disable all video subsystem
# This mode is ideal of server type usage. (Saves ~300Mb of RAM)
setenv nographics "0"
# Meson Timer
# 1 - Meson Timer
# 0 - Arch Timer
# Using meson_timer improves the video playback however it breaks KVM (virtualization).
# Using arch timer allows KVM/Virtualization to work however you'll experience poor video
setenv mesontimer "1"
# UHS (Ultra High Speed) MicroSD mode enable/disable
setenv disableuhs "false"
# MicroSD Card Detection enable/disable
# Force the MMC controlled to believe that a card is connected.
setenv mmc_removable "true"
# USB Multi WebCam tweak
# Only enable this if you use it.
setenv usbmulticam "false"
# Default Console Device Setting
setenv condev "console=ttyS0,115200n8 console=tty0" # on both
# CPU Frequency / Cores control
###########################################
### WARNING!!! WARNING!!! WARNING!!!
# Before changing anything here please read the wiki entry:
# http://odroid.com/dokuwiki/doku.php?id=en:c2_set_cpu_freq
#
# MAX CPU's
# setenv maxcpus "1"
# setenv maxcpus "2"
# setenv maxcpus "3"
setenv maxcpus "4"
# MAX Frequency
# setenv max_freq "2016" # 2.016GHz
# setenv max_freq "1944" # 1.944GHz
# setenv max_freq "1944" # 1.944GHz
# setenv max_freq "1920" # 1.920GHz
# setenv max_freq "1896" # 1.896GHz
# setenv max_freq "1752" # 1.752GHz
# setenv max_freq "1680" # 1.680GHz
# setenv max_freq "1656" # 1.656GHz
setenv max_freq "1536" # 1.536GHz
###########################################
# Boot Arguments
if test "${m}" = "custombuilt"; then setenv cmode "modeline=${modeline}"; fi
setenv bootargs "root=/dev/mmcblk0p2 rootwait ro ${condev} no_console_suspend hdmimode=${m} ${cmode} m_bpp=${m_bpp} vout=${vout} fsck.repair=yes net.ifnames=0 elevator=noop disablehpd=${hpd} max_freq=${max_freq} maxcpus=${maxcpus} monitor_onoff=${monitor_onoff} disableuhs=${disableuhs} mmc_removable=${mmc_removable} usbmulticam=${usbmulticam}"
# Booting
setenv loadaddr "0x11000000"
setenv dtb_loadaddr "0x1000000"
setenv initrd_loadaddr "0x13000000"
fatload mmc 0:1 ${loadaddr} Image
fatload mmc 0:1 ${dtb_loadaddr} meson64_odroidc2.dtb
fdt addr ${dtb_loadaddr}
if test "${mesontimer}" = "0"; then fdt rm /meson_timer; fdt rm /cpus/cpu@0/timer; fdt rm /cpus/cpu@1/timer; fdt rm /cpus/cpu@2/timer; fdt rm /cpus/cpu@3/timer; fi
if test "${mesontimer}" = "1"; then fdt rm /timer; fi
if test "${nographics}" = "1"; then fdt rm /reserved-memory; fdt rm /aocec; fi
if test "${nographics}" = "1"; then fdt rm /meson-fb; fdt rm /amhdmitx; fdt rm /picdec; fdt rm /ppmgr; fi
if test "${nographics}" = "1"; then fdt rm /meson-vout; fdt rm /mesonstream; fdt rm /meson-fb; fi
if test "${nographics}" = "1"; then fdt rm /deinterlace; fdt rm /codec_mm; fi
booti ${loadaddr} - ${dtb_loadaddr}

View File

@ -1,27 +0,0 @@
image boot.vfat {
vfat {
files = {
"boot.ini",
"Image",
"meson64_odroidc2.dtb"
}
}
size = 32M
}
image sdcard.img {
hdimage {
}
partition vfat {
partition-type = 0xC
image = "boot.vfat"
offset = 1048576
}
partition rootfs {
partition-type = 0x83
image = "rootfs.ext4"
size = 512M
}
}

View File

@ -1,19 +0,0 @@
#!/bin/sh
BOARD_DIR="$(dirname $0)"
GENIMAGE_CFG="${BOARD_DIR}/genimage.cfg"
GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
cp ${BOARD_DIR}/boot.ini ${BINARIES_DIR}/
rm -rf "${GENIMAGE_TMP}"
genimage \
--rootpath "${TARGET_DIR}" \
--tmppath "${GENIMAGE_TMP}" \
--inputpath "${BINARIES_DIR}" \
--outputpath "${BINARIES_DIR}" \
--config "${GENIMAGE_CFG}"
dd if=${BINARIES_DIR}/u-boot.bin of=${BINARIES_DIR}/sdcard.img bs=1 count=442 conv=sync,notrunc
dd if=${BINARIES_DIR}/u-boot.bin of=${BINARIES_DIR}/sdcard.img bs=512 skip=1 seek=1 conv=fsync,notrunc

View File

@ -1,53 +0,0 @@
ODROID-C2
Intro
=====
To be able to use ODROID-C2 board with the images generated by
Buildroot, you have to prepare the SDCard or eMMC.
How to build it
===============
$ make odroidc2_defconfig
Then you can edit the build options using
$ make menuconfig
Compile all and build rootfs image:
$ make
Note: you will need to have access to the network, since Buildroot will
download the packages' sources.
Result of the build
-------------------
After building, you should obtain this tree:
output/images/
+-- Image
+-- boot.ini [1]
+-- boot.vfat
+-- meson64_odroidc2.dtb
+-- rootfs.ext2
+-- rootfs.ext4
+-- rootfs.tar
+-- sdcard.img
`-- u-boot.bin
[1] This is the ODROID-C2 configuration file used in u-boot.
How to write the SD card or eMMC
================================
Once the build process is finished you will have an image called "sdcard.img"
in the output/images/ directory.
Copy the bootable "sdcard.img" onto an SD card or eMMC with "dd":
$ sudo dd if=output/images/sdcard.img of=/dev/sdX
Insert the SDcard into your ODROID-C2, and power it up. Your new system
should come up now.

View File

@ -2,7 +2,7 @@
BOARD_DIR="$(dirname $0)" BOARD_DIR="$(dirname $0)"
$HOST_DIR/bin/mkimage -A arm -O linux -T script -C none \ install -d -m 755 $TARGET_DIR/boot
-n "boot script" -d $BOARD_DIR/boot.scr.txt $BOARD_DIR/boot.scr
install -m 0644 -D $BOARD_DIR/boot.scr $TARGET_DIR/boot/boot.scr $HOST_DIR/bin/mkimage -A arm -O linux -T script -C none \
-n "boot script" -d $BOARD_DIR/boot.scr.txt $TARGET_DIR/boot/boot.scr

View File

@ -2,7 +2,6 @@
BOARD_DIR="$(dirname $0)" BOARD_DIR="$(dirname $0)"
install -d -m 755 $TARGET_DIR/boot
$HOST_DIR/bin/mkimage -A arm -O linux -T script -C none \ $HOST_DIR/bin/mkimage -A arm -O linux -T script -C none \
-n "boot script" -d $BOARD_DIR/boot.scr.txt $BOARD_DIR/boot.scr -n "boot script" -d $BOARD_DIR/boot.scr.txt $TARGET_DIR/boot/boot.scr
install -m 0644 -D $BOARD_DIR/boot.scr $TARGET_DIR/boot/boot.scr

View File

@ -2,7 +2,7 @@
BOARD_DIR="$(dirname $0)" BOARD_DIR="$(dirname $0)"
$HOST_DIR/bin/mkimage -A arm -O linux -T script -C none \ install -d -m 755 $TARGET_DIR/boot
-n "boot script" -d $BOARD_DIR/boot.scr.txt $BOARD_DIR/boot.scr
install -m 0644 -D $BOARD_DIR/boot.scr $TARGET_DIR/boot/boot.scr $HOST_DIR/bin/mkimage -A arm -O linux -T script -C none \
-n "boot script" -d $BOARD_DIR/boot.scr.txt $TARGET_DIR/boot/boot.scr

View File

@ -40,6 +40,7 @@ BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
BR2_TARGET_GENERIC_ISSUE="Welcome to Amarula A64-Relic" BR2_TARGET_GENERIC_ISSUE="Welcome to Amarula A64-Relic"
BR2_TARGET_ROOTFS_EXT2=y BR2_TARGET_ROOTFS_EXT2=y
BR2_TARGET_ROOTFS_EXT2_4=y BR2_TARGET_ROOTFS_EXT2_4=y
BR2_PACKAGE_HOST_ANDROID_TOOLS=y
BR2_PACKAGE_HOST_ANDROID_TOOLS_FASTBOOT=y BR2_PACKAGE_HOST_ANDROID_TOOLS_FASTBOOT=y
BR2_PACKAGE_HOST_DOSFSTOOLS=y BR2_PACKAGE_HOST_DOSFSTOOLS=y
BR2_PACKAGE_HOST_GENIMAGE=y BR2_PACKAGE_HOST_GENIMAGE=y

View File

@ -9,6 +9,7 @@ BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_13=y
# System # System
BR2_TARGET_GENERIC_GETTY_PORT="ttymxc3" BR2_TARGET_GENERIC_GETTY_PORT="ttymxc3"
BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
# Bootloader # Bootloader
BR2_TARGET_UBOOT=y BR2_TARGET_UBOOT=y
@ -51,7 +52,6 @@ BR2_TOOLCHAIN_BUILDROOT_CXX=y
# qt5 # qt5
BR2_PACKAGE_QT5=y BR2_PACKAGE_QT5=y
BR2_PACKAGE_QT5BASE_LICENSE_APPROVED=y
BR2_PACKAGE_QT5BASE_OPENGL_LIB=y BR2_PACKAGE_QT5BASE_OPENGL_LIB=y
BR2_PACKAGE_QT5BASE_LINUXFB=y BR2_PACKAGE_QT5BASE_LINUXFB=y
BR2_PACKAGE_QT5BASE_FONTCONFIG=y BR2_PACKAGE_QT5BASE_FONTCONFIG=y

View File

@ -25,7 +25,7 @@ BR2_TARGET_UBOOT_FORMAT_SD=y
# Filesystem # Filesystem
BR2_TARGET_ROOTFS_EXT2=y BR2_TARGET_ROOTFS_EXT2=y
BR2_TARGET_ROOTFS_EXT4=y BR2_TARGET_ROOTFS_EXT2_4=y
# To generate SD Image # To generate SD Image
BR2_PACKAGE_HOST_DOSFSTOOLS=y BR2_PACKAGE_HOST_DOSFSTOOLS=y

View File

@ -25,7 +25,7 @@ BR2_TARGET_UBOOT_FORMAT_SD=y
# Filesystem # Filesystem
BR2_TARGET_ROOTFS_EXT2=y BR2_TARGET_ROOTFS_EXT2=y
BR2_TARGET_ROOTFS_EXT4=y BR2_TARGET_ROOTFS_EXT2_4=y
# To generate SD card image # To generate SD card image
BR2_PACKAGE_HOST_DOSFSTOOLS=y BR2_PACKAGE_HOST_DOSFSTOOLS=y

View File

@ -68,7 +68,6 @@ BR2_PACKAGE_MESA3D_DEMOS=y
# Qt5 # Qt5
BR2_PACKAGE_QT5=y BR2_PACKAGE_QT5=y
BR2_PACKAGE_QT5BASE_LICENSE_APPROVED=y
BR2_PACKAGE_QT5BASE_OPENGL_LIB=y BR2_PACKAGE_QT5BASE_OPENGL_LIB=y
BR2_PACKAGE_QT5BASE_LINUXFB=y BR2_PACKAGE_QT5BASE_LINUXFB=y
BR2_PACKAGE_QT5BASE_FONTCONFIG=y BR2_PACKAGE_QT5BASE_FONTCONFIG=y

View File

@ -42,6 +42,7 @@ BR2_PACKAGE_MESA3D_DEMOS=y
BR2_PACKAGE_MESA3D=y BR2_PACKAGE_MESA3D=y
BR2_PACKAGE_MESA3D_DRI_DRIVER_SWRAST=y BR2_PACKAGE_MESA3D_DRI_DRIVER_SWRAST=y
BR2_PACKAGE_MESA3D_DRI_DRIVER_I965=y BR2_PACKAGE_MESA3D_DRI_DRIVER_I965=y
BR2_PACKAGE_MESA3D_OPENGL_GLX=y
# Framebuffer (just for testing purposes) # Framebuffer (just for testing purposes)
BR2_PACKAGE_FB_TEST_APP=y BR2_PACKAGE_FB_TEST_APP=y

View File

@ -6,6 +6,10 @@ BR2_ARM_EABIHF=y
# Linux headers same as kernel, a 5.4 series # Linux headers same as kernel, a 5.4 series
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y
# Toolchain
# glibc is needed for sunxi-mali-mainline-package.
BR2_TOOLCHAIN_BUILDROOT_GLIBC=y
# System configuration # System configuration
BR2_TARGET_GENERIC_HOSTNAME="a20-olinuxino" BR2_TARGET_GENERIC_HOSTNAME="a20-olinuxino"
BR2_TARGET_GENERIC_ISSUE="Welcome to OLinuXino!" BR2_TARGET_GENERIC_ISSUE="Welcome to OLinuXino!"

View File

@ -6,6 +6,10 @@ BR2_ARM_EABIHF=y
# Linux headers same as kernel, a 5.4 series # Linux headers same as kernel, a 5.4 series
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y
# Toolchain
# glibc is needed for sunxi-mali-mainline-package.
BR2_TOOLCHAIN_BUILDROOT_GLIBC=y
# System configuration # System configuration
BR2_TARGET_GENERIC_HOSTNAME="a20-olinuxino" BR2_TARGET_GENERIC_HOSTNAME="a20-olinuxino"
BR2_TARGET_GENERIC_ISSUE="Welcome to OLinuXino!" BR2_TARGET_GENERIC_ISSUE="Welcome to OLinuXino!"

View File

@ -33,7 +33,7 @@ BR2_PACKAGE_ZD1211_FIRMWARE=y
# Filesystem # Filesystem
BR2_TARGET_ROOTFS_EXT2=y BR2_TARGET_ROOTFS_EXT2=y
BR2_TARGET_ROOTFS_EXT4=y BR2_TARGET_ROOTFS_EXT2_4=y
# BR2_TARGET_ROOTFS_TAR is not set # BR2_TARGET_ROOTFS_TAR is not set
# U-Boot # U-Boot

View File

@ -10,7 +10,7 @@ BR2_TARGET_ROOTFS_INITRAMFS=y
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y
# Use soft float # Use soft float
BR2_SOFT_FLOAT=y BR2_POWERPC_SOFT_FLOAT=y
# Kernel # Kernel
BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL=y

View File

@ -23,7 +23,6 @@ BR2_LINUX_KERNEL_IMAGE=y
# Bootloader # Bootloader
BR2_TARGET_OPENSBI=y BR2_TARGET_OPENSBI=y
BR2_TARGET_OPENSBI_USE_PLAT=y
BR2_TARGET_OPENSBI_PLAT="qemu/virt" BR2_TARGET_OPENSBI_PLAT="qemu/virt"
# host-qemu for gitlab testing # host-qemu for gitlab testing

View File

@ -22,7 +22,6 @@ BR2_LINUX_KERNEL_IMAGE=y
# Bootloader # Bootloader
BR2_TARGET_OPENSBI=y BR2_TARGET_OPENSBI=y
BR2_TARGET_OPENSBI_USE_PLAT=y
BR2_TARGET_OPENSBI_PLAT="qemu/virt" BR2_TARGET_OPENSBI_PLAT="qemu/virt"
# host-qemu for gitlab testing # host-qemu for gitlab testing

View File

@ -98,10 +98,9 @@ Note that:
dependencies are automatically added as needed by the Python dependencies are automatically added as needed by the Python
package infrastructure. package infrastructure.
* Similarly, it is not needed to add +host-setuptools+ and/or * Similarly, it is not needed to add +host-setuptools+ to
+host-distutilscross+ dependencies to +PYTHON_FOO_DEPENDENCIES+ for +PYTHON_FOO_DEPENDENCIES+ for setuptools-based packages, since it's
setuptools-based packages, since these are automatically added by automatically added by the Python infrastructure as needed.
the Python infrastructure as needed.
One variable specific to the Python infrastructure is mandatory: One variable specific to the Python infrastructure is mandatory:

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@ -163,13 +163,13 @@ List of Examples
--------------------------------------------------------------------- ---------------------------------------------------------------------
Buildroot 2020.02.1 manual generated on 2020-04-10 20:45:00 UTC from Buildroot 2020.02.2 manual generated on 2020-05-12 12:18:45 UTC from
git revision 80e565bbeb git revision 2f7183d131
The Buildroot manual is written by the Buildroot developers. It is The Buildroot manual is written by the Buildroot developers. It is
licensed under the GNU General Public License, version 2. Refer to licensed under the GNU General Public License, version 2. Refer to
the COPYING [http://git.buildroot.org/buildroot/tree/COPYING?id= the COPYING [http://git.buildroot.org/buildroot/tree/COPYING?id=
80e565bbebc61bf113bcd3b3475fa27a5127f466] file in the Buildroot 2f7183d13133f2ded97fee273bd0cbed10226e4e] file in the Buildroot
sources for the full text of this license. sources for the full text of this license.
Copyright © 2004-2020 The Buildroot developers Copyright © 2004-2020 The Buildroot developers
@ -5167,10 +5167,9 @@ Note that:
PYTHON_FOO_DEPENDENCIES variable of a package, since these basic PYTHON_FOO_DEPENDENCIES variable of a package, since these basic
dependencies are automatically added as needed by the Python dependencies are automatically added as needed by the Python
package infrastructure. package infrastructure.
* Similarly, it is not needed to add host-setuptools and/or * Similarly, it is not needed to add host-setuptools to
host-distutilscross dependencies to PYTHON_FOO_DEPENDENCIES for PYTHON_FOO_DEPENDENCIES for setuptools-based packages, since its
setuptools-based packages, since these are automatically added by automatically added by the Python infrastructure as needed.
the Python infrastructure as needed.
One variable specific to the Python infrastructure is mandatory: One variable specific to the Python infrastructure is mandatory:

View File

@ -1,7 +1,4 @@
#!/bin/sh #!/bin/sh
# devtmpfs does not get automounted for initramfs # devtmpfs does not get automounted for initramfs
/bin/mount -t devtmpfs devtmpfs /dev /bin/mount -t devtmpfs devtmpfs /dev
exec 0</dev/console
exec 1>/dev/console
exec 2>/dev/console
exec /sbin/init "$@" exec /sbin/init "$@"

View File

@ -30,7 +30,7 @@ config BR2_LINUX_KERNEL_LATEST_VERSION
bool "Latest version (5.4)" bool "Latest version (5.4)"
config BR2_LINUX_KERNEL_LATEST_CIP_VERSION config BR2_LINUX_KERNEL_LATEST_CIP_VERSION
bool "Latest CIP SLTS version (4.19.98-cip19)" bool "Latest CIP SLTS version (4.19.118-cip25)"
help help
CIP launched in the spring of 2016 to address the needs of CIP launched in the spring of 2016 to address the needs of
organizations in industries such as power generation and organizations in industries such as power generation and
@ -49,7 +49,7 @@ config BR2_LINUX_KERNEL_LATEST_CIP_VERSION
https://www.cip-project.org https://www.cip-project.org
config BR2_LINUX_KERNEL_LATEST_CIP_RT_VERSION config BR2_LINUX_KERNEL_LATEST_CIP_RT_VERSION
bool "Latest CIP RT SLTS version (4.19.98-cip19-rt7)" bool "Latest CIP RT SLTS version (4.19.115-cip24-rt9)"
help help
Same as the CIP version, but this is the PREEMPT_RT realtime Same as the CIP version, but this is the PREEMPT_RT realtime
variant. variant.
@ -128,9 +128,9 @@ endif
config BR2_LINUX_KERNEL_VERSION config BR2_LINUX_KERNEL_VERSION
string string
default "5.4.31" if BR2_LINUX_KERNEL_LATEST_VERSION default "5.4.40" if BR2_LINUX_KERNEL_LATEST_VERSION
default "4.19.98-cip19" if BR2_LINUX_KERNEL_LATEST_CIP_VERSION default "4.19.118-cip25" if BR2_LINUX_KERNEL_LATEST_CIP_VERSION
default "4.19.98-cip19-rt7" if BR2_LINUX_KERNEL_LATEST_CIP_RT_VERSION default "4.19.115-cip24-rt9" if BR2_LINUX_KERNEL_LATEST_CIP_RT_VERSION
default BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE \ default BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE \
if BR2_LINUX_KERNEL_CUSTOM_VERSION if BR2_LINUX_KERNEL_CUSTOM_VERSION
default "custom" if BR2_LINUX_KERNEL_CUSTOM_TARBALL default "custom" if BR2_LINUX_KERNEL_CUSTOM_TARBALL

View File

@ -1,13 +1,13 @@
# From https://www.kernel.org/pub/linux/kernel/v5.x/sha256sums.asc # From https://www.kernel.org/pub/linux/kernel/v5.x/sha256sums.asc
sha256 a11083f8f809887f6a0f8d4467532385b99418f17998fe6e837807491c276eeb linux-5.4.31.tar.xz sha256 83563f027687ecaafb41d0d2d52056f40ec9822f8a9e43592e215349730020ab linux-5.4.40.tar.xz
# From https://www.kernel.org/pub/linux/kernel/v4.x/sha256sums.asc # From https://www.kernel.org/pub/linux/kernel/v4.x/sha256sums.asc
sha256 ea68cb8e9fa255bb1d0402c5aa8f26984f9b1c8607ff3bed5d3284109167f063 linux-4.4.218.tar.xz sha256 cd963e66d7fb07f142fa5274ec90f46c8388a327e2ba28c5fec245d734b0d425 linux-4.4.223.tar.xz
sha256 df3a6e615ec4c57b04775e9c018c67045223ac662e696d28fd37baa5114349cd linux-4.9.218.tar.xz sha256 cf5300e6f5d8c66c2bed8f00d53f9c58103731809862427012e4010f5d782ae5 linux-4.9.223.tar.xz
sha256 cb440ac5d20071dcb482e5062958514064b0c5a8375c92653062ea201ae0222c linux-4.14.175.tar.xz sha256 444ef973d9b6a6ea174e4a9086f0aea980d8575d13302e431ad688f22e27ed0e linux-4.14.180.tar.xz
sha256 1e40a0dc6afc95a259f97b80d5f5ef8f89e2ee49e993ba6844e2bc55de361f0e linux-4.19.114.tar.xz sha256 5050268ec5cf003d96366d1611ecfa4ab6974125d6fa26cea1ccb81dd4df00a5 linux-4.19.122.tar.xz
# Locally computed # Locally computed
sha256 18f9ddba0b777d1942d6c81877ba97c4bcd08488e2c409e57dcce866b9de5fc2 linux-cip-4.19.98-cip19.tar.gz sha256 ea53913813cb5a9069608532b327de7a7ed0fdc8fed8c6f10cd55d1ac6a58ffb linux-cip-4.19.118-cip25.tar.gz
sha256 7d5aeb67da41dc66ef28621ef994ef4403e8b1f5c3df38b1843da20972444280 linux-cip-4.19.98-cip19-rt7.tar.gz sha256 7f0a0db0e1cfb14053523f4432f1ad1468b5bd42305b44905c4b103466c8d655 linux-cip-4.19.115-cip24-rt9.tar.gz
# Licenses hashes # Licenses hashes
sha256 ee5808b032a67f587d3541099d46de34f5bec8cd5976114ba07f1299ee6001ff COPYING sha256 ee5808b032a67f587d3541099d46de34f5bec8cd5976114ba07f1299ee6001ff COPYING

View File

@ -0,0 +1,77 @@
From 5b95d256387b45fbe33f7ee7890ae35afdd5c371 Mon Sep 17 00:00:00 2001
From: Joe Orton <jorton@apache.org>
Date: Fri, 13 Mar 2020 14:34:18 +0000
Subject: [PATCH] * server/log.c (ap_log_pid): Use a temporary file, then
rename once successfully written; also add error checking. Avoids startup
failures if a previous httpd invocation crashed while writing the pidfile.
Submitted by: Nicolas Carrier <carrier.nicolas0 gmail.com>, jorton
Github: closes #100, closes #69
PR: 63140
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1875153 13f79535-47bb-0310-9956-ffa450edef68
Signed-off-by: Nicolas Carrier <nicolas.carrier@orolia.com>
---
server/log.c | 33 ++++++++++++++++++++++++++-------
1 file changed, 26 insertions(+), 7 deletions(-)
diff --git a/server/log.c b/server/log.c
index f0bde6e4b8..8d54b4e057 100644
--- a/server/log.c
+++ b/server/log.c
@@ -1598,6 +1598,9 @@ AP_DECLARE(void) ap_log_pid(apr_pool_t *p, const char *filename)
pid_t mypid;
apr_status_t rv;
const char *fname;
+ char *temp_fname;
+ apr_fileperms_t perms;
+ char pidstr[64];
if (!filename) {
return;
@@ -1626,19 +1629,35 @@ AP_DECLARE(void) ap_log_pid(apr_pool_t *p, const char *filename)
fname);
}
- if ((rv = apr_file_open(&pid_file, fname,
- APR_WRITE | APR_CREATE | APR_TRUNCATE,
- APR_UREAD | APR_UWRITE | APR_GREAD | APR_WREAD, p))
- != APR_SUCCESS) {
+ temp_fname = apr_pstrcat(p, fname, ".XXXXXX", NULL);
+ rv = apr_file_mktemp(&pid_file, temp_fname,
+ APR_FOPEN_WRITE | APR_FOPEN_CREATE | APR_FOPEN_TRUNCATE, p);
+ if (rv != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_ERR, rv, NULL, APLOGNO(00099)
- "could not create %s", fname);
+ "could not create %s", temp_fname);
ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, APLOGNO(00100)
"%s: could not log pid to file %s",
ap_server_argv0, fname);
exit(1);
}
- apr_file_printf(pid_file, "%" APR_PID_T_FMT APR_EOL_STR, mypid);
- apr_file_close(pid_file);
+
+ apr_snprintf(pidstr, sizeof pidstr, "%" APR_PID_T_FMT APR_EOL_STR, mypid);
+
+ perms = APR_UREAD | APR_UWRITE | APR_GREAD | APR_WREAD;
+ rv = apr_file_perms_set(temp_fname, perms);
+ if (rv == APR_SUCCESS)
+ rv = apr_file_write_full(pid_file, pidstr, strlen(pidstr), NULL);
+ if (rv == APR_SUCCESS)
+ rv = apr_file_close(pid_file);
+ if (rv == APR_SUCCESS)
+ rv = apr_file_rename(temp_fname, fname, p);
+ if (rv != APR_SUCCESS) {
+ ap_log_error(APLOG_MARK, APLOG_ERR, rv, NULL, APLOGNO(10231)
+ "%s: Failed creating pid file %s",
+ ap_server_argv0, temp_fname);
+ exit(1);
+ }
+
saved_pid = mypid;
}
--
2.25.2

View File

@ -1,4 +1,4 @@
# From http://archive.apache.org/dist/httpd/httpd-2.4.41.tar.bz2.sha256 # From http://archive.apache.org/dist/httpd/httpd-2.4.43.tar.bz2.sha256
sha256 133d48298fe5315ae9366a0ec66282fa4040efa5d566174481077ade7d18ea40 httpd-2.4.41.tar.bz2 sha256 a497652ab3fc81318cdc2a203090a999150d86461acff97c1065dc910fe10f43 httpd-2.4.43.tar.bz2
# Locally computed # Locally computed
sha256 c49c0819a726b70142621715dae3159c47b0349c2bc9db079070f28dadac0229 LICENSE sha256 47b8c2b6c3309282a99d4a3001575c790fead690cc14734628c4667d2bbffc43 LICENSE

View File

@ -4,7 +4,7 @@
# #
################################################################################ ################################################################################
APACHE_VERSION = 2.4.41 APACHE_VERSION = 2.4.43
APACHE_SOURCE = httpd-$(APACHE_VERSION).tar.bz2 APACHE_SOURCE = httpd-$(APACHE_VERSION).tar.bz2
APACHE_SITE = http://archive.apache.org/dist/httpd APACHE_SITE = http://archive.apache.org/dist/httpd
APACHE_LICENSE = Apache-2.0 APACHE_LICENSE = Apache-2.0
@ -99,6 +99,7 @@ APACHE_CONF_OPTS += --disable-deflate
endif endif
define APACHE_FIX_STAGING_APACHE_CONFIG define APACHE_FIX_STAGING_APACHE_CONFIG
$(SED) 's%"/usr/bin"%"$(STAGING_DIR)/usr/bin"%' $(STAGING_DIR)/usr/bin/apxs
$(SED) 's%/usr/build%$(STAGING_DIR)/usr/build%' $(STAGING_DIR)/usr/bin/apxs $(SED) 's%/usr/build%$(STAGING_DIR)/usr/build%' $(STAGING_DIR)/usr/bin/apxs
$(SED) 's%^prefix =.*%prefix = $(STAGING_DIR)/usr%' $(STAGING_DIR)/usr/build/config_vars.mk $(SED) 's%^prefix =.*%prefix = $(STAGING_DIR)/usr%' $(STAGING_DIR)/usr/build/config_vars.mk
endef endef

View File

@ -17,35 +17,55 @@ AZURE_IOT_SDK_C_CONF_OPTS = -Dskip_samples=ON
# The project only supports building one kind of library. # The project only supports building one kind of library.
# Further the install target installs the wrong files, so we do it here: # Further the install target installs the wrong files, so we do it here:
ifeq ($(BR2_STATIC_LIBS),y) ifeq ($(BR2_STATIC_LIBS),y)
AZURE_IOT_SDK_C_LIBS += uamqp/libuamqp.a c-utility/libaziotsharedutil.a \ AZURE_IOT_SDK_C_LIBS += \
iothub_client/libiothub_client.a iothub_client/libiothub_client_mqtt_ws_transport.a \ uamqp/libuamqp.a \
c-utility/libaziotsharedutil.a \
iothub_client/libiothub_client.a \
iothub_client/libiothub_client_mqtt_ws_transport.a \
iothub_client/libiothub_client_amqp_ws_transport.a \ iothub_client/libiothub_client_amqp_ws_transport.a \
iothub_client/libiothub_client_http_transport.a \ iothub_client/libiothub_client_http_transport.a \
iothub_client/libiothub_client_amqp_transport.a \ iothub_client/libiothub_client_amqp_transport.a \
iothub_client/libiothub_client_mqtt_transport.a \ iothub_client/libiothub_client_mqtt_transport.a \
iothub_service_client/libiothub_service_client.a serializer/libserializer.a umqtt/libumqtt.a iothub_service_client/libiothub_service_client.a \
serializer/libserializer.a \
umqtt/libumqtt.a \
libparson.a
else else
AZURE_IOT_SDK_C_LIBS += uamqp/libuamqp.so c-utility/libaziotsharedutil.so \ AZURE_IOT_SDK_C_LIBS += \
iothub_client/libiothub_client.so iothub_client/libiothub_client_mqtt_ws_transport.so \ uamqp/libuamqp.so \
c-utility/libaziotsharedutil.so \
iothub_client/libiothub_client.so \
iothub_client/libiothub_client_mqtt_ws_transport.so \
iothub_client/libiothub_client_amqp_ws_transport.so \ iothub_client/libiothub_client_amqp_ws_transport.so \
iothub_client/libiothub_client_http_transport.so \ iothub_client/libiothub_client_http_transport.so \
iothub_client/libiothub_client_amqp_transport.so \ iothub_client/libiothub_client_amqp_transport.so \
iothub_client/libiothub_client_mqtt_transport.so \ iothub_client/libiothub_client_mqtt_transport.so \
iothub_service_client/libiothub_service_client.so serializer/libserializer.so umqtt/libumqtt.so iothub_service_client/libiothub_service_client.so \
serializer/libserializer.so \
umqtt/libumqtt.so.1.1.11 \
libparson.so
define AZURE_IOT_SDK_C_CREATE_SYMLINKS
ln -sf libumqtt.so.1.1.11 $(1)/usr/lib/libumqtt.so.1
ln -sf libumqtt.so.1.1.11 $(1)/usr/lib/libumqtt.so
endef
endif endif
define AZURE_IOT_SDK_C_INSTALL_STAGING_CMDS define AZURE_IOT_SDK_C_INSTALL_LIBS
$(foreach l,$(AZURE_IOT_SDK_C_LIBS), \ $(foreach l,$(AZURE_IOT_SDK_C_LIBS), \
$(INSTALL) -D -m 0755 $(@D)/$(l) $(STAGING_DIR)/usr/lib/ $(INSTALL) -D -m 0755 $(@D)/$(l) $(1)/usr/lib/$(notdir $(l))
) )
$(call AZURE_IOT_SDK_C_CREATE_SYMLINKS,$(1))
endef
define AZURE_IOT_SDK_C_INSTALL_STAGING_CMDS
$(call AZURE_IOT_SDK_C_INSTALL_LIBS,$(STAGING_DIR))
cp -a $(@D)/c-utility/inc/* $(STAGING_DIR)/usr/include/ cp -a $(@D)/c-utility/inc/* $(STAGING_DIR)/usr/include/
cp -a $(@D)/iothub_client/inc/* $(STAGING_DIR)/usr/include/ cp -a $(@D)/iothub_client/inc/* $(STAGING_DIR)/usr/include/
endef endef
define AZURE_IOT_SDK_C_INSTALL_TARGET_CMDS define AZURE_IOT_SDK_C_INSTALL_TARGET_CMDS
$(foreach l,$(AZURE_IOT_SDK_C_LIBS), \ $(call AZURE_IOT_SDK_C_INSTALL_LIBS,$(TARGET_DIR))
$(INSTALL) -D -m 0755 $(@D)/$(l) $(TARGET_DIR)/usr/lib/
)
endef endef
$(eval $(cmake-package)) $(eval $(cmake-package))

View File

@ -0,0 +1,376 @@
From c7a1d1f656c717394937a92cb970f0f4cecce128 Mon Sep 17 00:00:00 2001
From: Max Filippov <jcmvbkbc@gmail.com>
Date: Sun, 19 Apr 2020 19:04:41 -0700
Subject: [PATCH] xtensa: fix PR ld/25861
Introduce new relaxations XTENSA_PDIFF{8,16,32} for positive differences
(subtracted symbol precedes diminished symbol) and XTENSA_NDIFF{8,16,32}
for negative differences (subtracted symbol follows diminished symbol).
Don't generate XTENSA_DIFF relocations in the assembler, generate
XTENSA_PDIFF or XTENSA_NDIFF based on relative symbol position.
Handle XTENSA_DIFF in BFD for compatibility with old object files.
Handle XTENSA_PDIFF and XTENSA_NDIFF in BFD, treating difference value
as unsigned.
2020-04-22 Max Filippov <jcmvbkbc@gmail.com>
bfd/
* bfd-in2.h: Regenerated.
* elf32-xtensa.c (elf_howto_table): New entries for
R_XTENSA_PDIFF{8,16,32} and R_XTENSA_NDIFF{8,16,32}.
(elf_xtensa_reloc_type_lookup, elf_xtensa_do_reloc)
(relax_section): Add cases for R_XTENSA_PDIFF{8,16,32} and
R_XTENSA_NDIFF{8,16,32}.
* libbfd.h (bfd_reloc_code_real_names): Add names for
BFD_RELOC_XTENSA_PDIFF{8,16,32} and
BFD_RELOC_XTENSA_NDIFF{8,16,32}.
* reloc.c: Add documentation for BFD_RELOC_XTENSA_PDIFF{8,16,32}
and BFD_RELOC_XTENSA_NDIFF{8,16,32}.
binutils/
* readelf.c (is_none_reloc): Recognize
BFD_RELOC_XTENSA_PDIFF{8,16,32} and
BFD_RELOC_XTENSA_NDIFF{8,16,32}.
gas/
* config/tc-xtensa.c (md_apply_fix): Replace
BFD_RELOC_XTENSA_DIFF{8,16,32} generation with
BFD_RELOC_XTENSA_PDIFF{8,16,32} and
BFD_RELOC_XTENSA_NDIFF{8,16,32} generation.
* testsuite/gas/xtensa/loc.d: Replace BFD_RELOC_XTENSA_DIFF16
with BFD_RELOC_XTENSA_PDIFF16 in the expected output.
include/
* elf/xtensa.h (elf_xtensa_reloc_type): New entries for
R_XTENSA_PDIFF{8,16,32} and R_XTENSA_NDIFF{8,16,32}.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
Backported from: 30ce8e47fad9b057b6d7af9e1d43061126d34d20
bfd/bfd-in2.h | 20 ++++++-
bfd/elf32-xtensa.c | 89 +++++++++++++++++++++++++++++-
bfd/libbfd.h | 6 ++
bfd/reloc.c | 24 ++++++++
binutils/readelf.c | 8 ++-
gas/config/tc-xtensa.c | 12 +++-
gas/testsuite/gas/xtensa/loc.d | 2 +-
include/elf/xtensa.h | 6 ++
11 files changed, 160 insertions(+), 7 deletions(-)
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index 37114607b515..be6a30f57955 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -5217,7 +5217,9 @@ to one of its own internal functions or data structures. */
PLT entries. Otherwise, this is just a generic 32-bit relocation. */
BFD_RELOC_XTENSA_PLT,
-/* Xtensa relocations to mark the difference of two local symbols.
+/* Xtensa relocations for backward compatibility. These have been replaced
+by BFD_RELOC_XTENSA_PDIFF and BFD_RELOC_XTENSA_NDIFF.
+Xtensa relocations to mark the difference of two local symbols.
These are only needed to support linker relaxation and can be ignored
when not relaxing. The field is set to the value of the difference
assuming no relaxation. The relocation encodes the position of the
@@ -5291,6 +5293,22 @@ BFD_RELOC_XTENSA_ASM_EXPAND. */
BFD_RELOC_XTENSA_TLS_ARG,
BFD_RELOC_XTENSA_TLS_CALL,
+/* Xtensa relocations to mark the difference of two local symbols.
+These are only needed to support linker relaxation and can be ignored
+when not relaxing. The field is set to the value of the difference
+assuming no relaxation. The relocation encodes the position of the
+subtracted symbol so the linker can determine whether to adjust the field
+value. PDIFF relocations are used for positive differences, NDIFF
+relocations are used for negative differences. The difference value
+is treated as unsigned with these relocation types, giving full
+8/16 value ranges. */
+ BFD_RELOC_XTENSA_PDIFF8,
+ BFD_RELOC_XTENSA_PDIFF16,
+ BFD_RELOC_XTENSA_PDIFF32,
+ BFD_RELOC_XTENSA_NDIFF8,
+ BFD_RELOC_XTENSA_NDIFF16,
+ BFD_RELOC_XTENSA_NDIFF32,
+
/* 8 bit signed offset in (ix+d) or (iy+d). */
BFD_RELOC_Z80_DISP8,
diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c
index 473a9d76f289..fded42d52a9a 100644
--- a/bfd/elf32-xtensa.c
+++ b/bfd/elf32-xtensa.c
@@ -325,6 +325,20 @@ static reloc_howto_type elf_howto_table[] =
HOWTO (R_XTENSA_TLS_CALL, 0, 0, 0, FALSE, 0, complain_overflow_dont,
bfd_elf_xtensa_reloc, "R_XTENSA_TLS_CALL",
FALSE, 0, 0, FALSE),
+
+ HOWTO (R_XTENSA_PDIFF8, 0, 0, 8, FALSE, 0, complain_overflow_bitfield,
+ bfd_elf_xtensa_reloc, "R_XTENSA_PDIFF8", FALSE, 0, 0xff, FALSE),
+ HOWTO (R_XTENSA_PDIFF16, 0, 1, 16, FALSE, 0, complain_overflow_bitfield,
+ bfd_elf_xtensa_reloc, "R_XTENSA_PDIFF16", FALSE, 0, 0xffff, FALSE),
+ HOWTO (R_XTENSA_PDIFF32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,
+ bfd_elf_xtensa_reloc, "R_XTENSA_PDIFF32", FALSE, 0, 0xffffffff, FALSE),
+
+ HOWTO (R_XTENSA_NDIFF8, 0, 0, 8, FALSE, 0, complain_overflow_bitfield,
+ bfd_elf_xtensa_reloc, "R_XTENSA_NDIFF8", FALSE, 0, 0xff, FALSE),
+ HOWTO (R_XTENSA_NDIFF16, 0, 1, 16, FALSE, 0, complain_overflow_bitfield,
+ bfd_elf_xtensa_reloc, "R_XTENSA_NDIFF16", FALSE, 0, 0xffff, FALSE),
+ HOWTO (R_XTENSA_NDIFF32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,
+ bfd_elf_xtensa_reloc, "R_XTENSA_NDIFF32", FALSE, 0, 0xffffffff, FALSE),
};
#if DEBUG_GEN_RELOC
@@ -364,6 +378,30 @@ elf_xtensa_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
TRACE ("BFD_RELOC_XTENSA_DIFF32");
return &elf_howto_table[(unsigned) R_XTENSA_DIFF32 ];
+ case BFD_RELOC_XTENSA_PDIFF8:
+ TRACE ("BFD_RELOC_XTENSA_PDIFF8");
+ return &elf_howto_table[(unsigned) R_XTENSA_PDIFF8 ];
+
+ case BFD_RELOC_XTENSA_PDIFF16:
+ TRACE ("BFD_RELOC_XTENSA_PDIFF16");
+ return &elf_howto_table[(unsigned) R_XTENSA_PDIFF16 ];
+
+ case BFD_RELOC_XTENSA_PDIFF32:
+ TRACE ("BFD_RELOC_XTENSA_PDIFF32");
+ return &elf_howto_table[(unsigned) R_XTENSA_PDIFF32 ];
+
+ case BFD_RELOC_XTENSA_NDIFF8:
+ TRACE ("BFD_RELOC_XTENSA_NDIFF8");
+ return &elf_howto_table[(unsigned) R_XTENSA_NDIFF8 ];
+
+ case BFD_RELOC_XTENSA_NDIFF16:
+ TRACE ("BFD_RELOC_XTENSA_NDIFF16");
+ return &elf_howto_table[(unsigned) R_XTENSA_NDIFF16 ];
+
+ case BFD_RELOC_XTENSA_NDIFF32:
+ TRACE ("BFD_RELOC_XTENSA_NDIFF32");
+ return &elf_howto_table[(unsigned) R_XTENSA_NDIFF32 ];
+
case BFD_RELOC_XTENSA_RTLD:
TRACE ("BFD_RELOC_XTENSA_RTLD");
return &elf_howto_table[(unsigned) R_XTENSA_RTLD ];
@@ -1851,6 +1889,12 @@ elf_xtensa_do_reloc (reloc_howto_type *howto,
case R_XTENSA_DIFF8:
case R_XTENSA_DIFF16:
case R_XTENSA_DIFF32:
+ case R_XTENSA_PDIFF8:
+ case R_XTENSA_PDIFF16:
+ case R_XTENSA_PDIFF32:
+ case R_XTENSA_NDIFF8:
+ case R_XTENSA_NDIFF16:
+ case R_XTENSA_NDIFF32:
case R_XTENSA_TLS_FUNC:
case R_XTENSA_TLS_ARG:
case R_XTENSA_TLS_CALL:
@@ -9604,7 +9648,13 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info)
if (r_type == R_XTENSA_DIFF8
|| r_type == R_XTENSA_DIFF16
- || r_type == R_XTENSA_DIFF32)
+ || r_type == R_XTENSA_DIFF32
+ || r_type == R_XTENSA_PDIFF8
+ || r_type == R_XTENSA_PDIFF16
+ || r_type == R_XTENSA_PDIFF32
+ || r_type == R_XTENSA_NDIFF8
+ || r_type == R_XTENSA_NDIFF16
+ || r_type == R_XTENSA_NDIFF32)
{
bfd_signed_vma diff_value = 0;
bfd_vma new_end_offset, diff_mask = 0;
@@ -9631,8 +9681,27 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info)
diff_value =
bfd_get_signed_32 (abfd, &contents[old_source_offset]);
break;
+ case R_XTENSA_PDIFF8:
+ case R_XTENSA_NDIFF8:
+ diff_value =
+ bfd_get_8 (abfd, &contents[old_source_offset]);
+ break;
+ case R_XTENSA_PDIFF16:
+ case R_XTENSA_NDIFF16:
+ diff_value =
+ bfd_get_16 (abfd, &contents[old_source_offset]);
+ break;
+ case R_XTENSA_PDIFF32:
+ case R_XTENSA_NDIFF32:
+ diff_value =
+ bfd_get_32 (abfd, &contents[old_source_offset]);
+ break;
}
+ if (r_type >= R_XTENSA_NDIFF8
+ && r_type <= R_XTENSA_NDIFF32)
+ diff_value = -diff_value;
+
new_end_offset = offset_with_removed_text_map
(&target_relax_info->action_list,
r_rel.target_offset + diff_value);
@@ -9655,6 +9724,24 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info)
bfd_put_signed_32 (abfd, diff_value,
&contents[old_source_offset]);
break;
+ case R_XTENSA_PDIFF8:
+ case R_XTENSA_NDIFF8:
+ diff_mask = 0xff;
+ bfd_put_8 (abfd, diff_value,
+ &contents[old_source_offset]);
+ break;
+ case R_XTENSA_PDIFF16:
+ case R_XTENSA_NDIFF16:
+ diff_mask = 0xffff;
+ bfd_put_16 (abfd, diff_value,
+ &contents[old_source_offset]);
+ break;
+ case R_XTENSA_PDIFF32:
+ case R_XTENSA_NDIFF32:
+ diff_mask = 0xffffffff;
+ bfd_put_32 (abfd, diff_value,
+ &contents[old_source_offset]);
+ break;
}
/* Check for overflow. Sign bits must be all zeroes or all ones */
diff --git a/bfd/libbfd.h b/bfd/libbfd.h
index 3c184fcadadf..989f4bc0b595 100644
--- a/bfd/libbfd.h
+++ b/bfd/libbfd.h
@@ -2919,6 +2919,12 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_XTENSA_TLS_FUNC",
"BFD_RELOC_XTENSA_TLS_ARG",
"BFD_RELOC_XTENSA_TLS_CALL",
+ "BFD_RELOC_XTENSA_PDIFF8",
+ "BFD_RELOC_XTENSA_PDIFF16",
+ "BFD_RELOC_XTENSA_PDIFF32",
+ "BFD_RELOC_XTENSA_NDIFF8",
+ "BFD_RELOC_XTENSA_NDIFF16",
+ "BFD_RELOC_XTENSA_NDIFF32",
"BFD_RELOC_Z80_DISP8",
"BFD_RELOC_Z80_BYTE0",
"BFD_RELOC_Z80_BYTE1",
diff --git a/bfd/reloc.c b/bfd/reloc.c
index c4dec86d1d46..f5df8e2ab3eb 100644
--- a/bfd/reloc.c
+++ b/bfd/reloc.c
@@ -6556,6 +6556,8 @@ ENUMX
ENUMX
BFD_RELOC_XTENSA_DIFF32
ENUMDOC
+ Xtensa relocations for backward compatibility. These have been replaced
+ by BFD_RELOC_XTENSA_PDIFF and BFD_RELOC_XTENSA_NDIFF.
Xtensa relocations to mark the difference of two local symbols.
These are only needed to support linker relaxation and can be ignored
when not relaxing. The field is set to the value of the difference
@@ -6668,6 +6670,28 @@ ENUMX
BFD_RELOC_XTENSA_TLS_CALL
ENUMDOC
Xtensa TLS relocations.
+ENUM
+ BFD_RELOC_XTENSA_PDIFF8
+ENUMX
+ BFD_RELOC_XTENSA_PDIFF16
+ENUMX
+ BFD_RELOC_XTENSA_PDIFF32
+ENUMX
+ BFD_RELOC_XTENSA_NDIFF8
+ENUMX
+ BFD_RELOC_XTENSA_NDIFF16
+ENUMX
+ BFD_RELOC_XTENSA_NDIFF32
+ENUMDOC
+ Xtensa relocations to mark the difference of two local symbols.
+ These are only needed to support linker relaxation and can be ignored
+ when not relaxing. The field is set to the value of the difference
+ assuming no relaxation. The relocation encodes the position of the
+ subtracted symbol so the linker can determine whether to adjust the field
+ value. PDIFF relocations are used for positive differences, NDIFF
+ relocations are used for negative differences. The difference value
+ is treated as unsigned with these relocation types, giving full
+ 8/16 value ranges.
ENUM
BFD_RELOC_Z80_DISP8
diff --git a/binutils/readelf.c b/binutils/readelf.c
index d4756c93b345..800918f901c8 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -13262,7 +13262,13 @@ is_none_reloc (Filedata * filedata, unsigned int reloc_type)
return (reloc_type == 0 /* R_XTENSA_NONE. */
|| reloc_type == 17 /* R_XTENSA_DIFF8. */
|| reloc_type == 18 /* R_XTENSA_DIFF16. */
- || reloc_type == 19 /* R_XTENSA_DIFF32. */);
+ || reloc_type == 19 /* R_XTENSA_DIFF32. */
+ || reloc_type == 57 /* R_XTENSA_PDIFF8. */
+ || reloc_type == 58 /* R_XTENSA_PDIFF16. */
+ || reloc_type == 59 /* R_XTENSA_PDIFF32. */
+ || reloc_type == 60 /* R_XTENSA_NDIFF8. */
+ || reloc_type == 61 /* R_XTENSA_NDIFF16. */
+ || reloc_type == 62 /* R_XTENSA_NDIFF32. */);
}
return FALSE;
}
diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c
index 71d4d94a8d7d..ee75c13548ff 100644
--- a/gas/config/tc-xtensa.c
+++ b/gas/config/tc-xtensa.c
@@ -5974,18 +5974,24 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg)
case BFD_RELOC_8:
if (fixP->fx_subsy)
{
+ bfd_boolean neg = S_GET_VALUE (fixP->fx_addsy) + fixP->fx_offset
+ < S_GET_VALUE (fixP->fx_subsy);
+
switch (fixP->fx_r_type)
{
case BFD_RELOC_8:
- fixP->fx_r_type = BFD_RELOC_XTENSA_DIFF8;
+ fixP->fx_r_type = neg
+ ? BFD_RELOC_XTENSA_NDIFF8 : BFD_RELOC_XTENSA_PDIFF8;
fixP->fx_signed = 0;
break;
case BFD_RELOC_16:
- fixP->fx_r_type = BFD_RELOC_XTENSA_DIFF16;
+ fixP->fx_r_type = neg
+ ? BFD_RELOC_XTENSA_NDIFF16 : BFD_RELOC_XTENSA_PDIFF16;
fixP->fx_signed = 0;
break;
case BFD_RELOC_32:
- fixP->fx_r_type = BFD_RELOC_XTENSA_DIFF32;
+ fixP->fx_r_type = neg
+ ? BFD_RELOC_XTENSA_NDIFF32 : BFD_RELOC_XTENSA_PDIFF32;
fixP->fx_signed = 0;
break;
default:
diff --git a/gas/testsuite/gas/xtensa/loc.d b/gas/testsuite/gas/xtensa/loc.d
index 71983cc90055..8fb3425999d5 100644
--- a/gas/testsuite/gas/xtensa/loc.d
+++ b/gas/testsuite/gas/xtensa/loc.d
@@ -6,5 +6,5 @@
RELOCATION RECORDS FOR \[\.debug_line\]:
#...
-.*R_XTENSA_DIFF16.*\.text\+0x00009c42
+.*R_XTENSA_PDIFF16.*\.text\+0x00009c42
#...
diff --git a/include/elf/xtensa.h b/include/elf/xtensa.h
index 2eb5e4e52941..bd5c80d13777 100644
--- a/include/elf/xtensa.h
+++ b/include/elf/xtensa.h
@@ -87,6 +87,12 @@ START_RELOC_NUMBERS (elf_xtensa_reloc_type)
RELOC_NUMBER (R_XTENSA_TLS_FUNC, 54)
RELOC_NUMBER (R_XTENSA_TLS_ARG, 55)
RELOC_NUMBER (R_XTENSA_TLS_CALL, 56)
+ RELOC_NUMBER (R_XTENSA_PDIFF8, 57)
+ RELOC_NUMBER (R_XTENSA_PDIFF16, 58)
+ RELOC_NUMBER (R_XTENSA_PDIFF32, 59)
+ RELOC_NUMBER (R_XTENSA_NDIFF8, 60)
+ RELOC_NUMBER (R_XTENSA_NDIFF16, 61)
+ RELOC_NUMBER (R_XTENSA_NDIFF32, 62)
END_RELOC_NUMBERS (R_XTENSA_max)
/* Processor-specific flags for the ELF header e_flags field. */
--
2.20.1

View File

@ -0,0 +1,128 @@
From 735321812435ae278d3766a3371f55937dc776d6 Mon Sep 17 00:00:00 2001
From: Max Filippov <jcmvbkbc@gmail.com>
Date: Sat, 25 Apr 2020 00:40:25 -0700
Subject: [PATCH] xtensa: fix XTENSA_NDIFF handling for PR ld/25861
Fields marked with XTENSA_NDIFF relocations are not negated, they only
have sign bits removed. Don't negate their values when relaxation is
performed. Don't add sign bits when the value is zero. Report overflow
when the result has negative sign but all significant bits are zero.
2020-04-29 Max Filippov <jcmvbkbc@gmail.com>
bfd/
* elf32-xtensa.c (relax_section): Don't negate diff_value for
XTENSA_NDIFF relocations. Don't add sign bits whe diff_value
equals 0. Report overflow when the result has negative sign but
all significant bits are zero.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Backported from: d548f47df4d2e3d117d504a4c9977982c78a0556
---
bfd/elf32-xtensa.c | 26 +++++++++++++++-----------
1 file changed, 15 insertions(+), 11 deletions(-)
diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c
index fded42d52a9a..4327b027911f 100644
--- a/bfd/elf32-xtensa.c
+++ b/bfd/elf32-xtensa.c
@@ -9670,37 +9670,44 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info)
switch (r_type)
{
case R_XTENSA_DIFF8:
+ diff_mask = 0x7f;
diff_value =
bfd_get_signed_8 (abfd, &contents[old_source_offset]);
break;
case R_XTENSA_DIFF16:
+ diff_mask = 0x7fff;
diff_value =
bfd_get_signed_16 (abfd, &contents[old_source_offset]);
break;
case R_XTENSA_DIFF32:
+ diff_mask = 0x7fffffff;
diff_value =
bfd_get_signed_32 (abfd, &contents[old_source_offset]);
break;
case R_XTENSA_PDIFF8:
case R_XTENSA_NDIFF8:
+ diff_mask = 0xff;
diff_value =
bfd_get_8 (abfd, &contents[old_source_offset]);
break;
case R_XTENSA_PDIFF16:
case R_XTENSA_NDIFF16:
+ diff_mask = 0xffff;
diff_value =
bfd_get_16 (abfd, &contents[old_source_offset]);
break;
case R_XTENSA_PDIFF32:
case R_XTENSA_NDIFF32:
+ diff_mask = 0xffffffff;
diff_value =
bfd_get_32 (abfd, &contents[old_source_offset]);
break;
}
if (r_type >= R_XTENSA_NDIFF8
- && r_type <= R_XTENSA_NDIFF32)
- diff_value = -diff_value;
+ && r_type <= R_XTENSA_NDIFF32
+ && diff_value)
+ diff_value |= ~diff_mask;
new_end_offset = offset_with_removed_text_map
(&target_relax_info->action_list,
@@ -9710,43 +9717,40 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info)
switch (r_type)
{
case R_XTENSA_DIFF8:
- diff_mask = 0x7f;
bfd_put_signed_8 (abfd, diff_value,
&contents[old_source_offset]);
break;
case R_XTENSA_DIFF16:
- diff_mask = 0x7fff;
bfd_put_signed_16 (abfd, diff_value,
&contents[old_source_offset]);
break;
case R_XTENSA_DIFF32:
- diff_mask = 0x7fffffff;
bfd_put_signed_32 (abfd, diff_value,
&contents[old_source_offset]);
break;
case R_XTENSA_PDIFF8:
case R_XTENSA_NDIFF8:
- diff_mask = 0xff;
bfd_put_8 (abfd, diff_value,
&contents[old_source_offset]);
break;
case R_XTENSA_PDIFF16:
case R_XTENSA_NDIFF16:
- diff_mask = 0xffff;
bfd_put_16 (abfd, diff_value,
&contents[old_source_offset]);
break;
case R_XTENSA_PDIFF32:
case R_XTENSA_NDIFF32:
- diff_mask = 0xffffffff;
bfd_put_32 (abfd, diff_value,
&contents[old_source_offset]);
break;
}
- /* Check for overflow. Sign bits must be all zeroes or all ones */
- if ((diff_value & ~diff_mask) != 0 &&
- (diff_value & ~diff_mask) != (-1 & ~diff_mask))
+ /* Check for overflow. Sign bits must be all zeroes or
+ all ones. When sign bits are all ones diff_value
+ may not be zero. */
+ if (((diff_value & ~diff_mask) != 0
+ && (diff_value & ~diff_mask) != ~diff_mask)
+ || (diff_value && (bfd_vma) diff_value == ~diff_mask))
{
(*link_info->callbacks->reloc_dangerous)
(link_info, _("overflow after relaxation"),
--
2.20.1

View File

@ -0,0 +1,432 @@
From c7a1d1f656c717394937a92cb970f0f4cecce128 Mon Sep 17 00:00:00 2001
From: Max Filippov <jcmvbkbc@gmail.com>
Date: Sun, 19 Apr 2020 19:04:41 -0700
Subject: [PATCH] xtensa: fix PR ld/25861
Introduce new relaxations XTENSA_PDIFF{8,16,32} for positive differences
(subtracted symbol precedes diminished symbol) and XTENSA_NDIFF{8,16,32}
for negative differences (subtracted symbol follows diminished symbol).
Don't generate XTENSA_DIFF relocations in the assembler, generate
XTENSA_PDIFF or XTENSA_NDIFF based on relative symbol position.
Handle XTENSA_DIFF in BFD for compatibility with old object files.
Handle XTENSA_PDIFF and XTENSA_NDIFF in BFD, treating difference value
as unsigned.
2020-04-22 Max Filippov <jcmvbkbc@gmail.com>
bfd/
* bfd-in2.h: Regenerated.
* elf32-xtensa.c (elf_howto_table): New entries for
R_XTENSA_PDIFF{8,16,32} and R_XTENSA_NDIFF{8,16,32}.
(elf_xtensa_reloc_type_lookup, elf_xtensa_do_reloc)
(relax_section): Add cases for R_XTENSA_PDIFF{8,16,32} and
R_XTENSA_NDIFF{8,16,32}.
* libbfd.h (bfd_reloc_code_real_names): Add names for
BFD_RELOC_XTENSA_PDIFF{8,16,32} and
BFD_RELOC_XTENSA_NDIFF{8,16,32}.
* reloc.c: Add documentation for BFD_RELOC_XTENSA_PDIFF{8,16,32}
and BFD_RELOC_XTENSA_NDIFF{8,16,32}.
binutils/
* readelf.c (is_none_reloc): Recognize
BFD_RELOC_XTENSA_PDIFF{8,16,32} and
BFD_RELOC_XTENSA_NDIFF{8,16,32}.
gas/
* config/tc-xtensa.c (md_apply_fix): Replace
BFD_RELOC_XTENSA_DIFF{8,16,32} generation with
BFD_RELOC_XTENSA_PDIFF{8,16,32} and
BFD_RELOC_XTENSA_NDIFF{8,16,32} generation.
* testsuite/gas/xtensa/loc.d: Replace BFD_RELOC_XTENSA_DIFF16
with BFD_RELOC_XTENSA_PDIFF16 in the expected output.
include/
* elf/xtensa.h (elf_xtensa_reloc_type): New entries for
R_XTENSA_PDIFF{8,16,32} and R_XTENSA_NDIFF{8,16,32}.
ld/
* testsuite/ld-xtensa/relax-loc.d: New test definition.
* testsuite/ld-xtensa/relax-loc.s: New test source.
* testsuite/ld-xtensa/xtensa.exp (relax-loc): New test.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
Backported from: 30ce8e47fad9b057b6d7af9e1d43061126d34d20
bfd/bfd-in2.h | 20 ++++++-
bfd/elf32-xtensa.c | 89 +++++++++++++++++++++++++++++-
bfd/libbfd.h | 6 ++
bfd/reloc.c | 24 ++++++++
binutils/readelf.c | 8 ++-
gas/config/tc-xtensa.c | 12 +++-
gas/testsuite/gas/xtensa/loc.d | 2 +-
include/elf/xtensa.h | 6 ++
ld/testsuite/ld-xtensa/relax-loc.d | 7 +++
ld/testsuite/ld-xtensa/relax-loc.s | 15 +++++
ld/testsuite/ld-xtensa/xtensa.exp | 1 +
11 files changed, 183 insertions(+), 7 deletions(-)
create mode 100644 ld/testsuite/ld-xtensa/relax-loc.d
create mode 100644 ld/testsuite/ld-xtensa/relax-loc.s
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index 37114607b515..be6a30f57955 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -5217,7 +5217,9 @@ to one of its own internal functions or data structures. */
PLT entries. Otherwise, this is just a generic 32-bit relocation. */
BFD_RELOC_XTENSA_PLT,
-/* Xtensa relocations to mark the difference of two local symbols.
+/* Xtensa relocations for backward compatibility. These have been replaced
+by BFD_RELOC_XTENSA_PDIFF and BFD_RELOC_XTENSA_NDIFF.
+Xtensa relocations to mark the difference of two local symbols.
These are only needed to support linker relaxation and can be ignored
when not relaxing. The field is set to the value of the difference
assuming no relaxation. The relocation encodes the position of the
@@ -5291,6 +5293,22 @@ BFD_RELOC_XTENSA_ASM_EXPAND. */
BFD_RELOC_XTENSA_TLS_ARG,
BFD_RELOC_XTENSA_TLS_CALL,
+/* Xtensa relocations to mark the difference of two local symbols.
+These are only needed to support linker relaxation and can be ignored
+when not relaxing. The field is set to the value of the difference
+assuming no relaxation. The relocation encodes the position of the
+subtracted symbol so the linker can determine whether to adjust the field
+value. PDIFF relocations are used for positive differences, NDIFF
+relocations are used for negative differences. The difference value
+is treated as unsigned with these relocation types, giving full
+8/16 value ranges. */
+ BFD_RELOC_XTENSA_PDIFF8,
+ BFD_RELOC_XTENSA_PDIFF16,
+ BFD_RELOC_XTENSA_PDIFF32,
+ BFD_RELOC_XTENSA_NDIFF8,
+ BFD_RELOC_XTENSA_NDIFF16,
+ BFD_RELOC_XTENSA_NDIFF32,
+
/* 8 bit signed offset in (ix+d) or (iy+d). */
BFD_RELOC_Z80_DISP8,
diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c
index 473a9d76f289..fded42d52a9a 100644
--- a/bfd/elf32-xtensa.c
+++ b/bfd/elf32-xtensa.c
@@ -325,6 +325,20 @@ static reloc_howto_type elf_howto_table[] =
HOWTO (R_XTENSA_TLS_CALL, 0, 0, 0, FALSE, 0, complain_overflow_dont,
bfd_elf_xtensa_reloc, "R_XTENSA_TLS_CALL",
FALSE, 0, 0, FALSE),
+
+ HOWTO (R_XTENSA_PDIFF8, 0, 0, 8, FALSE, 0, complain_overflow_bitfield,
+ bfd_elf_xtensa_reloc, "R_XTENSA_PDIFF8", FALSE, 0, 0xff, FALSE),
+ HOWTO (R_XTENSA_PDIFF16, 0, 1, 16, FALSE, 0, complain_overflow_bitfield,
+ bfd_elf_xtensa_reloc, "R_XTENSA_PDIFF16", FALSE, 0, 0xffff, FALSE),
+ HOWTO (R_XTENSA_PDIFF32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,
+ bfd_elf_xtensa_reloc, "R_XTENSA_PDIFF32", FALSE, 0, 0xffffffff, FALSE),
+
+ HOWTO (R_XTENSA_NDIFF8, 0, 0, 8, FALSE, 0, complain_overflow_bitfield,
+ bfd_elf_xtensa_reloc, "R_XTENSA_NDIFF8", FALSE, 0, 0xff, FALSE),
+ HOWTO (R_XTENSA_NDIFF16, 0, 1, 16, FALSE, 0, complain_overflow_bitfield,
+ bfd_elf_xtensa_reloc, "R_XTENSA_NDIFF16", FALSE, 0, 0xffff, FALSE),
+ HOWTO (R_XTENSA_NDIFF32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,
+ bfd_elf_xtensa_reloc, "R_XTENSA_NDIFF32", FALSE, 0, 0xffffffff, FALSE),
};
#if DEBUG_GEN_RELOC
@@ -364,6 +378,30 @@ elf_xtensa_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
TRACE ("BFD_RELOC_XTENSA_DIFF32");
return &elf_howto_table[(unsigned) R_XTENSA_DIFF32 ];
+ case BFD_RELOC_XTENSA_PDIFF8:
+ TRACE ("BFD_RELOC_XTENSA_PDIFF8");
+ return &elf_howto_table[(unsigned) R_XTENSA_PDIFF8 ];
+
+ case BFD_RELOC_XTENSA_PDIFF16:
+ TRACE ("BFD_RELOC_XTENSA_PDIFF16");
+ return &elf_howto_table[(unsigned) R_XTENSA_PDIFF16 ];
+
+ case BFD_RELOC_XTENSA_PDIFF32:
+ TRACE ("BFD_RELOC_XTENSA_PDIFF32");
+ return &elf_howto_table[(unsigned) R_XTENSA_PDIFF32 ];
+
+ case BFD_RELOC_XTENSA_NDIFF8:
+ TRACE ("BFD_RELOC_XTENSA_NDIFF8");
+ return &elf_howto_table[(unsigned) R_XTENSA_NDIFF8 ];
+
+ case BFD_RELOC_XTENSA_NDIFF16:
+ TRACE ("BFD_RELOC_XTENSA_NDIFF16");
+ return &elf_howto_table[(unsigned) R_XTENSA_NDIFF16 ];
+
+ case BFD_RELOC_XTENSA_NDIFF32:
+ TRACE ("BFD_RELOC_XTENSA_NDIFF32");
+ return &elf_howto_table[(unsigned) R_XTENSA_NDIFF32 ];
+
case BFD_RELOC_XTENSA_RTLD:
TRACE ("BFD_RELOC_XTENSA_RTLD");
return &elf_howto_table[(unsigned) R_XTENSA_RTLD ];
@@ -1851,6 +1889,12 @@ elf_xtensa_do_reloc (reloc_howto_type *howto,
case R_XTENSA_DIFF8:
case R_XTENSA_DIFF16:
case R_XTENSA_DIFF32:
+ case R_XTENSA_PDIFF8:
+ case R_XTENSA_PDIFF16:
+ case R_XTENSA_PDIFF32:
+ case R_XTENSA_NDIFF8:
+ case R_XTENSA_NDIFF16:
+ case R_XTENSA_NDIFF32:
case R_XTENSA_TLS_FUNC:
case R_XTENSA_TLS_ARG:
case R_XTENSA_TLS_CALL:
@@ -9604,7 +9648,13 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info)
if (r_type == R_XTENSA_DIFF8
|| r_type == R_XTENSA_DIFF16
- || r_type == R_XTENSA_DIFF32)
+ || r_type == R_XTENSA_DIFF32
+ || r_type == R_XTENSA_PDIFF8
+ || r_type == R_XTENSA_PDIFF16
+ || r_type == R_XTENSA_PDIFF32
+ || r_type == R_XTENSA_NDIFF8
+ || r_type == R_XTENSA_NDIFF16
+ || r_type == R_XTENSA_NDIFF32)
{
bfd_signed_vma diff_value = 0;
bfd_vma new_end_offset, diff_mask = 0;
@@ -9631,8 +9681,27 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info)
diff_value =
bfd_get_signed_32 (abfd, &contents[old_source_offset]);
break;
+ case R_XTENSA_PDIFF8:
+ case R_XTENSA_NDIFF8:
+ diff_value =
+ bfd_get_8 (abfd, &contents[old_source_offset]);
+ break;
+ case R_XTENSA_PDIFF16:
+ case R_XTENSA_NDIFF16:
+ diff_value =
+ bfd_get_16 (abfd, &contents[old_source_offset]);
+ break;
+ case R_XTENSA_PDIFF32:
+ case R_XTENSA_NDIFF32:
+ diff_value =
+ bfd_get_32 (abfd, &contents[old_source_offset]);
+ break;
}
+ if (r_type >= R_XTENSA_NDIFF8
+ && r_type <= R_XTENSA_NDIFF32)
+ diff_value = -diff_value;
+
new_end_offset = offset_with_removed_text_map
(&target_relax_info->action_list,
r_rel.target_offset + diff_value);
@@ -9655,6 +9724,24 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info)
bfd_put_signed_32 (abfd, diff_value,
&contents[old_source_offset]);
break;
+ case R_XTENSA_PDIFF8:
+ case R_XTENSA_NDIFF8:
+ diff_mask = 0xff;
+ bfd_put_8 (abfd, diff_value,
+ &contents[old_source_offset]);
+ break;
+ case R_XTENSA_PDIFF16:
+ case R_XTENSA_NDIFF16:
+ diff_mask = 0xffff;
+ bfd_put_16 (abfd, diff_value,
+ &contents[old_source_offset]);
+ break;
+ case R_XTENSA_PDIFF32:
+ case R_XTENSA_NDIFF32:
+ diff_mask = 0xffffffff;
+ bfd_put_32 (abfd, diff_value,
+ &contents[old_source_offset]);
+ break;
}
/* Check for overflow. Sign bits must be all zeroes or all ones */
diff --git a/bfd/libbfd.h b/bfd/libbfd.h
index 3c184fcadadf..989f4bc0b595 100644
--- a/bfd/libbfd.h
+++ b/bfd/libbfd.h
@@ -2919,6 +2919,12 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_XTENSA_TLS_FUNC",
"BFD_RELOC_XTENSA_TLS_ARG",
"BFD_RELOC_XTENSA_TLS_CALL",
+ "BFD_RELOC_XTENSA_PDIFF8",
+ "BFD_RELOC_XTENSA_PDIFF16",
+ "BFD_RELOC_XTENSA_PDIFF32",
+ "BFD_RELOC_XTENSA_NDIFF8",
+ "BFD_RELOC_XTENSA_NDIFF16",
+ "BFD_RELOC_XTENSA_NDIFF32",
"BFD_RELOC_Z80_DISP8",
"BFD_RELOC_Z80_BYTE0",
"BFD_RELOC_Z80_BYTE1",
diff --git a/bfd/reloc.c b/bfd/reloc.c
index c4dec86d1d46..f5df8e2ab3eb 100644
--- a/bfd/reloc.c
+++ b/bfd/reloc.c
@@ -6556,6 +6556,8 @@ ENUMX
ENUMX
BFD_RELOC_XTENSA_DIFF32
ENUMDOC
+ Xtensa relocations for backward compatibility. These have been replaced
+ by BFD_RELOC_XTENSA_PDIFF and BFD_RELOC_XTENSA_NDIFF.
Xtensa relocations to mark the difference of two local symbols.
These are only needed to support linker relaxation and can be ignored
when not relaxing. The field is set to the value of the difference
@@ -6668,6 +6670,28 @@ ENUMX
BFD_RELOC_XTENSA_TLS_CALL
ENUMDOC
Xtensa TLS relocations.
+ENUM
+ BFD_RELOC_XTENSA_PDIFF8
+ENUMX
+ BFD_RELOC_XTENSA_PDIFF16
+ENUMX
+ BFD_RELOC_XTENSA_PDIFF32
+ENUMX
+ BFD_RELOC_XTENSA_NDIFF8
+ENUMX
+ BFD_RELOC_XTENSA_NDIFF16
+ENUMX
+ BFD_RELOC_XTENSA_NDIFF32
+ENUMDOC
+ Xtensa relocations to mark the difference of two local symbols.
+ These are only needed to support linker relaxation and can be ignored
+ when not relaxing. The field is set to the value of the difference
+ assuming no relaxation. The relocation encodes the position of the
+ subtracted symbol so the linker can determine whether to adjust the field
+ value. PDIFF relocations are used for positive differences, NDIFF
+ relocations are used for negative differences. The difference value
+ is treated as unsigned with these relocation types, giving full
+ 8/16 value ranges.
ENUM
BFD_RELOC_Z80_DISP8
diff --git a/binutils/readelf.c b/binutils/readelf.c
index d4756c93b345..800918f901c8 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -13262,7 +13262,13 @@ is_none_reloc (Filedata * filedata, unsigned int reloc_type)
return (reloc_type == 0 /* R_XTENSA_NONE. */
|| reloc_type == 17 /* R_XTENSA_DIFF8. */
|| reloc_type == 18 /* R_XTENSA_DIFF16. */
- || reloc_type == 19 /* R_XTENSA_DIFF32. */);
+ || reloc_type == 19 /* R_XTENSA_DIFF32. */
+ || reloc_type == 57 /* R_XTENSA_PDIFF8. */
+ || reloc_type == 58 /* R_XTENSA_PDIFF16. */
+ || reloc_type == 59 /* R_XTENSA_PDIFF32. */
+ || reloc_type == 60 /* R_XTENSA_NDIFF8. */
+ || reloc_type == 61 /* R_XTENSA_NDIFF16. */
+ || reloc_type == 62 /* R_XTENSA_NDIFF32. */);
}
return FALSE;
}
diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c
index 71d4d94a8d7d..ee75c13548ff 100644
--- a/gas/config/tc-xtensa.c
+++ b/gas/config/tc-xtensa.c
@@ -5974,18 +5974,24 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg)
case BFD_RELOC_8:
if (fixP->fx_subsy)
{
+ bfd_boolean neg = S_GET_VALUE (fixP->fx_addsy) + fixP->fx_offset
+ < S_GET_VALUE (fixP->fx_subsy);
+
switch (fixP->fx_r_type)
{
case BFD_RELOC_8:
- fixP->fx_r_type = BFD_RELOC_XTENSA_DIFF8;
+ fixP->fx_r_type = neg
+ ? BFD_RELOC_XTENSA_NDIFF8 : BFD_RELOC_XTENSA_PDIFF8;
fixP->fx_signed = 0;
break;
case BFD_RELOC_16:
- fixP->fx_r_type = BFD_RELOC_XTENSA_DIFF16;
+ fixP->fx_r_type = neg
+ ? BFD_RELOC_XTENSA_NDIFF16 : BFD_RELOC_XTENSA_PDIFF16;
fixP->fx_signed = 0;
break;
case BFD_RELOC_32:
- fixP->fx_r_type = BFD_RELOC_XTENSA_DIFF32;
+ fixP->fx_r_type = neg
+ ? BFD_RELOC_XTENSA_NDIFF32 : BFD_RELOC_XTENSA_PDIFF32;
fixP->fx_signed = 0;
break;
default:
diff --git a/gas/testsuite/gas/xtensa/loc.d b/gas/testsuite/gas/xtensa/loc.d
index 71983cc90055..8fb3425999d5 100644
--- a/gas/testsuite/gas/xtensa/loc.d
+++ b/gas/testsuite/gas/xtensa/loc.d
@@ -6,5 +6,5 @@
RELOCATION RECORDS FOR \[\.debug_line\]:
#...
-.*R_XTENSA_DIFF16.*\.text\+0x00009c42
+.*R_XTENSA_PDIFF16.*\.text\+0x00009c42
#...
diff --git a/include/elf/xtensa.h b/include/elf/xtensa.h
index 2eb5e4e52941..bd5c80d13777 100644
--- a/include/elf/xtensa.h
+++ b/include/elf/xtensa.h
@@ -87,6 +87,12 @@ START_RELOC_NUMBERS (elf_xtensa_reloc_type)
RELOC_NUMBER (R_XTENSA_TLS_FUNC, 54)
RELOC_NUMBER (R_XTENSA_TLS_ARG, 55)
RELOC_NUMBER (R_XTENSA_TLS_CALL, 56)
+ RELOC_NUMBER (R_XTENSA_PDIFF8, 57)
+ RELOC_NUMBER (R_XTENSA_PDIFF16, 58)
+ RELOC_NUMBER (R_XTENSA_PDIFF32, 59)
+ RELOC_NUMBER (R_XTENSA_NDIFF8, 60)
+ RELOC_NUMBER (R_XTENSA_NDIFF16, 61)
+ RELOC_NUMBER (R_XTENSA_NDIFF32, 62)
END_RELOC_NUMBERS (R_XTENSA_max)
/* Processor-specific flags for the ELF header e_flags field. */
diff --git a/ld/testsuite/ld-xtensa/relax-loc.d b/ld/testsuite/ld-xtensa/relax-loc.d
new file mode 100644
index 000000000000..3c8d673732ff
--- /dev/null
+++ b/ld/testsuite/ld-xtensa/relax-loc.d
@@ -0,0 +1,7 @@
+#as: --text-section-literals
+#ld:
+#objdump: --dwarf=decodedline
+#...
+relax-loc.s[ ]+1[ ]+0x400054[ ]+.*
+relax-loc.s[ ]+2[ ]+0x40005c[ ]+.*
+#...
diff --git a/ld/testsuite/ld-xtensa/relax-loc.s b/ld/testsuite/ld-xtensa/relax-loc.s
new file mode 100644
index 000000000000..d768470e287a
--- /dev/null
+++ b/ld/testsuite/ld-xtensa/relax-loc.s
@@ -0,0 +1,15 @@
+ .file 1 "relax-loc.s"
+ .globl _start
+ .globl _ResetVector
+ .text
+_ResetVector:
+_start:
+ .loc 1 1
+ j 1f
+ .literal_position
+1:
+ .loc 1 2
+
+ .rep 10000
+ movi a2, 0x12345678
+ .endr
diff --git a/ld/testsuite/ld-xtensa/xtensa.exp b/ld/testsuite/ld-xtensa/xtensa.exp
index 9b2235b2151b..de39887936ad 100644
--- a/ld/testsuite/ld-xtensa/xtensa.exp
+++ b/ld/testsuite/ld-xtensa/xtensa.exp
@@ -27,6 +27,7 @@ run_dump_test "call_overflow"
run_dump_test "coalesce"
run_dump_test "diff_overflow"
run_dump_test "lcall"
+run_dump_test "relax-loc"
run_dump_test "relax-static-pie"
run_dump_test "relax-static-local-pie"
--
2.20.1

View File

@ -0,0 +1,128 @@
From 735321812435ae278d3766a3371f55937dc776d6 Mon Sep 17 00:00:00 2001
From: Max Filippov <jcmvbkbc@gmail.com>
Date: Sat, 25 Apr 2020 00:40:25 -0700
Subject: [PATCH] xtensa: fix XTENSA_NDIFF handling for PR ld/25861
Fields marked with XTENSA_NDIFF relocations are not negated, they only
have sign bits removed. Don't negate their values when relaxation is
performed. Don't add sign bits when the value is zero. Report overflow
when the result has negative sign but all significant bits are zero.
2020-04-29 Max Filippov <jcmvbkbc@gmail.com>
bfd/
* elf32-xtensa.c (relax_section): Don't negate diff_value for
XTENSA_NDIFF relocations. Don't add sign bits whe diff_value
equals 0. Report overflow when the result has negative sign but
all significant bits are zero.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Backported from: d548f47df4d2e3d117d504a4c9977982c78a0556
---
bfd/elf32-xtensa.c | 26 +++++++++++++++-----------
1 file changed, 15 insertions(+), 11 deletions(-)
diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c
index fded42d52a9a..4327b027911f 100644
--- a/bfd/elf32-xtensa.c
+++ b/bfd/elf32-xtensa.c
@@ -9670,37 +9670,44 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info)
switch (r_type)
{
case R_XTENSA_DIFF8:
+ diff_mask = 0x7f;
diff_value =
bfd_get_signed_8 (abfd, &contents[old_source_offset]);
break;
case R_XTENSA_DIFF16:
+ diff_mask = 0x7fff;
diff_value =
bfd_get_signed_16 (abfd, &contents[old_source_offset]);
break;
case R_XTENSA_DIFF32:
+ diff_mask = 0x7fffffff;
diff_value =
bfd_get_signed_32 (abfd, &contents[old_source_offset]);
break;
case R_XTENSA_PDIFF8:
case R_XTENSA_NDIFF8:
+ diff_mask = 0xff;
diff_value =
bfd_get_8 (abfd, &contents[old_source_offset]);
break;
case R_XTENSA_PDIFF16:
case R_XTENSA_NDIFF16:
+ diff_mask = 0xffff;
diff_value =
bfd_get_16 (abfd, &contents[old_source_offset]);
break;
case R_XTENSA_PDIFF32:
case R_XTENSA_NDIFF32:
+ diff_mask = 0xffffffff;
diff_value =
bfd_get_32 (abfd, &contents[old_source_offset]);
break;
}
if (r_type >= R_XTENSA_NDIFF8
- && r_type <= R_XTENSA_NDIFF32)
- diff_value = -diff_value;
+ && r_type <= R_XTENSA_NDIFF32
+ && diff_value)
+ diff_value |= ~diff_mask;
new_end_offset = offset_with_removed_text_map
(&target_relax_info->action_list,
@@ -9710,43 +9717,40 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info)
switch (r_type)
{
case R_XTENSA_DIFF8:
- diff_mask = 0x7f;
bfd_put_signed_8 (abfd, diff_value,
&contents[old_source_offset]);
break;
case R_XTENSA_DIFF16:
- diff_mask = 0x7fff;
bfd_put_signed_16 (abfd, diff_value,
&contents[old_source_offset]);
break;
case R_XTENSA_DIFF32:
- diff_mask = 0x7fffffff;
bfd_put_signed_32 (abfd, diff_value,
&contents[old_source_offset]);
break;
case R_XTENSA_PDIFF8:
case R_XTENSA_NDIFF8:
- diff_mask = 0xff;
bfd_put_8 (abfd, diff_value,
&contents[old_source_offset]);
break;
case R_XTENSA_PDIFF16:
case R_XTENSA_NDIFF16:
- diff_mask = 0xffff;
bfd_put_16 (abfd, diff_value,
&contents[old_source_offset]);
break;
case R_XTENSA_PDIFF32:
case R_XTENSA_NDIFF32:
- diff_mask = 0xffffffff;
bfd_put_32 (abfd, diff_value,
&contents[old_source_offset]);
break;
}
- /* Check for overflow. Sign bits must be all zeroes or all ones */
- if ((diff_value & ~diff_mask) != 0 &&
- (diff_value & ~diff_mask) != (-1 & ~diff_mask))
+ /* Check for overflow. Sign bits must be all zeroes or
+ all ones. When sign bits are all ones diff_value
+ may not be zero. */
+ if (((diff_value & ~diff_mask) != 0
+ && (diff_value & ~diff_mask) != ~diff_mask)
+ || (diff_value && (bfd_vma) diff_value == ~diff_mask))
{
(*link_info->callbacks->reloc_dangerous)
(link_info, _("overflow after relaxation"),
--
2.20.1

View File

@ -0,0 +1,432 @@
From c7a1d1f656c717394937a92cb970f0f4cecce128 Mon Sep 17 00:00:00 2001
From: Max Filippov <jcmvbkbc@gmail.com>
Date: Sun, 19 Apr 2020 19:04:41 -0700
Subject: [PATCH] xtensa: fix PR ld/25861
Introduce new relaxations XTENSA_PDIFF{8,16,32} for positive differences
(subtracted symbol precedes diminished symbol) and XTENSA_NDIFF{8,16,32}
for negative differences (subtracted symbol follows diminished symbol).
Don't generate XTENSA_DIFF relocations in the assembler, generate
XTENSA_PDIFF or XTENSA_NDIFF based on relative symbol position.
Handle XTENSA_DIFF in BFD for compatibility with old object files.
Handle XTENSA_PDIFF and XTENSA_NDIFF in BFD, treating difference value
as unsigned.
2020-04-22 Max Filippov <jcmvbkbc@gmail.com>
bfd/
* bfd-in2.h: Regenerated.
* elf32-xtensa.c (elf_howto_table): New entries for
R_XTENSA_PDIFF{8,16,32} and R_XTENSA_NDIFF{8,16,32}.
(elf_xtensa_reloc_type_lookup, elf_xtensa_do_reloc)
(relax_section): Add cases for R_XTENSA_PDIFF{8,16,32} and
R_XTENSA_NDIFF{8,16,32}.
* libbfd.h (bfd_reloc_code_real_names): Add names for
BFD_RELOC_XTENSA_PDIFF{8,16,32} and
BFD_RELOC_XTENSA_NDIFF{8,16,32}.
* reloc.c: Add documentation for BFD_RELOC_XTENSA_PDIFF{8,16,32}
and BFD_RELOC_XTENSA_NDIFF{8,16,32}.
binutils/
* readelf.c (is_none_reloc): Recognize
BFD_RELOC_XTENSA_PDIFF{8,16,32} and
BFD_RELOC_XTENSA_NDIFF{8,16,32}.
gas/
* config/tc-xtensa.c (md_apply_fix): Replace
BFD_RELOC_XTENSA_DIFF{8,16,32} generation with
BFD_RELOC_XTENSA_PDIFF{8,16,32} and
BFD_RELOC_XTENSA_NDIFF{8,16,32} generation.
* testsuite/gas/xtensa/loc.d: Replace BFD_RELOC_XTENSA_DIFF16
with BFD_RELOC_XTENSA_PDIFF16 in the expected output.
include/
* elf/xtensa.h (elf_xtensa_reloc_type): New entries for
R_XTENSA_PDIFF{8,16,32} and R_XTENSA_NDIFF{8,16,32}.
ld/
* testsuite/ld-xtensa/relax-loc.d: New test definition.
* testsuite/ld-xtensa/relax-loc.s: New test source.
* testsuite/ld-xtensa/xtensa.exp (relax-loc): New test.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
Backported from: 30ce8e47fad9b057b6d7af9e1d43061126d34d20
bfd/bfd-in2.h | 20 ++++++-
bfd/elf32-xtensa.c | 89 +++++++++++++++++++++++++++++-
bfd/libbfd.h | 6 ++
bfd/reloc.c | 24 ++++++++
binutils/readelf.c | 8 ++-
gas/config/tc-xtensa.c | 12 +++-
gas/testsuite/gas/xtensa/loc.d | 2 +-
include/elf/xtensa.h | 6 ++
ld/testsuite/ld-xtensa/relax-loc.d | 7 +++
ld/testsuite/ld-xtensa/relax-loc.s | 15 +++++
ld/testsuite/ld-xtensa/xtensa.exp | 1 +
11 files changed, 183 insertions(+), 7 deletions(-)
create mode 100644 ld/testsuite/ld-xtensa/relax-loc.d
create mode 100644 ld/testsuite/ld-xtensa/relax-loc.s
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index 37114607b515..be6a30f57955 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -5217,7 +5217,9 @@ to one of its own internal functions or data structures. */
PLT entries. Otherwise, this is just a generic 32-bit relocation. */
BFD_RELOC_XTENSA_PLT,
-/* Xtensa relocations to mark the difference of two local symbols.
+/* Xtensa relocations for backward compatibility. These have been replaced
+by BFD_RELOC_XTENSA_PDIFF and BFD_RELOC_XTENSA_NDIFF.
+Xtensa relocations to mark the difference of two local symbols.
These are only needed to support linker relaxation and can be ignored
when not relaxing. The field is set to the value of the difference
assuming no relaxation. The relocation encodes the position of the
@@ -5291,6 +5293,22 @@ BFD_RELOC_XTENSA_ASM_EXPAND. */
BFD_RELOC_XTENSA_TLS_ARG,
BFD_RELOC_XTENSA_TLS_CALL,
+/* Xtensa relocations to mark the difference of two local symbols.
+These are only needed to support linker relaxation and can be ignored
+when not relaxing. The field is set to the value of the difference
+assuming no relaxation. The relocation encodes the position of the
+subtracted symbol so the linker can determine whether to adjust the field
+value. PDIFF relocations are used for positive differences, NDIFF
+relocations are used for negative differences. The difference value
+is treated as unsigned with these relocation types, giving full
+8/16 value ranges. */
+ BFD_RELOC_XTENSA_PDIFF8,
+ BFD_RELOC_XTENSA_PDIFF16,
+ BFD_RELOC_XTENSA_PDIFF32,
+ BFD_RELOC_XTENSA_NDIFF8,
+ BFD_RELOC_XTENSA_NDIFF16,
+ BFD_RELOC_XTENSA_NDIFF32,
+
/* 8 bit signed offset in (ix+d) or (iy+d). */
BFD_RELOC_Z80_DISP8,
diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c
index 473a9d76f289..fded42d52a9a 100644
--- a/bfd/elf32-xtensa.c
+++ b/bfd/elf32-xtensa.c
@@ -325,6 +325,20 @@ static reloc_howto_type elf_howto_table[] =
HOWTO (R_XTENSA_TLS_CALL, 0, 0, 0, FALSE, 0, complain_overflow_dont,
bfd_elf_xtensa_reloc, "R_XTENSA_TLS_CALL",
FALSE, 0, 0, FALSE),
+
+ HOWTO (R_XTENSA_PDIFF8, 0, 0, 8, FALSE, 0, complain_overflow_bitfield,
+ bfd_elf_xtensa_reloc, "R_XTENSA_PDIFF8", FALSE, 0, 0xff, FALSE),
+ HOWTO (R_XTENSA_PDIFF16, 0, 1, 16, FALSE, 0, complain_overflow_bitfield,
+ bfd_elf_xtensa_reloc, "R_XTENSA_PDIFF16", FALSE, 0, 0xffff, FALSE),
+ HOWTO (R_XTENSA_PDIFF32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,
+ bfd_elf_xtensa_reloc, "R_XTENSA_PDIFF32", FALSE, 0, 0xffffffff, FALSE),
+
+ HOWTO (R_XTENSA_NDIFF8, 0, 0, 8, FALSE, 0, complain_overflow_bitfield,
+ bfd_elf_xtensa_reloc, "R_XTENSA_NDIFF8", FALSE, 0, 0xff, FALSE),
+ HOWTO (R_XTENSA_NDIFF16, 0, 1, 16, FALSE, 0, complain_overflow_bitfield,
+ bfd_elf_xtensa_reloc, "R_XTENSA_NDIFF16", FALSE, 0, 0xffff, FALSE),
+ HOWTO (R_XTENSA_NDIFF32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,
+ bfd_elf_xtensa_reloc, "R_XTENSA_NDIFF32", FALSE, 0, 0xffffffff, FALSE),
};
#if DEBUG_GEN_RELOC
@@ -364,6 +378,30 @@ elf_xtensa_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
TRACE ("BFD_RELOC_XTENSA_DIFF32");
return &elf_howto_table[(unsigned) R_XTENSA_DIFF32 ];
+ case BFD_RELOC_XTENSA_PDIFF8:
+ TRACE ("BFD_RELOC_XTENSA_PDIFF8");
+ return &elf_howto_table[(unsigned) R_XTENSA_PDIFF8 ];
+
+ case BFD_RELOC_XTENSA_PDIFF16:
+ TRACE ("BFD_RELOC_XTENSA_PDIFF16");
+ return &elf_howto_table[(unsigned) R_XTENSA_PDIFF16 ];
+
+ case BFD_RELOC_XTENSA_PDIFF32:
+ TRACE ("BFD_RELOC_XTENSA_PDIFF32");
+ return &elf_howto_table[(unsigned) R_XTENSA_PDIFF32 ];
+
+ case BFD_RELOC_XTENSA_NDIFF8:
+ TRACE ("BFD_RELOC_XTENSA_NDIFF8");
+ return &elf_howto_table[(unsigned) R_XTENSA_NDIFF8 ];
+
+ case BFD_RELOC_XTENSA_NDIFF16:
+ TRACE ("BFD_RELOC_XTENSA_NDIFF16");
+ return &elf_howto_table[(unsigned) R_XTENSA_NDIFF16 ];
+
+ case BFD_RELOC_XTENSA_NDIFF32:
+ TRACE ("BFD_RELOC_XTENSA_NDIFF32");
+ return &elf_howto_table[(unsigned) R_XTENSA_NDIFF32 ];
+
case BFD_RELOC_XTENSA_RTLD:
TRACE ("BFD_RELOC_XTENSA_RTLD");
return &elf_howto_table[(unsigned) R_XTENSA_RTLD ];
@@ -1851,6 +1889,12 @@ elf_xtensa_do_reloc (reloc_howto_type *howto,
case R_XTENSA_DIFF8:
case R_XTENSA_DIFF16:
case R_XTENSA_DIFF32:
+ case R_XTENSA_PDIFF8:
+ case R_XTENSA_PDIFF16:
+ case R_XTENSA_PDIFF32:
+ case R_XTENSA_NDIFF8:
+ case R_XTENSA_NDIFF16:
+ case R_XTENSA_NDIFF32:
case R_XTENSA_TLS_FUNC:
case R_XTENSA_TLS_ARG:
case R_XTENSA_TLS_CALL:
@@ -9604,7 +9648,13 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info)
if (r_type == R_XTENSA_DIFF8
|| r_type == R_XTENSA_DIFF16
- || r_type == R_XTENSA_DIFF32)
+ || r_type == R_XTENSA_DIFF32
+ || r_type == R_XTENSA_PDIFF8
+ || r_type == R_XTENSA_PDIFF16
+ || r_type == R_XTENSA_PDIFF32
+ || r_type == R_XTENSA_NDIFF8
+ || r_type == R_XTENSA_NDIFF16
+ || r_type == R_XTENSA_NDIFF32)
{
bfd_signed_vma diff_value = 0;
bfd_vma new_end_offset, diff_mask = 0;
@@ -9631,8 +9681,27 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info)
diff_value =
bfd_get_signed_32 (abfd, &contents[old_source_offset]);
break;
+ case R_XTENSA_PDIFF8:
+ case R_XTENSA_NDIFF8:
+ diff_value =
+ bfd_get_8 (abfd, &contents[old_source_offset]);
+ break;
+ case R_XTENSA_PDIFF16:
+ case R_XTENSA_NDIFF16:
+ diff_value =
+ bfd_get_16 (abfd, &contents[old_source_offset]);
+ break;
+ case R_XTENSA_PDIFF32:
+ case R_XTENSA_NDIFF32:
+ diff_value =
+ bfd_get_32 (abfd, &contents[old_source_offset]);
+ break;
}
+ if (r_type >= R_XTENSA_NDIFF8
+ && r_type <= R_XTENSA_NDIFF32)
+ diff_value = -diff_value;
+
new_end_offset = offset_with_removed_text_map
(&target_relax_info->action_list,
r_rel.target_offset + diff_value);
@@ -9655,6 +9724,24 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info)
bfd_put_signed_32 (abfd, diff_value,
&contents[old_source_offset]);
break;
+ case R_XTENSA_PDIFF8:
+ case R_XTENSA_NDIFF8:
+ diff_mask = 0xff;
+ bfd_put_8 (abfd, diff_value,
+ &contents[old_source_offset]);
+ break;
+ case R_XTENSA_PDIFF16:
+ case R_XTENSA_NDIFF16:
+ diff_mask = 0xffff;
+ bfd_put_16 (abfd, diff_value,
+ &contents[old_source_offset]);
+ break;
+ case R_XTENSA_PDIFF32:
+ case R_XTENSA_NDIFF32:
+ diff_mask = 0xffffffff;
+ bfd_put_32 (abfd, diff_value,
+ &contents[old_source_offset]);
+ break;
}
/* Check for overflow. Sign bits must be all zeroes or all ones */
diff --git a/bfd/libbfd.h b/bfd/libbfd.h
index 3c184fcadadf..989f4bc0b595 100644
--- a/bfd/libbfd.h
+++ b/bfd/libbfd.h
@@ -2919,6 +2919,12 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_XTENSA_TLS_FUNC",
"BFD_RELOC_XTENSA_TLS_ARG",
"BFD_RELOC_XTENSA_TLS_CALL",
+ "BFD_RELOC_XTENSA_PDIFF8",
+ "BFD_RELOC_XTENSA_PDIFF16",
+ "BFD_RELOC_XTENSA_PDIFF32",
+ "BFD_RELOC_XTENSA_NDIFF8",
+ "BFD_RELOC_XTENSA_NDIFF16",
+ "BFD_RELOC_XTENSA_NDIFF32",
"BFD_RELOC_Z80_DISP8",
"BFD_RELOC_Z80_BYTE0",
"BFD_RELOC_Z80_BYTE1",
diff --git a/bfd/reloc.c b/bfd/reloc.c
index c4dec86d1d46..f5df8e2ab3eb 100644
--- a/bfd/reloc.c
+++ b/bfd/reloc.c
@@ -6556,6 +6556,8 @@ ENUMX
ENUMX
BFD_RELOC_XTENSA_DIFF32
ENUMDOC
+ Xtensa relocations for backward compatibility. These have been replaced
+ by BFD_RELOC_XTENSA_PDIFF and BFD_RELOC_XTENSA_NDIFF.
Xtensa relocations to mark the difference of two local symbols.
These are only needed to support linker relaxation and can be ignored
when not relaxing. The field is set to the value of the difference
@@ -6668,6 +6670,28 @@ ENUMX
BFD_RELOC_XTENSA_TLS_CALL
ENUMDOC
Xtensa TLS relocations.
+ENUM
+ BFD_RELOC_XTENSA_PDIFF8
+ENUMX
+ BFD_RELOC_XTENSA_PDIFF16
+ENUMX
+ BFD_RELOC_XTENSA_PDIFF32
+ENUMX
+ BFD_RELOC_XTENSA_NDIFF8
+ENUMX
+ BFD_RELOC_XTENSA_NDIFF16
+ENUMX
+ BFD_RELOC_XTENSA_NDIFF32
+ENUMDOC
+ Xtensa relocations to mark the difference of two local symbols.
+ These are only needed to support linker relaxation and can be ignored
+ when not relaxing. The field is set to the value of the difference
+ assuming no relaxation. The relocation encodes the position of the
+ subtracted symbol so the linker can determine whether to adjust the field
+ value. PDIFF relocations are used for positive differences, NDIFF
+ relocations are used for negative differences. The difference value
+ is treated as unsigned with these relocation types, giving full
+ 8/16 value ranges.
ENUM
BFD_RELOC_Z80_DISP8
diff --git a/binutils/readelf.c b/binutils/readelf.c
index d4756c93b345..800918f901c8 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -13262,7 +13262,13 @@ is_none_reloc (Filedata * filedata, unsigned int reloc_type)
return (reloc_type == 0 /* R_XTENSA_NONE. */
|| reloc_type == 17 /* R_XTENSA_DIFF8. */
|| reloc_type == 18 /* R_XTENSA_DIFF16. */
- || reloc_type == 19 /* R_XTENSA_DIFF32. */);
+ || reloc_type == 19 /* R_XTENSA_DIFF32. */
+ || reloc_type == 57 /* R_XTENSA_PDIFF8. */
+ || reloc_type == 58 /* R_XTENSA_PDIFF16. */
+ || reloc_type == 59 /* R_XTENSA_PDIFF32. */
+ || reloc_type == 60 /* R_XTENSA_NDIFF8. */
+ || reloc_type == 61 /* R_XTENSA_NDIFF16. */
+ || reloc_type == 62 /* R_XTENSA_NDIFF32. */);
}
return FALSE;
}
diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c
index 71d4d94a8d7d..ee75c13548ff 100644
--- a/gas/config/tc-xtensa.c
+++ b/gas/config/tc-xtensa.c
@@ -5974,18 +5974,24 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg)
case BFD_RELOC_8:
if (fixP->fx_subsy)
{
+ bfd_boolean neg = S_GET_VALUE (fixP->fx_addsy) + fixP->fx_offset
+ < S_GET_VALUE (fixP->fx_subsy);
+
switch (fixP->fx_r_type)
{
case BFD_RELOC_8:
- fixP->fx_r_type = BFD_RELOC_XTENSA_DIFF8;
+ fixP->fx_r_type = neg
+ ? BFD_RELOC_XTENSA_NDIFF8 : BFD_RELOC_XTENSA_PDIFF8;
fixP->fx_signed = 0;
break;
case BFD_RELOC_16:
- fixP->fx_r_type = BFD_RELOC_XTENSA_DIFF16;
+ fixP->fx_r_type = neg
+ ? BFD_RELOC_XTENSA_NDIFF16 : BFD_RELOC_XTENSA_PDIFF16;
fixP->fx_signed = 0;
break;
case BFD_RELOC_32:
- fixP->fx_r_type = BFD_RELOC_XTENSA_DIFF32;
+ fixP->fx_r_type = neg
+ ? BFD_RELOC_XTENSA_NDIFF32 : BFD_RELOC_XTENSA_PDIFF32;
fixP->fx_signed = 0;
break;
default:
diff --git a/gas/testsuite/gas/xtensa/loc.d b/gas/testsuite/gas/xtensa/loc.d
index 71983cc90055..8fb3425999d5 100644
--- a/gas/testsuite/gas/xtensa/loc.d
+++ b/gas/testsuite/gas/xtensa/loc.d
@@ -6,5 +6,5 @@
RELOCATION RECORDS FOR \[\.debug_line\]:
#...
-.*R_XTENSA_DIFF16.*\.text\+0x00009c42
+.*R_XTENSA_PDIFF16.*\.text\+0x00009c42
#...
diff --git a/include/elf/xtensa.h b/include/elf/xtensa.h
index 2eb5e4e52941..bd5c80d13777 100644
--- a/include/elf/xtensa.h
+++ b/include/elf/xtensa.h
@@ -87,6 +87,12 @@ START_RELOC_NUMBERS (elf_xtensa_reloc_type)
RELOC_NUMBER (R_XTENSA_TLS_FUNC, 54)
RELOC_NUMBER (R_XTENSA_TLS_ARG, 55)
RELOC_NUMBER (R_XTENSA_TLS_CALL, 56)
+ RELOC_NUMBER (R_XTENSA_PDIFF8, 57)
+ RELOC_NUMBER (R_XTENSA_PDIFF16, 58)
+ RELOC_NUMBER (R_XTENSA_PDIFF32, 59)
+ RELOC_NUMBER (R_XTENSA_NDIFF8, 60)
+ RELOC_NUMBER (R_XTENSA_NDIFF16, 61)
+ RELOC_NUMBER (R_XTENSA_NDIFF32, 62)
END_RELOC_NUMBERS (R_XTENSA_max)
/* Processor-specific flags for the ELF header e_flags field. */
diff --git a/ld/testsuite/ld-xtensa/relax-loc.d b/ld/testsuite/ld-xtensa/relax-loc.d
new file mode 100644
index 000000000000..3c8d673732ff
--- /dev/null
+++ b/ld/testsuite/ld-xtensa/relax-loc.d
@@ -0,0 +1,7 @@
+#as: --text-section-literals
+#ld:
+#objdump: --dwarf=decodedline
+#...
+relax-loc.s[ ]+1[ ]+0x400054[ ]+.*
+relax-loc.s[ ]+2[ ]+0x40005c[ ]+.*
+#...
diff --git a/ld/testsuite/ld-xtensa/relax-loc.s b/ld/testsuite/ld-xtensa/relax-loc.s
new file mode 100644
index 000000000000..d768470e287a
--- /dev/null
+++ b/ld/testsuite/ld-xtensa/relax-loc.s
@@ -0,0 +1,15 @@
+ .file 1 "relax-loc.s"
+ .globl _start
+ .globl _ResetVector
+ .text
+_ResetVector:
+_start:
+ .loc 1 1
+ j 1f
+ .literal_position
+1:
+ .loc 1 2
+
+ .rep 10000
+ movi a2, 0x12345678
+ .endr
diff --git a/ld/testsuite/ld-xtensa/xtensa.exp b/ld/testsuite/ld-xtensa/xtensa.exp
index 9b2235b2151b..de39887936ad 100644
--- a/ld/testsuite/ld-xtensa/xtensa.exp
+++ b/ld/testsuite/ld-xtensa/xtensa.exp
@@ -27,6 +27,7 @@ run_dump_test "call_overflow"
run_dump_test "coalesce"
run_dump_test "diff_overflow"
run_dump_test "lcall"
+run_dump_test "relax-loc"
run_dump_test "relax-static-pie"
run_dump_test "relax-static-local-pie"
--
2.20.1

View File

@ -0,0 +1,128 @@
From 735321812435ae278d3766a3371f55937dc776d6 Mon Sep 17 00:00:00 2001
From: Max Filippov <jcmvbkbc@gmail.com>
Date: Sat, 25 Apr 2020 00:40:25 -0700
Subject: [PATCH] xtensa: fix XTENSA_NDIFF handling for PR ld/25861
Fields marked with XTENSA_NDIFF relocations are not negated, they only
have sign bits removed. Don't negate their values when relaxation is
performed. Don't add sign bits when the value is zero. Report overflow
when the result has negative sign but all significant bits are zero.
2020-04-29 Max Filippov <jcmvbkbc@gmail.com>
bfd/
* elf32-xtensa.c (relax_section): Don't negate diff_value for
XTENSA_NDIFF relocations. Don't add sign bits whe diff_value
equals 0. Report overflow when the result has negative sign but
all significant bits are zero.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Backported from: d548f47df4d2e3d117d504a4c9977982c78a0556
---
bfd/elf32-xtensa.c | 26 +++++++++++++++-----------
1 file changed, 15 insertions(+), 11 deletions(-)
diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c
index fded42d52a9a..4327b027911f 100644
--- a/bfd/elf32-xtensa.c
+++ b/bfd/elf32-xtensa.c
@@ -9670,37 +9670,44 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info)
switch (r_type)
{
case R_XTENSA_DIFF8:
+ diff_mask = 0x7f;
diff_value =
bfd_get_signed_8 (abfd, &contents[old_source_offset]);
break;
case R_XTENSA_DIFF16:
+ diff_mask = 0x7fff;
diff_value =
bfd_get_signed_16 (abfd, &contents[old_source_offset]);
break;
case R_XTENSA_DIFF32:
+ diff_mask = 0x7fffffff;
diff_value =
bfd_get_signed_32 (abfd, &contents[old_source_offset]);
break;
case R_XTENSA_PDIFF8:
case R_XTENSA_NDIFF8:
+ diff_mask = 0xff;
diff_value =
bfd_get_8 (abfd, &contents[old_source_offset]);
break;
case R_XTENSA_PDIFF16:
case R_XTENSA_NDIFF16:
+ diff_mask = 0xffff;
diff_value =
bfd_get_16 (abfd, &contents[old_source_offset]);
break;
case R_XTENSA_PDIFF32:
case R_XTENSA_NDIFF32:
+ diff_mask = 0xffffffff;
diff_value =
bfd_get_32 (abfd, &contents[old_source_offset]);
break;
}
if (r_type >= R_XTENSA_NDIFF8
- && r_type <= R_XTENSA_NDIFF32)
- diff_value = -diff_value;
+ && r_type <= R_XTENSA_NDIFF32
+ && diff_value)
+ diff_value |= ~diff_mask;
new_end_offset = offset_with_removed_text_map
(&target_relax_info->action_list,
@@ -9710,43 +9717,40 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info)
switch (r_type)
{
case R_XTENSA_DIFF8:
- diff_mask = 0x7f;
bfd_put_signed_8 (abfd, diff_value,
&contents[old_source_offset]);
break;
case R_XTENSA_DIFF16:
- diff_mask = 0x7fff;
bfd_put_signed_16 (abfd, diff_value,
&contents[old_source_offset]);
break;
case R_XTENSA_DIFF32:
- diff_mask = 0x7fffffff;
bfd_put_signed_32 (abfd, diff_value,
&contents[old_source_offset]);
break;
case R_XTENSA_PDIFF8:
case R_XTENSA_NDIFF8:
- diff_mask = 0xff;
bfd_put_8 (abfd, diff_value,
&contents[old_source_offset]);
break;
case R_XTENSA_PDIFF16:
case R_XTENSA_NDIFF16:
- diff_mask = 0xffff;
bfd_put_16 (abfd, diff_value,
&contents[old_source_offset]);
break;
case R_XTENSA_PDIFF32:
case R_XTENSA_NDIFF32:
- diff_mask = 0xffffffff;
bfd_put_32 (abfd, diff_value,
&contents[old_source_offset]);
break;
}
- /* Check for overflow. Sign bits must be all zeroes or all ones */
- if ((diff_value & ~diff_mask) != 0 &&
- (diff_value & ~diff_mask) != (-1 & ~diff_mask))
+ /* Check for overflow. Sign bits must be all zeroes or
+ all ones. When sign bits are all ones diff_value
+ may not be zero. */
+ if (((diff_value & ~diff_mask) != 0
+ && (diff_value & ~diff_mask) != ~diff_mask)
+ || (diff_value && (bfd_vma) diff_value == ~diff_mask))
{
(*link_info->callbacks->reloc_dangerous)
(link_info, _("overflow after relaxation"),
--
2.20.1

View File

@ -15,6 +15,7 @@ BOINC_LICENSE = LGPL-3.0+
BOINC_LICENSE_FILES = COPYING COPYING.LESSER BOINC_LICENSE_FILES = COPYING COPYING.LESSER
BOINC_DEPENDENCIES = host-pkgconf libcurl openssl BOINC_DEPENDENCIES = host-pkgconf libcurl openssl
BOINC_AUTORECONF = YES BOINC_AUTORECONF = YES
BOINC_CONF_ENV = ac_cv_path__libcurl_config=$(STAGING_DIR)/usr/bin/curl-config
BOINC_CONF_OPTS = \ BOINC_CONF_OPTS = \
--disable-apps \ --disable-apps \
--disable-boinczip \ --disable-boinczip \

View File

@ -1,17 +0,0 @@
Use XC_CHECK_BUILD_FLAGS instead of XC_CHECK_USER_FLAGS.
Otherwise it complains of CPPFLAGS in CFLAGS.
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
diff -Nura c-ares-1.10.0.orig/m4/xc-cc-check.m4 c-ares-1.10.0/m4/xc-cc-check.m4
--- c-ares-1.10.0.orig/m4/xc-cc-check.m4 2013-12-26 19:40:46.354195974 -0300
+++ c-ares-1.10.0/m4/xc-cc-check.m4 2013-12-26 19:41:01.850718535 -0300
@@ -59,7 +59,7 @@
AC_DEFUN([_XC_PROG_CC], [
AC_REQUIRE([_XC_PROG_CC_PREAMBLE])dnl
- AC_REQUIRE([XC_CHECK_USER_FLAGS])dnl
+ AC_REQUIRE([XC_CHECK_BUILD_FLAGS])dnl
AC_REQUIRE([AC_PROG_INSTALL])dnl
AC_REQUIRE([AC_PROG_CC])dnl
AC_REQUIRE([AM_PROG_CC_C_O])dnl

View File

@ -1,5 +1,5 @@
# Locally calculated after checking pgp signature # Locally calculated after checking pgp signature
sha256 6cdb97871f2930530c97deb7cf5c8fa4be5a0b02c7cea6e7c7667672a39d6852 c-ares-1.15.0.tar.gz sha256 d08312d0ecc3bd48eee0a4cc0d2137c9f194e0a28de2028928c0f6cae85f86ce c-ares-1.16.1.tar.gz
# Hash for license file # Hash for license file
sha256 db4eb63fe09daebdf57d3f79b091bb5ee5070c0d761040e83264e648d307af4c LICENSE.md sha256 db4eb63fe09daebdf57d3f79b091bb5ee5070c0d761040e83264e648d307af4c LICENSE.md

View File

@ -4,12 +4,10 @@
# #
################################################################################ ################################################################################
C_ARES_VERSION = 1.15.0 C_ARES_VERSION = 1.16.1
C_ARES_SITE = http://c-ares.haxx.se/download C_ARES_SITE = http://c-ares.haxx.se/download
C_ARES_INSTALL_STAGING = YES C_ARES_INSTALL_STAGING = YES
C_ARES_CONF_OPTS = --with-random=/dev/urandom C_ARES_CONF_OPTS = --with-random=/dev/urandom
# Rebuild configure to avoid XC_CHECK_USER_CFLAGS
C_ARES_AUTORECONF = YES
C_ARES_LICENSE = MIT C_ARES_LICENSE = MIT
C_ARES_LICENSE_FILES = LICENSE.md C_ARES_LICENSE_FILES = LICENSE.md

View File

@ -1,3 +1,8 @@
# From http://snapshot.debian.org/archive/debian/20141023T043132Z/pool/main/c/cvs/cvs_1.12.13-12%2Bsqueeze1.dsc # From http://snapshot.debian.org/archive/debian/20141023T043132Z/pool/main/c/cvs/cvs_1.12.13-12%2Bsqueeze1.dsc
sha256 b5961c2476b996e5758fa5e22b60af085adca41164cac0d8f68a1d3b49d4e4f1 cvs_1.12.13.orig.tar.gz sha256 b5961c2476b996e5758fa5e22b60af085adca41164cac0d8f68a1d3b49d4e4f1 cvs_1.12.13.orig.tar.gz
sha256 d52a9232d9cf36302a150d782fc7e5b6f92f8115505ae8a7dc6acfc83e809d2f cvs_1.12.13-12+squeeze1.diff.gz sha256 d52a9232d9cf36302a150d782fc7e5b6f92f8115505ae8a7dc6acfc83e809d2f cvs_1.12.13-12+squeeze1.diff.gz
# Hash for license files, locally computed
sha256 569c5b876327d899cf444b2277fe910128a38ca71d90755fe4125dd44f8ece02 COPYING
sha256 da0e282103fb508894e78db519aab255e36971ce0bc87de585e3b05014b83b1e COPYING.LIB
sha256 ee9a2fbdb626c0ac57fd8e569f357eb2e6d6c80cc6f41efa8bd126d5ea589d72 lib/glob-libc.h

View File

@ -8,6 +8,8 @@ CVS_VERSION = 1.12.13
CVS_SOURCE = cvs_$(CVS_VERSION).orig.tar.gz CVS_SOURCE = cvs_$(CVS_VERSION).orig.tar.gz
CVS_PATCH = cvs_$(CVS_VERSION)-12+squeeze1.diff.gz CVS_PATCH = cvs_$(CVS_VERSION)-12+squeeze1.diff.gz
CVS_SITE = http://snapshot.debian.org/archive/debian/20141023T043132Z/pool/main/c/cvs CVS_SITE = http://snapshot.debian.org/archive/debian/20141023T043132Z/pool/main/c/cvs
CVS_LICENSE = GPL-1.0+, LGPL-2.0+, LGPL-2.1+ (glob)
CVS_LICENSE_FILES = COPYING COPYING.LIB lib/glob-libc.h
CVS_DEPENDENCIES = ncurses CVS_DEPENDENCIES = ncurses
CVS_CONF_ENV = cvs_cv_func_printf_ptr=yes CVS_CONF_ENV = cvs_cv_func_printf_ptr=yes

View File

@ -1,3 +1,3 @@
# Locally calculated # Locally calculated
sha256 00d06baf4793794c0fd9ecad5b7e95aed6eb942f24c8b6e2d7c7f7564b9743ad docker-cli-19.03.5.tar.gz sha256 36dd85273c95f4755e08b37ea9660a1bf5c315570b679a0ce268750ca1ed3801 docker-cli-19.03.8.tar.gz
sha256 2d81ea060825006fc8f3fe28aa5dc0ffeb80faf325b612c955229157b8c10dc0 LICENSE sha256 2d81ea060825006fc8f3fe28aa5dc0ffeb80faf325b612c955229157b8c10dc0 LICENSE

View File

@ -4,7 +4,7 @@
# #
################################################################################ ################################################################################
DOCKER_CLI_VERSION = 19.03.5 DOCKER_CLI_VERSION = 19.03.8
DOCKER_CLI_SITE = $(call github,docker,cli,v$(DOCKER_CLI_VERSION)) DOCKER_CLI_SITE = $(call github,docker,cli,v$(DOCKER_CLI_VERSION))
DOCKER_CLI_WORKSPACE = gopath DOCKER_CLI_WORKSPACE = gopath

View File

@ -1,3 +1,3 @@
# Computed locally # Computed locally
sha256 318886ea1efdec36f088fd6a0a0fe2b2f0ebdfd0066bdb4bd284bad12abc0a41 docker-containerd-1.2.12.tar.gz sha256 0811057ab67b78ce911416e793edaeb14b3f1e105d67b8e67b6302e0eab572e4 docker-containerd-1.2.13.tar.gz
sha256 4bbe3b885e8cd1907ab4cf9a41e862e74e24b5422297a4f2fe524e6a30ada2b4 LICENSE sha256 4bbe3b885e8cd1907ab4cf9a41e862e74e24b5422297a4f2fe524e6a30ada2b4 LICENSE

View File

@ -4,7 +4,7 @@
# #
################################################################################ ################################################################################
DOCKER_CONTAINERD_VERSION = 1.2.12 DOCKER_CONTAINERD_VERSION = 1.2.13
DOCKER_CONTAINERD_SITE = $(call github,containerd,containerd,v$(DOCKER_CONTAINERD_VERSION)) DOCKER_CONTAINERD_SITE = $(call github,containerd,containerd,v$(DOCKER_CONTAINERD_VERSION))
DOCKER_CONTAINERD_LICENSE = Apache-2.0 DOCKER_CONTAINERD_LICENSE = Apache-2.0
DOCKER_CONTAINERD_LICENSE_FILES = LICENSE DOCKER_CONTAINERD_LICENSE_FILES = LICENSE

View File

@ -1,3 +1,3 @@
# Locally calculated # Locally calculated
sha256 bc5d1ac503e44593be8003ed0ad9c75bf0da535db19837a9338429c438bd4637 docker-engine-19.03.5.tar.gz sha256 13ec45ad45091111bd566aca9d81989b3f05e0625dab68d33c3ad81ff924172f docker-engine-19.03.8.tar.gz
sha256 7c87873291f289713ac5df48b1f2010eb6963752bbd6b530416ab99fc37914a8 LICENSE sha256 7c87873291f289713ac5df48b1f2010eb6963752bbd6b530416ab99fc37914a8 LICENSE

View File

@ -4,7 +4,7 @@
# #
################################################################################ ################################################################################
DOCKER_ENGINE_VERSION = 19.03.5 DOCKER_ENGINE_VERSION = 19.03.8
DOCKER_ENGINE_SITE = $(call github,docker,engine,v$(DOCKER_ENGINE_VERSION)) DOCKER_ENGINE_SITE = $(call github,docker,engine,v$(DOCKER_ENGINE_VERSION))
DOCKER_ENGINE_LICENSE = Apache-2.0 DOCKER_ENGINE_LICENSE = Apache-2.0

View File

@ -33,6 +33,9 @@ DOMOTICZ_CONF_OPTS += \
ifeq ($(BR2_PACKAGE_LIBUSB),y) ifeq ($(BR2_PACKAGE_LIBUSB),y)
DOMOTICZ_DEPENDENCIES += libusb DOMOTICZ_DEPENDENCIES += libusb
DOMOTICZ_CONF_OPTS += -DWITH_LIBUSB=ON
else
DOMOTICZ_CONF_OPTS += -DWITH_LIBUSB=OFF
endif endif
ifeq ($(BR2_PACKAGE_OPENZWAVE),y) ifeq ($(BR2_PACKAGE_OPENZWAVE),y)

View File

@ -1,5 +1,5 @@
# https://mirrors.edge.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs/v1.45.5/sha256sums.asc # https://mirrors.edge.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs/v1.45.6/sha256sums.asc
sha256 f9faccc0d90f73556e797dc7cc5979b582bd50d3f8609c0f2ad48c736d44aede e2fsprogs-1.45.5.tar.xz sha256 ffa7ae6954395abdc50d0f8605d8be84736465afc53b8938ef473fcf7ff44256 e2fsprogs-1.45.6.tar.xz
# Locally calculated # Locally calculated
sha256 5da5ef153e559c1d990d4c3eedbedd4442db892d37eae1f35fff069de8ec9020 NOTICE sha256 5da5ef153e559c1d990d4c3eedbedd4442db892d37eae1f35fff069de8ec9020 NOTICE
sha256 032989b508f1a72ebee5b3417e55d06d473f9ee203e45ab11864a7e49cdec63d lib/ss/mit-sipb-copyright.h sha256 032989b508f1a72ebee5b3417e55d06d473f9ee203e45ab11864a7e49cdec63d lib/ss/mit-sipb-copyright.h

View File

@ -4,7 +4,7 @@
# #
################################################################################ ################################################################################
E2FSPROGS_VERSION = 1.45.5 E2FSPROGS_VERSION = 1.45.6
E2FSPROGS_SOURCE = e2fsprogs-$(E2FSPROGS_VERSION).tar.xz E2FSPROGS_SOURCE = e2fsprogs-$(E2FSPROGS_VERSION).tar.xz
E2FSPROGS_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/people/tytso/e2fsprogs/v$(E2FSPROGS_VERSION) E2FSPROGS_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/people/tytso/e2fsprogs/v$(E2FSPROGS_VERSION)
E2FSPROGS_LICENSE = GPL-2.0, MIT-like with advertising clause (libss and libet) E2FSPROGS_LICENSE = GPL-2.0, MIT-like with advertising clause (libss and libet)

View File

@ -257,6 +257,8 @@ EFL_CONF_OPTS += --disable-image-loader-webp
endif endif
ifeq ($(BR2_PACKAGE_POPPLER),y) ifeq ($(BR2_PACKAGE_POPPLER),y)
# poppler needs c++11
EFL_CONF_ENV += CXXFLAGS="$(TARGET_CXXFLAGS) -std=c++11"
EFL_DEPENDENCIES += poppler EFL_DEPENDENCIES += poppler
EFL_CONF_OPTS += --enable-poppler EFL_CONF_OPTS += --enable-poppler
else else

View File

@ -6,4 +6,4 @@ config BR2_PACKAGE_EVTEST
device. It then monitors the device and displays all the device. It then monitors the device and displays all the
events layer events generated. events layer events generated.
http://cgit.freedesktop.org/evtest https://gitlab.freedesktop.org/libevdev/evtest

View File

@ -1,5 +1,5 @@
# locally computed # locally computed
sha256 73d5b604d57551418d282fedee3deae9f851afb3c355dccc87153364c046efd3 evtest-1.34.tar.gz sha256 0e7a2eeff380af796e5e9b21b6f48fd706c58c931162c151c2c1074bdfeb85c6 evtest-evtest-1.34.tar.gz
# License files # License files
sha256 ab15fd526bd8dd18a9e77ebc139656bf4d33e97fc7238cd11bf60e2b9b8666c6 COPYING sha256 ab15fd526bd8dd18a9e77ebc139656bf4d33e97fc7238cd11bf60e2b9b8666c6 COPYING

View File

@ -5,7 +5,8 @@
################################################################################ ################################################################################
EVTEST_VERSION = 1.34 EVTEST_VERSION = 1.34
EVTEST_SITE = http://cgit.freedesktop.org/evtest/snapshot EVTEST_SOURCE = evtest-evtest-$(EVTEST_VERSION).tar.gz
EVTEST_SITE = https://gitlab.freedesktop.org/libevdev/evtest/-/archive/evtest-$(EVTEST_VERSION)
EVTEST_LICENSE = GPL-2.0+ EVTEST_LICENSE = GPL-2.0+
EVTEST_LICENSE_FILES = COPYING EVTEST_LICENSE_FILES = COPYING
EVTEST_DEPENDENCIES = host-pkgconf EVTEST_DEPENDENCIES = host-pkgconf

View File

@ -0,0 +1,84 @@
From 19f6e36d3473ddba1a211e7af9352a10febb7270 Mon Sep 17 00:00:00 2001
From: Luca Ceresoli <luca@lucaceresoli.net>
Date: Fri, 1 May 2020 16:27:48 +0200
Subject: [PATCH] Makefile-Base: fix version.{h,sh} generation with parallel
build
When using parallel make (make -j<N>) the build sometimes fails either
during 'make' or during 'make install'.
Error messages look either like:
make[1]: Entering directory '/home/buildroot/autobuild/instance-2/output-1/build/exim-4.93.0.4'
/bin/sh scripts/source_checks
`Makefile' is up to date.
make[2]: Entering directory '/home/buildroot/autobuild/instance-2/output-1/build/exim-4.93.0.4/build-br'
/bin/sh ../scripts/Configure-os.c
../scripts/reversion: Your copy of Exim lacks any version information.
Makefile:785: recipe for target 'version.sh' failed
or like:
DESTDIR=/home/buildroot/autobuild/instance-2/output-1/target INSTALL_ARG="-no_chown -no_symlink" build=br /usr/bin/make -j4 -C /home/buildroot/autobuild/instance-2/output-1/build/exim-4.93.0.4 CFLAGS="-std=c99 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os " install
make[1]: Entering directory '/home/buildroot/autobuild/instance-2/output-1/build/exim-4.93.0.4'
/bin/sh scripts/source_checks
`Makefile' is up to date.
make[2]: Entering directory '/home/buildroot/autobuild/instance-2/output-1/build/exim-4.93.0.4/build-br'
/home/buildroot/autobuild/instance-2/output-1/host/bin/i586-linux-gcc version.c
version.c: In function 'version_init':
version.c:32:1: error: expected expression before ';' token
;
^
This is due to the rule:
version.h version.sh::
@../scripts/reversion
that executes reversion twice, once to satisfy the version.h target and
once for version.sh. This is unnecessary because reversion generates both
files anyway, but harmless without parallel build. When using parallel make
however reversion is sporadically run in a time sequence such that the
generated files are being used by other rules while they are being
rewritten by the second reversion instance.
Fix by making only one of the two targets run reversion, and the other one
depend on it.
Fixes builds found by the Buildroot autobuilders:
http://autobuild.buildroot.net/results/ebf/ebfccad007e216564889645a07f5487747116331//
http://autobuild.buildroot.net/results/56a/56a8457efcb32579ad6da99a769b6438dd0db267//
http://autobuild.buildroot.net/results/6a1/6a1f8a352649baf767b094cb6bbe2a7397fa7fac//
http://autobuild.buildroot.net/results/5ed/5ed1c42b3d33198f32d1267e5cc2b1fa1211495a//
http://autobuild.buildroot.net/results/b30/b304569948fd481ce33ecd052a1036153c5d459e//
http://autobuild.buildroot.net/results/d2c/d2c7abfe08672e53ff890127f787f8d2e84860f4//
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Upstream-status: patch submitted (https://bugs.exim.org/show_bug.cgi?id=2566)
---
OS/Makefile-Base | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/OS/Makefile-Base b/OS/Makefile-Base
index b66678bee4de..4966c25b5359 100644
--- a/OS/Makefile-Base
+++ b/OS/Makefile-Base
@@ -664,9 +664,11 @@ PHDRS = ../config.h \
# Update Exim's version information and build the version object.
-version.h version.sh::
+version.sh::
@../scripts/reversion
+version.h: version.sh
+
cnumber.h: version.h
version.o: $(HDRS) cnumber.h version.h version.c
--
2.26.2

View File

@ -3,11 +3,19 @@
# Start/stop exim # Start/stop exim
# #
PIDFILE=/var/lock/exim/exim-daemon.pid PIDFILE=/var/run/exim/exim.pid
case "$1" in case "$1" in
start) start)
echo "Starting exim..." echo "Starting exim..."
if [ ! -d /var/log/exim ]; then
mkdir -p /var/log/exim
chown exim:mail /var/log/exim
fi
if [ ! -d /var/run/exim ]; then
mkdir -p /var/run/exim
chown root:mail /var/run/exim
fi
start-stop-daemon -S -x exim -- -bd start-stop-daemon -S -x exim -- -bd
;; ;;
stop) stop)

View File

@ -39,6 +39,8 @@ define EXIM_USE_DEFAULT_CONFIG_FILE
$(INSTALL) -m 0644 $(@D)/src/EDITME $(@D)/Local/Makefile $(INSTALL) -m 0644 $(@D)/src/EDITME $(@D)/Local/Makefile
$(call exim-config-change,BIN_DIRECTORY,/usr/sbin) $(call exim-config-change,BIN_DIRECTORY,/usr/sbin)
$(call exim-config-change,CONFIGURE_FILE,/etc/exim/configure) $(call exim-config-change,CONFIGURE_FILE,/etc/exim/configure)
$(call exim-config-change,LOG_FILE_PATH,/var/log/exim/exim_%slog)
$(call exim-config-change,PID_FILE_PATH,/var/run/exim/exim.pid)
$(call exim-config-change,EXIM_USER,ref:exim) $(call exim-config-change,EXIM_USER,ref:exim)
$(call exim-config-change,EXIM_GROUP,mail) $(call exim-config-change,EXIM_GROUP,mail)
$(call exim-config-change,TRANSPORT_LMTP,yes) $(call exim-config-change,TRANSPORT_LMTP,yes)
@ -118,16 +120,14 @@ endif
# We need the host version of macro_predef during the build, before # We need the host version of macro_predef during the build, before
# building it we need to prepare the makefile. # building it we need to prepare the makefile.
# "The -j (parallel) flag must not be used with make"
# (http://www.exim.org/exim-html-current/doc/html/spec_html/ch04.html)
define EXIM_BUILD_CMDS define EXIM_BUILD_CMDS
$(TARGET_MAKE_ENV) build=br $(MAKE1) -C $(@D) makefile $(TARGET_MAKE_ENV) build=br $(MAKE) -C $(@D) makefile
$(HOST_MAKE_ENV) $(MAKE1) -C $(@D)/build-br macro_predef \ $(HOST_MAKE_ENV) $(MAKE) -C $(@D)/build-br macro_predef \
CC=$(HOSTCC) \ CC=$(HOSTCC) \
LNCC=$(HOSTCC) \ LNCC=$(HOSTCC) \
CFLAGS="-std=c99 $(HOST_CFLAGS)" \ CFLAGS="-std=c99 $(HOST_CFLAGS)" \
LFLAGS="-fPIC $(HOST_LDFLAGS)" LFLAGS="-fPIC $(HOST_LDFLAGS)"
$(TARGET_MAKE_ENV) build=br $(MAKE1) -C $(@D) $(EXIM_STATIC_FLAGS) \ $(TARGET_MAKE_ENV) build=br $(MAKE) -C $(@D) $(EXIM_STATIC_FLAGS) \
CFLAGS="-std=c99 $(TARGET_CFLAGS)" CFLAGS="-std=c99 $(TARGET_CFLAGS)"
endef endef
@ -135,7 +135,7 @@ endef
# something when installing... # something when installing...
define EXIM_INSTALL_TARGET_CMDS define EXIM_INSTALL_TARGET_CMDS
DESTDIR=$(TARGET_DIR) INSTALL_ARG="-no_chown -no_symlink" build=br \ DESTDIR=$(TARGET_DIR) INSTALL_ARG="-no_chown -no_symlink" build=br \
$(MAKE1) -C $(@D) $(EXIM_STATIC_FLAGS) \ $(MAKE) -C $(@D) $(EXIM_STATIC_FLAGS) \
CFLAGS="-std=c99 $(TARGET_CFLAGS)" \ CFLAGS="-std=c99 $(TARGET_CFLAGS)" \
install install
chmod u+s $(TARGET_DIR)/usr/sbin/exim chmod u+s $(TARGET_DIR)/usr/sbin/exim

View File

@ -3,6 +3,10 @@ Description=Exim MTA
After=syslog.target network.target After=syslog.target network.target
[Service] [Service]
User=exim
Group=mail
LogsDirectory=exim
RuntimeDirectory=exim
ExecStart=/usr/sbin/exim -bdf ExecStart=/usr/sbin/exim -bdf
Restart=always Restart=always

View File

@ -0,0 +1,33 @@
From 1812352d767ccf5431aa440123e2e260a4db2726 Mon Sep 17 00:00:00 2001
From: Michael Niedermayer <michael@niedermayer.cc>
Date: Sat, 7 Mar 2020 15:42:58 +0100
Subject: [PATCH] avcodec/cbs_jpeg: Check length for SOS
Fixes: out of array access
Fixes: 19734/clusterfuzz-testcase-minimized-ffmpeg_BSF_TRACE_HEADERS_fuzzer-5673507031875584
Fixes: 19353/clusterfuzz-testcase-minimized-ffmpeg_BSF_TRACE_HEADERS_fuzzer-5703944462663680
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
[Retrieved from:
https://github.com/FFmpeg/FFmpeg/commit/1812352d767ccf5431aa440123e2e260a4db2726]
---
libavcodec/cbs_jpeg.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavcodec/cbs_jpeg.c b/libavcodec/cbs_jpeg.c
index 6bbce5f89b7..89512a26bbf 100644
--- a/libavcodec/cbs_jpeg.c
+++ b/libavcodec/cbs_jpeg.c
@@ -197,6 +197,9 @@ static int cbs_jpeg_split_fragment(CodedBitstreamContext *ctx,
if (marker == JPEG_MARKER_SOS) {
length = AV_RB16(frag->data + start);
+ if (length > end - start)
+ return AVERROR_INVALIDDATA;
+
data_ref = NULL;
data = av_malloc(end - start +
AV_INPUT_BUFFER_PADDING_SIZE);

View File

@ -67,6 +67,13 @@ config BR2_PACKAGE_FFMPEG_FFPROBE
FFprobe is a utility to determine the audio and video FFprobe is a utility to determine the audio and video
characteristics of a container file. characteristics of a container file.
config BR2_PACKAGE_FFMPEG_XCBGRAB
bool "Build X11 screen grabbing"
depends on BR2_PACKAGE_XORG7
select BR2_PACKAGE_LIBXCB
help
X11 screen grabbing using libxcb.
config BR2_PACKAGE_FFMPEG_AVRESAMPLE config BR2_PACKAGE_FFMPEG_AVRESAMPLE
bool "Build libavresample" bool "Build libavresample"
help help

View File

@ -16,6 +16,9 @@ FFMPEG_LICENSE += and GPL-2.0+
FFMPEG_LICENSE_FILES += COPYING.GPLv2 FFMPEG_LICENSE_FILES += COPYING.GPLv2
endif endif
# 0001-avcodec-cbs_jpeg-Check-length-for-SOS.patch
FFMPEG_IGNORE_CVES += CVE-2020-12284
FFMPEG_CONF_OPTS = \ FFMPEG_CONF_OPTS = \
--prefix=/usr \ --prefix=/usr \
--enable-avfilter \ --enable-avfilter \
@ -96,6 +99,17 @@ else
FFMPEG_CONF_OPTS += --disable-ffprobe FFMPEG_CONF_OPTS += --disable-ffprobe
endif endif
ifeq ($(BR2_PACKAGE_FFMPEG_XCBGRAB),y)
FFMPEG_CONF_OPTS += \
--enable-libxcb \
--enable-libxcb-shape \
--enable-libxcb-shm \
--enable-libxcb-xfixes
FFMPEG_DEPENDENCIES += libxcb
else
FFMPEG_CONF_OPTS += --disable-libxcb
endif
ifeq ($(BR2_PACKAGE_FFMPEG_POSTPROC),y) ifeq ($(BR2_PACKAGE_FFMPEG_POSTPROC),y)
FFMPEG_CONF_OPTS += --enable-postproc FFMPEG_CONF_OPTS += --enable-postproc
else else

View File

@ -1,32 +0,0 @@
From 7dbb64cb62049159d9d71b9be39f469bbd116f41 Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Thu, 18 Apr 2019 23:40:52 +0200
Subject: [PATCH] xf_floatbar.c: fix build without Xfixes
Remove unneeded include on Xfixes.h as it is not always available and
not used in xf_floatbar.c
Fixes:
- http://autobuild.buildroot.org/results/69245e574787bada718c52c805ec137041dc233d
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
[Upstream status: https://github.com/FreeRDP/FreeRDP/pull/5354]
---
client/X11/xf_floatbar.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/client/X11/xf_floatbar.c b/client/X11/xf_floatbar.c
index 3643b6052..04912aa79 100644
--- a/client/X11/xf_floatbar.c
+++ b/client/X11/xf_floatbar.c
@@ -19,7 +19,6 @@
#include <X11/Xutil.h>
#include <X11/Xatom.h>
#include <X11/extensions/shape.h>
-#include <X11/extensions/Xfixes.h>
#include <X11/cursorfont.h>
#include "xf_floatbar.h"
--
2.20.1

View File

@ -1,3 +1,5 @@
# From https://pub.freerdp.com/releases/freerdp-2.0.1.tar.gz.sha256
sha256 2c4841c6a52fb153346436447708cbae7b479a7d8112d093e95d8c98f084be1b freerdp-2.1.0.tar.gz
# Locally calculated # Locally calculated
sha256 3406f3bfab63f81c1533029a5bf73949ff60f22f6e155c5a08005b8b8afe6d49 freerdp-2.0.0-rc4.tar.gz sha256 cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30 LICENSE
sha256 cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30 LICENSE

View File

@ -4,8 +4,8 @@
# #
################################################################################ ################################################################################
FREERDP_VERSION = 2.0.0-rc4 FREERDP_VERSION = 2.1.0
FREERDP_SITE = $(call github,FreeRDP,FreeRDP,$(FREERDP_VERSION)) FREERDP_SITE = https://pub.freerdp.com/releases
FREERDP_DEPENDENCIES = libglib2 openssl zlib FREERDP_DEPENDENCIES = libglib2 openssl zlib
FREERDP_LICENSE = Apache-2.0 FREERDP_LICENSE = Apache-2.0
FREERDP_LICENSE_FILES = LICENSE FREERDP_LICENSE_FILES = LICENSE
@ -42,6 +42,13 @@ else
FREERDP_CONF_OPTS += -DWITH_ALSA=OFF FREERDP_CONF_OPTS += -DWITH_ALSA=OFF
endif endif
ifeq ($(BR2_PACKAGE_LIBUSB),y)
FREERDP_CONF_OPTS += -DCHANNEL_URBDRC=ON
FREERDP_DEPENDENCIES += libusb
else
FREERDP_CONF_OPTS += -DCHANNEL_URBDRC=OFF
endif
ifeq ($(BR2_PACKAGE_PULSEAUDIO),y) ifeq ($(BR2_PACKAGE_PULSEAUDIO),y)
FREERDP_CONF_OPTS += -DWITH_PULSE=ON FREERDP_CONF_OPTS += -DWITH_PULSE=ON
FREERDP_DEPENDENCIES += pulseaudio FREERDP_DEPENDENCIES += pulseaudio

View File

@ -1,5 +1,5 @@
# Locally calculated # Locally calculated
sha256 6d6d02d035d988cbdb2014794f2efe970a3f5ac277202882bbf553bb7fd789d2 imx-gpu-g2d-6.4.0.p1.0-aarch32.bin sha256 6d6d02d035d988cbdb2014794f2efe970a3f5ac277202882bbf553bb7fd789d2 imx-gpu-g2d-6.4.0.p1.0-arm.bin
sha256 35885f435dbe951d2c0f439a376ed8a59a50b67a1b7e1e14fa2ab03995abb1ad imx-gpu-g2d-6.4.0.p1.0-aarch64.bin sha256 35885f435dbe951d2c0f439a376ed8a59a50b67a1b7e1e14fa2ab03995abb1ad imx-gpu-g2d-6.4.0.p1.0-aarch64.bin
sha256 d55f024af2bfff714b90de596f6d0399124b999e8c18a86b13a3b507bae6f561 COPYING sha256 d55f024af2bfff714b90de596f6d0399124b999e8c18a86b13a3b507bae6f561 COPYING
sha256 9665930f69c0b6f4a4c055d7fe2b8ee563e771efbc83892abb1955e61492cdf7 EULA sha256 9665930f69c0b6f4a4c055d7fe2b8ee563e771efbc83892abb1955e61492cdf7 EULA

View File

@ -7,7 +7,7 @@
ifeq ($(BR2_aarch64),y) ifeq ($(BR2_aarch64),y)
IMX_GPU_G2D_VERSION = 6.4.0.p1.0-aarch64 IMX_GPU_G2D_VERSION = 6.4.0.p1.0-aarch64
else else
IMX_GPU_G2D_VERSION = 6.4.0.p1.0-aarch32 IMX_GPU_G2D_VERSION = 6.4.0.p1.0-arm
endif endif
IMX_GPU_G2D_SITE = $(FREESCALE_IMX_SITE) IMX_GPU_G2D_SITE = $(FREESCALE_IMX_SITE)
IMX_GPU_G2D_SOURCE = imx-gpu-g2d-$(IMX_GPU_G2D_VERSION).bin IMX_GPU_G2D_SOURCE = imx-gpu-g2d-$(IMX_GPU_G2D_VERSION).bin

View File

@ -100,7 +100,7 @@ HOST_GCC_COMMON_CONF_ENV = \
GCC_COMMON_TARGET_CFLAGS = $(TARGET_CFLAGS) GCC_COMMON_TARGET_CFLAGS = $(TARGET_CFLAGS)
GCC_COMMON_TARGET_CXXFLAGS = $(TARGET_CXXFLAGS) GCC_COMMON_TARGET_CXXFLAGS = $(TARGET_CXXFLAGS)
# used to fix ../../../../libsanitizer/libbacktrace/../../libbacktrace/elf.c:772:21: error: st.st_mode may be used uninitialized in this function [-Werror=maybe-uninitialized] # used to fix ../../../../libsanitizer/libbacktrace/../../libbacktrace/elf.c:772:21: error: 'st.st_mode' may be used uninitialized in this function [-Werror=maybe-uninitialized]
ifeq ($(BR2_ENABLE_DEBUG),y) ifeq ($(BR2_ENABLE_DEBUG),y)
GCC_COMMON_TARGET_CFLAGS += -Wno-error GCC_COMMON_TARGET_CFLAGS += -Wno-error
endif endif

View File

@ -10,8 +10,12 @@ GFLAGS_INSTALL_STAGING = YES
GFLAGS_LICENSE = BSD-3-Clause GFLAGS_LICENSE = BSD-3-Clause
GFLAGS_LICENSE_FILES = COPYING.txt GFLAGS_LICENSE_FILES = COPYING.txt
# Force Release otherwise libraries will be suffixed by _debug which will raise
# unexpected build failures with packages that use gflags (e.g. rocksdb)
GFLAGS_CONF_OPTS = -DCMAKE_BUILD_TYPE=Release
ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),) ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),)
GFLAGS_CONF_OPTS = -DBUILD_gflags_LIB=OFF \ GFLAGS_CONF_OPTS += -DBUILD_gflags_LIB=OFF \
-DCMAKE_CXX_FLAGS="$(TARGET_CXXFLAGS) -DNO_THREADS" -DCMAKE_CXX_FLAGS="$(TARGET_CXXFLAGS) -DNO_THREADS"
endif endif

View File

@ -1,5 +1,5 @@
# Locally calculated (fetched from Github) # Locally calculated (fetched from Github)
sha256 fe1ca8099bc2cda997d8a585f1a512e59df56c52c9c7363a4058da2725c8f4a9 glibc-2.30-20-g50f20fe506abb8853641006a7b90a81af21d7b91.tar.gz sha256 4462f56696332efbc5b0c2f86d7aa75a2a02c3d44bc4345fa42b5bab1225de5c glibc-2.30-67-g4748829f86a458b76642f3e98b1d80f7b868e427.tar.gz
# Hashes for license files # Hashes for license files
sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING

View File

@ -17,7 +17,7 @@ else
# Generate version string using: # Generate version string using:
# git describe --match 'glibc-*' --abbrev=40 origin/release/MAJOR.MINOR/master | cut -d '-' -f 2- # git describe --match 'glibc-*' --abbrev=40 origin/release/MAJOR.MINOR/master | cut -d '-' -f 2-
# When updating the version, please also update localedef # When updating the version, please also update localedef
GLIBC_VERSION = 2.30-20-g50f20fe506abb8853641006a7b90a81af21d7b91 GLIBC_VERSION = 2.30-67-g4748829f86a458b76642f3e98b1d80f7b868e427
# Upstream doesn't officially provide an https download link. # Upstream doesn't officially provide an https download link.
# There is one (https://sourceware.org/git/glibc.git) but it's not reliable, # 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. # sometimes the connection times out. So use an unofficial github mirror.

View File

@ -19,7 +19,7 @@ ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
HAPROXY_LIBS += -latomic HAPROXY_LIBS += -latomic
endif endif
ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y) ifeq ($(BR2_TOOLCHAIN_HAS_THREADS_NPTL),y)
# threads uses atomics on gcc >= 4.7 and sync otherwise (see # threads uses atomics on gcc >= 4.7 and sync otherwise (see
# include/common/hathreads.h) # include/common/hathreads.h)
ifeq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_4_7):$(BR2_TOOLCHAIN_HAS_ATOMIC),y:y) ifeq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_4_7):$(BR2_TOOLCHAIN_HAS_ATOMIC),y:y)

View File

@ -38,6 +38,13 @@ ifeq ($(BR2_STATIC_LIBS),)
IRRLICHT_CONF_OPTS += sharedlib IRRLICHT_CONF_OPTS += sharedlib
endif endif
# Irrlicht fail to detect properly the NEON support on aarch64 or ARM with NEON FPU support.
# While linking an application with libIrrlicht.so, we get an undefined reference to
# png_init_filter_functions_neon.
# Some files are missing in the libpng bundled in Irrlicht, in particular arm/arm_init.c,
# so disable NEON support completely.
IRRLICHT_CONF_OPTS += CPPFLAGS="$(TARGET_CPPFLAGS) -DPNG_ARM_NEON_OPT=0"
define IRRLICHT_BUILD_CMDS define IRRLICHT_BUILD_CMDS
$(TARGET_MAKE_ENV) $(TARGET_MAKE_ENV)
$(MAKE) -C $(@D)/$(IRRLICHT_SUBDIR) $(IRRLICHT_CONF_OPTS) $(MAKE) -C $(@D)/$(IRRLICHT_SUBDIR) $(IRRLICHT_CONF_OPTS)

View File

@ -1,8 +1,3 @@
config BR2_PACKAGE_JPEG
bool "jpeg support"
help
Select the desired JPEG library provider.
# jpeg-turbo has simd support for some architectures # jpeg-turbo has simd support for some architectures
config BR2_PACKAGE_JPEG_SIMD_SUPPORT config BR2_PACKAGE_JPEG_SIMD_SUPPORT
bool bool
@ -11,6 +6,11 @@ config BR2_PACKAGE_JPEG_SIMD_SUPPORT
default y if BR2_POWERPC_CPU_HAS_ALTIVEC default y if BR2_POWERPC_CPU_HAS_ALTIVEC
default y if BR2_aarch64 || BR2_aarch64_be default y if BR2_aarch64 || BR2_aarch64_be
config BR2_PACKAGE_JPEG
bool "jpeg support"
help
Select the desired JPEG library provider.
if BR2_PACKAGE_JPEG if BR2_PACKAGE_JPEG
choice choice

View File

@ -1,5 +1,6 @@
config BR2_PACKAGE_KODI_PVR_VUPLUS config BR2_PACKAGE_KODI_PVR_VUPLUS
bool "kodi-pvr-vuplus" bool "kodi-pvr-vuplus"
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # json-for-modern-cpp
select BR2_PACKAGE_JSON_FOR_MODERN_CPP select BR2_PACKAGE_JSON_FOR_MODERN_CPP
select BR2_PACKAGE_KODI_PLATFORM select BR2_PACKAGE_KODI_PLATFORM
select BR2_PACKAGE_TINYXML select BR2_PACKAGE_TINYXML
@ -7,3 +8,6 @@ config BR2_PACKAGE_KODI_PVR_VUPLUS
VuPlus PVR client addon for Kodi VuPlus PVR client addon for Kodi
https://github.com/kodi-pvr/pvr.vuplus https://github.com/kodi-pvr/pvr.vuplus
comment "kodi-pvr-vuplus needs a toolchain w/ gcc >= 4.9"
depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9

View File

@ -79,6 +79,13 @@ else
LIBARCHIVE_CONF_OPTS += --without-xml2 LIBARCHIVE_CONF_OPTS += --without-xml2
endif endif
ifeq ($(BR2_PACKAGE_LZ4),y)
LIBARCHIVE_CONF_OPTS += --with-lz4
LIBARCHIVE_DEPENDENCIES += lz4
else
LIBARCHIVE_CONF_OPTS += --without-lz4
endif
ifeq ($(BR2_PACKAGE_LZO),y) ifeq ($(BR2_PACKAGE_LZO),y)
LIBARCHIVE_DEPENDENCIES += lzo LIBARCHIVE_DEPENDENCIES += lzo
else else
@ -124,11 +131,13 @@ HOST_LIBARCHIVE_CONF_OPTS = \
--without-expat \ --without-expat \
--without-libiconv-prefix \ --without-libiconv-prefix \
--without-xml2 \ --without-xml2 \
--without-lz4 \
--without-lzo2 \ --without-lzo2 \
--without-mbedtls \ --without-mbedtls \
--without-nettle \ --without-nettle \
--without-openssl \ --without-openssl \
--without-lzma --without-lzma \
--without-zstd
$(eval $(autotools-package)) $(eval $(autotools-package))
$(eval $(host-autotools-package)) $(eval $(host-autotools-package))

View File

@ -10,7 +10,17 @@ LIBCOAP_INSTALL_STAGING = YES
LIBCOAP_LICENSE = BSD-2-Clause LIBCOAP_LICENSE = BSD-2-Clause
LIBCOAP_LICENSE_FILES = COPYING LICENSE LIBCOAP_LICENSE_FILES = COPYING LICENSE
LIBCOAP_DEPENDENCIES = host-pkgconf LIBCOAP_DEPENDENCIES = host-pkgconf
LIBCOAP_CONF_OPTS = --disable-examples LIBCOAP_CONF_OPTS = --disable-examples --without-tinydtls
LIBCOAP_AUTORECONF = YES LIBCOAP_AUTORECONF = YES
ifeq ($(BR2_PACKAGE_GNUTLS),y)
LIBCOAP_DEPENDENCIES += gnutls
LIBCOAP_CONF_OPTS += --enable-dtls --with-gnutls --without-openssl
else ifeq ($(BR2_PACKAGE_OPENSSL),y)
LIBCOAP_DEPENDENCIES += openssl
LIBCOAP_CONF_OPTS += --enable-dtls --without-gnutls --with-openssl
else
LIBCOAP_CONF_OPTS += --disable-dtls
endif
$(eval $(autotools-package)) $(eval $(autotools-package))

View File

@ -10,6 +10,6 @@ config BR2_PACKAGE_LIBFM_EXTRA
http://wiki.lxde.org/en/Libfm http://wiki.lxde.org/en/Libfm
comment "libfm-extra needs a toolchain w/ wchar, threads, C++" comment "libfm-extra needs a toolchain w/ wchar, threads"
depends on BR2_USE_MMU depends on BR2_USE_MMU
depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS

View File

@ -52,6 +52,11 @@ LIBGLIB2_CONF_OPTS = \
-Dinstalled_tests=false \ -Dinstalled_tests=false \
-Doss_fuzz=disabled -Doss_fuzz=disabled
LIBGLIB2_MESON_EXTRA_PROPERTIES = \
have_c99_vsnprintf=true \
have_c99_snprintf=true \
have_unix98_printf=true
ifneq ($(BR2_ENABLE_LOCALE),y) ifneq ($(BR2_ENABLE_LOCALE),y)
LIBGLIB2_DEPENDENCIES += libiconv LIBGLIB2_DEPENDENCIES += libiconv
endif endif

View File

@ -1,60 +0,0 @@
From 1531a8e9b91b567979a2a0d7fd6a4c2e9126b01c Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Wed, 6 Mar 2019 23:06:54 +0100
Subject: [PATCH] fix build without GNU libiconv
iconvctl is only defined in GNU libiconv so check for the availability
of this function before using it
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
[Upstream status: https://github.com/OISF/libhtp/pull/193]
---
configure.ac | 18 ++++++++++++++++++
htp/htp_transcoder.c | 2 +-
2 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 7f0a58d..388ec7b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -155,6 +155,24 @@ sinclude(m4/lib-link.m4)
sinclude(m4/lib-prefix.m4)
AM_ICONV
+# iconvctl is not standard, it is defined only in GNU libiconv
+AC_MSG_CHECKING(for iconvctl)
+TMPLIBS="${LIBS}"
+LIBS="${LIBS} ${LIBICONV}"
+
+AC_TRY_LINK([#include <stdlib.h>
+ #include <iconv.h>],
+ [int iconv_param = 0;
+ iconv_t cd = iconv_open("","");
+ iconvctl(cd, ICONV_SET_DISCARD_ILSEQ, &iconv_param);
+ iconv_close(cd);],
+ [ac_cv_func_iconvctl=yes])
+AC_MSG_RESULT($ac_cv_func_iconvctl)
+if test "$ac_cv_func_iconvctl" == yes; then
+ AC_DEFINE(HAVE_ICONVCTL,1,"Define to 1 if you have the `iconvctl' function.")
+fi
+LIBS="${TMPLIBS}"
+
dnl -----------------------------------------------
dnl Check and enable the GCC opts we want to use.
dnl We may need to add more checks
diff --git a/htp/htp_transcoder.c b/htp/htp_transcoder.c
index 57ff74c..d8e8280 100644
--- a/htp/htp_transcoder.c
+++ b/htp/htp_transcoder.c
@@ -64,7 +64,7 @@ int htp_transcode_params(htp_connp_t *connp, htp_table_t **params, int destroy_o
return HTP_ERROR;
}
- #if (_LIBICONV_VERSION >= 0x0108)
+ #if (_LIBICONV_VERSION >= 0x0108 && HAVE_ICONVCTL)
int iconv_param = 0;
iconvctl(cd, ICONV_SET_TRANSLITERATE, &iconv_param);
iconv_param = 1;
--
2.14.1

View File

@ -7,7 +7,7 @@ zlib is a mandatory dependency so add it to Libs.private otherwise
static linking of packages linking with htp (e.g. suricata) will fail. static linking of packages linking with htp (e.g. suricata) will fail.
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
[Upstream status: not sent yet] [Upstream status: https://github.com/OISF/libhtp/pull/294]
--- ---
htp.pc.in | 2 +- htp.pc.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-) 1 file changed, 1 insertion(+), 1 deletion(-)

View File

@ -1,3 +1,3 @@
# Locally computed: # Locally computed:
sha256 a6a6f3b3f1fb6e8b8a1dae02db8a0090c438f0d057102dd8e52208224868c4e4 libhtp-0.5.32.tar.gz sha256 953651fdfe828805bb82dc1aa8b56187b0e2f80781727343e68ccf8afd6a9122 libhtp-0.5.33.tar.gz
sha256 87c93904e5434c81622ea690c2b90097b9f162aaa92a96542649a157dbf98d15 LICENSE sha256 87c93904e5434c81622ea690c2b90097b9f162aaa92a96542649a157dbf98d15 LICENSE

View File

@ -4,7 +4,7 @@
# #
################################################################################ ################################################################################
LIBHTP_VERSION = 0.5.32 LIBHTP_VERSION = 0.5.33
LIBHTP_SITE = $(call github,OISF,libhtp,$(LIBHTP_VERSION)) LIBHTP_SITE = $(call github,OISF,libhtp,$(LIBHTP_VERSION))
LIBHTP_LICENSE = BSD-3-Clause LIBHTP_LICENSE = BSD-3-Clause
LIBHTP_LICENSE_FILES = LICENSE LIBHTP_LICENSE_FILES = LICENSE

View File

@ -1,16 +0,0 @@
configure: don't require GNU-specific files when running automake
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
diff -durN libid3tag-0.15.1b.orig/configure.ac libid3tag-0.15.1b/configure.ac
--- libid3tag-0.15.1b.orig/configure.ac 2004-01-24 00:22:46.000000000 +0100
+++ libid3tag-0.15.1b/configure.ac 2018-11-25 15:31:04.184342212 +0100
@@ -26,7 +26,7 @@
AC_CONFIG_SRCDIR([id3tag.h])
-AM_INIT_AUTOMAKE
+AM_INIT_AUTOMAKE([foreign])
AM_CONFIG_HEADER([config.h])

View File

@ -1,4 +1,7 @@
# Locally computed: # From http://snapshot.debian.org/archive/debian/20190310T213528Z/pool/main/libi/libid3tag/libid3tag_0.15.1b-14.dsc
sha256 63da4f6e7997278f8a3fef4c6a372d342f705051d1eeb6a46a86b03610e26151 libid3tag-0.15.1b.tar.gz sha256 63da4f6e7997278f8a3fef4c6a372d342f705051d1eeb6a46a86b03610e26151 libid3tag_0.15.1b.orig.tar.gz
sha256 f174cafe02bef25a9ad8cb7f9ce80119147297a7036f50878e85ac0d7ae09c62 libid3tag_0.15.1b-14.debian.tar.xz
# Hash for license files:
sha256 32b1062f7da84967e7019d01ab805935caa7ab7321a7ced0e30ebe75e5df1670 COPYING sha256 32b1062f7da84967e7019d01ab805935caa7ab7321a7ced0e30ebe75e5df1670 COPYING
sha256 7f12ad28dc075763e91b91bfa60fad04062380011ddad8f6bac21dd7b1f44367 COPYRIGHT sha256 7f12ad28dc075763e91b91bfa60fad04062380011ddad8f6bac21dd7b1f44367 COPYRIGHT

View File

@ -5,11 +5,20 @@
################################################################################ ################################################################################
LIBID3TAG_VERSION = 0.15.1b LIBID3TAG_VERSION = 0.15.1b
LIBID3TAG_SITE = http://downloads.sourceforge.net/project/mad/libid3tag/$(LIBID3TAG_VERSION) LIBID3TAG_PATCH = libid3tag_$(LIBID3TAG_VERSION)-14.debian.tar.xz
LIBID3TAG_SOURCE = libid3tag_$(LIBID3TAG_VERSION).orig.tar.gz
LIBID3TAG_SITE = \
http://snapshot.debian.org/archive/debian/20190310T213528Z/pool/main/libi/libid3tag
LIBID3TAG_LICENSE = GPL-2.0+ LIBID3TAG_LICENSE = GPL-2.0+
LIBID3TAG_LICENSE_FILES = COPYING COPYRIGHT LIBID3TAG_LICENSE_FILES = COPYING COPYRIGHT
LIBID3TAG_INSTALL_STAGING = YES LIBID3TAG_INSTALL_STAGING = YES
LIBID3TAG_DEPENDENCIES = zlib LIBID3TAG_DEPENDENCIES = host-gperf zlib
# debian/patches/10_utf16.dpatch
LIBID3TAG_IGNORE_CVES += CVE-2004-2779 CVE-2017-11551
# debian/patches/11_unknown_encoding.dpatch
LIBID3TAG_IGNORE_CVES += CVE-2017-11550
# Force autoreconf to be able to use a more recent libtool script, that # Force autoreconf to be able to use a more recent libtool script, that
# is able to properly behave in the face of a missing C++ compiler. # is able to properly behave in the face of a missing C++ compiler.

View File

@ -1,8 +1,8 @@
# From https://lists.freedesktop.org/archives/wayland-devel/2020-March/041332.html # From https://lists.freedesktop.org/archives/wayland-devel/2020-April/041400.html
md5 76c5cb1a55f5098ed353ae7d4e054c50 libinput-1.15.4.tar.xz md5 c9a1b15bb932eaf22f840efe4c3f84eb libinput-1.15.5.tar.xz
sha1 43740a5fec3f6d474906173cc01ff3d73d935d2f libinput-1.15.4.tar.xz sha1 644b1c6936cfff8a4547da71fbcd7ebd28618426 libinput-1.15.5.tar.xz
sha256 9c8b6846d94e374ee4bdb32634e4ac4aa318afc31f9a58fcb545cd3095c745c1 libinput-1.15.4.tar.xz sha256 a90efc8f423c3094f2f9f372fb92381b2f3aad62e8b5882a8abe333aa8249c97 libinput-1.15.5.tar.xz
sha512 4659818952dc729cd5bdb78ebe21edbbacbf8a66a592b13ba30f3bb4c4e264208ec94440a253cfa4edc8b2ef904954eecea6be0f8d63cf239e3858d3abb64a80 libinput-1.15.4.tar.xz sha512 a0a3a325048841fc017e19d3bc5f5490605972ab9e2730dc5678bda7efb7a5b1fa6f531f3c8abd8393899ec383d8d2bcfd586eacee04fc1fbda0e02ba2af956a libinput-1.15.5.tar.xz
# License files # License files
sha256 70d5b1dfe5a9c50a1f2ea91b1c2b1c85d876c5c92339585edbb85cf69e945e14 COPYING sha256 70d5b1dfe5a9c50a1f2ea91b1c2b1c85d876c5c92339585edbb85cf69e945e14 COPYING

View File

@ -4,7 +4,7 @@
# #
################################################################################ ################################################################################
LIBINPUT_VERSION = 1.15.4 LIBINPUT_VERSION = 1.15.5
LIBINPUT_SOURCE = libinput-$(LIBINPUT_VERSION).tar.xz LIBINPUT_SOURCE = libinput-$(LIBINPUT_VERSION).tar.xz
LIBINPUT_SITE = http://www.freedesktop.org/software/libinput LIBINPUT_SITE = http://www.freedesktop.org/software/libinput
LIBINPUT_DEPENDENCIES = host-pkgconf libevdev mtdev udev LIBINPUT_DEPENDENCIES = host-pkgconf libevdev mtdev udev

View File

@ -1,33 +0,0 @@
libmad: remove deprecated cflags (-fforce-mem)
fforce-mem has long been deprecated, and is completely removed from
gcc 4.3.x on.
---
configure | 1 -
configure.ac | 1 -
2 files changed, 2 deletions(-)
Index: libmad-0.15.1b/configure.ac
===================================================================
--- libmad-0.15.1b.orig/configure.ac
+++ libmad-0.15.1b/configure.ac
@@ -140,7 +140,6 @@
case "$optimize" in
-O|"-O "*)
optimize="-O"
- optimize="$optimize -fforce-mem"
optimize="$optimize -fforce-addr"
: #x optimize="$optimize -finline-functions"
: #- optimize="$optimize -fstrength-reduce"
Index: libmad-0.15.1b/configure
===================================================================
--- libmad-0.15.1b.orig/configure
+++ libmad-0.15.1b/configure
@@ -19099,7 +19099,6 @@
case "$optimize" in
-O|"-O "*)
optimize="-O"
- optimize="$optimize -fforce-mem"
optimize="$optimize -fforce-addr"
: #x optimize="$optimize -finline-functions"
: #- optimize="$optimize -fstrength-reduce"

View File

@ -1,40 +0,0 @@
Fixes Thumb2-related build failure
Patch below comes from the Debian libmad package.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
From: Dave Martin
Subject: "rsc" doesnt exist anymore in thumb2
diff --git a/fixed.h b/fixed.h
index 4b58abf..ba4bc26 100644
--- a/fixed.h
+++ b/fixed.h
@@ -275,12 +275,25 @@ mad_fixed_t mad_f_mul_inline(mad_fixed_t x, mad_fixed_t y)
: "+r" (lo), "+r" (hi) \
: "%r" (x), "r" (y))
+#ifdef __thumb__
+/* In Thumb-2, the RSB-immediate instruction is only allowed with a zero
+ operand. If needed this code can also support Thumb-1
+ (simply append "s" to the end of the second two instructions). */
+# define MAD_F_MLN(hi, lo) \
+ asm ("rsbs %0, %0, #0\n\t" \
+ "sbc %1, %1, %1\n\t" \
+ "sub %1, %1, %2" \
+ : "+&r" (lo), "=&r" (hi) \
+ : "r" (hi) \
+ : "cc")
+#else /* ! __thumb__ */
# define MAD_F_MLN(hi, lo) \
asm ("rsbs %0, %2, #0\n\t" \
"rsc %1, %3, #0" \
- : "=r" (lo), "=r" (hi) \
+ : "=&r" (lo), "=r" (hi) \
: "0" (lo), "1" (hi) \
: "cc")
+#endif /* __thumb__ */
# define mad_f_scale64(hi, lo) \
({ mad_fixed_t __result; \

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