Source: boost1.71 Version: 1.71.0-1 Severity: wishlist Tags: patch User: debian-ri...@lists.debian.org Usertags: riscv64
boost 1.71 added support for context on riscv64. However a small fix backported from upstream is need to correctly support non-PIC. Please find attached a patch to fix that. Could you please include it in the next upload? Thanks. -- System Information: Debian Release: bullseye/sid APT prefers testing APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 5.3.0-3-amd64 (SMP w/4 CPU cores) Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE=fr (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled
diff -Nru boost1.71-1.71.0/debian/control boost1.71-1.71.0/debian/control --- boost1.71-1.71.0/debian/control 2019-12-26 09:26:16.000000000 +0000 +++ boost1.71-1.71.0/debian/control 2019-12-28 10:19:41.000000000 +0000 @@ -29,12 +29,12 @@ libboost-atomic1.71-dev, libboost-chrono1.71-dev, libboost-container1.71-dev, - libboost-context1.71-dev [i386 hurd-i386 kfreebsd-i386 amd64 kfreebsd-amd64 armel armhf arm64 mips mipsel powerpc ppc64el], + libboost-context1.71-dev [i386 hurd-i386 kfreebsd-i386 amd64 kfreebsd-amd64 armel armhf arm64 mips mipsel powerpc ppc64el riscv64], libboost-contract1.71-dev, - libboost-coroutine1.71-dev [i386 hurd-i386 kfreebsd-i386 amd64 kfreebsd-amd64 armel armhf arm64 mips mipsel powerpc ppc64el], + libboost-coroutine1.71-dev [i386 hurd-i386 kfreebsd-i386 amd64 kfreebsd-amd64 armel armhf arm64 mips mipsel powerpc ppc64el riscv64], libboost-date-time1.71-dev, libboost-exception1.71-dev, - libboost-fiber1.71-dev [i386 hurd-i386 kfreebsd-i386 amd64 kfreebsd-amd64 armel armhf arm64 mips mipsel powerpc ppc64el], + libboost-fiber1.71-dev [i386 hurd-i386 kfreebsd-i386 amd64 kfreebsd-amd64 armel armhf arm64 mips mipsel powerpc ppc64el riscv64], libboost-filesystem1.71-dev, libboost-graph1.71-dev, libboost-graph-parallel1.71-dev, @@ -109,11 +109,11 @@ libboost-atomic1.71-dev, libboost-chrono1.71-dev, libboost-container1.71-dev, - libboost-context1.71-dev [i386 hurd-i386 kfreebsd-i386 amd64 kfreebsd-amd64 armel armhf arm64 mips mipsel powerpc ppc64el], - libboost-coroutine1.71-dev [i386 hurd-i386 kfreebsd-i386 amd64 kfreebsd-amd64 armel armhf arm64 mips mipsel powerpc ppc64el], + libboost-context1.71-dev [i386 hurd-i386 kfreebsd-i386 amd64 kfreebsd-amd64 armel armhf arm64 mips mipsel powerpc ppc64el riscv64], + libboost-coroutine1.71-dev [i386 hurd-i386 kfreebsd-i386 amd64 kfreebsd-amd64 armel armhf arm64 mips mipsel powerpc ppc64el riscv64], libboost-date-time1.71-dev, libboost-exception1.71-dev, - libboost-fiber1.71-dev [i386 hurd-i386 kfreebsd-i386 amd64 kfreebsd-amd64 armel armhf arm64 mips mipsel powerpc ppc64el], + libboost-fiber1.71-dev [i386 hurd-i386 kfreebsd-i386 amd64 kfreebsd-amd64 armel armhf arm64 mips mipsel powerpc ppc64el riscv64], libboost-filesystem1.71-dev, libboost-graph1.71-dev, libboost-graph-parallel1.71-dev, @@ -375,7 +375,7 @@ Package: libboost-context1.71.0 Homepage: http://www.boost.org/libs/context/ -Architecture: i386 hurd-i386 kfreebsd-i386 amd64 kfreebsd-amd64 armel armhf arm64 mips mipsel powerpc ppc64el +Architecture: i386 hurd-i386 kfreebsd-i386 amd64 kfreebsd-amd64 armel armhf arm64 mips mipsel powerpc ppc64el riscv64 Multi-Arch: same Section: libs Depends: ${misc:Depends}, ${shlibs:Depends} @@ -395,7 +395,7 @@ Package: libboost-context1.71-dev Homepage: http://www.boost.org/libs/context/ -Architecture: i386 hurd-i386 kfreebsd-i386 amd64 kfreebsd-amd64 armel armhf arm64 mips mipsel powerpc ppc64el +Architecture: i386 hurd-i386 kfreebsd-i386 amd64 kfreebsd-amd64 armel armhf arm64 mips mipsel powerpc ppc64el riscv64 Multi-Arch: same Section: libdevel Depends: ${misc:Depends}, @@ -451,7 +451,7 @@ Package: libboost-coroutine1.71.0 Homepage: http://www.boost.org/libs/coroutine/ -Architecture: i386 hurd-i386 kfreebsd-i386 amd64 kfreebsd-amd64 armel armhf arm64 mips mipsel powerpc ppc64el +Architecture: i386 hurd-i386 kfreebsd-i386 amd64 kfreebsd-amd64 armel armhf arm64 mips mipsel powerpc ppc64el riscv64 Multi-Arch: same Section: libs Depends: ${misc:Depends}, ${shlibs:Depends} @@ -476,7 +476,7 @@ Package: libboost-coroutine1.71-dev Homepage: http://www.boost.org/libs/coroutine/ -Architecture: i386 hurd-i386 kfreebsd-i386 amd64 kfreebsd-amd64 armel armhf arm64 mips mipsel powerpc ppc64el +Architecture: i386 hurd-i386 kfreebsd-i386 amd64 kfreebsd-amd64 armel armhf arm64 mips mipsel powerpc ppc64el riscv64 Multi-Arch: same Section: libdevel Depends: ${misc:Depends}, @@ -548,7 +548,7 @@ Package: libboost-fiber1.71.0 Homepage: http://www.boost.org/libs/fiber/ -Architecture: i386 hurd-i386 kfreebsd-i386 amd64 kfreebsd-amd64 armel armhf arm64 mips mipsel powerpc ppc64el +Architecture: i386 hurd-i386 kfreebsd-i386 amd64 kfreebsd-amd64 armel armhf arm64 mips mipsel powerpc ppc64el riscv64 Multi-Arch: same Section: libs Depends: ${misc:Depends}, ${shlibs:Depends} @@ -578,7 +578,7 @@ Package: libboost-fiber1.71-dev Homepage: http://www.boost.org/libs/fiber/ -Architecture: i386 hurd-i386 kfreebsd-i386 amd64 kfreebsd-amd64 armel armhf arm64 mips mipsel powerpc ppc64el +Architecture: i386 hurd-i386 kfreebsd-i386 amd64 kfreebsd-amd64 armel armhf arm64 mips mipsel powerpc ppc64el riscv64 Multi-Arch: same Section: libdevel Depends: ${misc:Depends}, diff -Nru boost1.71-1.71.0/debian/patches/fix-riscv64-non-pic.patch boost1.71-1.71.0/debian/patches/fix-riscv64-non-pic.patch --- boost1.71-1.71.0/debian/patches/fix-riscv64-non-pic.patch 1970-01-01 00:00:00.000000000 +0000 +++ boost1.71-1.71.0/debian/patches/fix-riscv64-non-pic.patch 2019-12-28 10:19:41.000000000 +0000 @@ -0,0 +1,28 @@ +From e86c66714cb4abb0a6f6ebf7d5fe5da696518482 Mon Sep 17 00:00:00 2001 +From: Andreas Schwab <sch...@suse.de> +Date: Fri, 6 Dec 2019 21:40:34 +0100 +Subject: [PATCH] Fix non-PIC in RISC-V assembly + +Since this ends up in a shared library we should use a PLT call. Also, +the finish label is local, so we can use lla instead of la. + +--- a/libs/context/src/asm/make_riscv64_sysv_elf_gas.S ++++ b/libs/context/src/asm/make_riscv64_sysv_elf_gas.S +@@ -75,7 +75,7 @@ make_fcontext: + + # save address of finish as return-address for context-function + # will be entered after context-function returns (RA register) +- la a4, finish ++ lla a4, finish + sd a4, 0xc0(a0) + + ret // return pointer to context-data (a0) +@@ -84,7 +84,7 @@ finish: + # exit code is zero + li a0, 0 + # exit application +- tail _exit ++ tail _exit@plt + + .size make_fcontext,.-make_fcontext + # Mark that we don't need executable stack. diff -Nru boost1.71-1.71.0/debian/patches/series boost1.71-1.71.0/debian/patches/series --- boost1.71-1.71.0/debian/patches/series 2019-12-26 09:26:16.000000000 +0000 +++ boost1.71-1.71.0/debian/patches/series 2019-12-28 10:19:41.000000000 +0000 @@ -19,3 +19,4 @@ #002-fix-powerpc-uClibc-build-issue.patch #fix-boost-compute-gcc8-ftbfs.patch fix-mpi-python-compilation.patch +fix-riscv64-non-pic.patch diff -Nru boost1.71-1.71.0/debian/rules boost1.71-1.71.0/debian/rules --- boost1.71-1.71.0/debian/rules 2019-12-26 09:26:16.000000000 +0000 +++ boost1.71-1.71.0/debian/rules 2019-12-28 10:19:41.000000000 +0000 @@ -164,6 +164,8 @@ BUILD_CONTEXT = yes else ifeq ($(DEB_BUILD_ARCH), ppc64el) BUILD_CONTEXT = yes +else ifeq ($(DEB_BUILD_ARCH), riscv64) +BUILD_CONTEXT = yes else ifeq ($(DEB_BUILD_ARCH), s390) BUILD_CONTEXT = no else ifeq ($(DEB_BUILD_ARCH), s390x)