Fix build of Boost.Context on ppc64, future-proof the linker script
This commit is contained in:
parent
bcaac65465
commit
91de02f8db
38
boost-1.53.0-context.patch
Normal file
38
boost-1.53.0-context.patch
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
diff -up boost_1_53_0/libs/context/src/asm/make_ppc64_sysv_elf_gas.S\~ boost_1_53_0/libs/context/src/asm/make_ppc64_sysv_elf_gas.S
|
||||||
|
--- boost_1_53_0/libs/context/src/asm/make_ppc64_sysv_elf_gas.S~ 2012-11-30 08:38:52.000000000 +0100
|
||||||
|
+++ boost_1_53_0/libs/context/src/asm/make_ppc64_sysv_elf_gas.S 2013-02-11 19:14:45.179845740 +0100
|
||||||
|
@@ -89,7 +89,7 @@ make_fcontext:
|
||||||
|
.quad .make_fcontext,.TOC.@tocbase,0
|
||||||
|
.previous
|
||||||
|
.size make_fcontext,24
|
||||||
|
-.type .make_fcontext,@function
|
||||||
|
+.type make_fcontext,@function
|
||||||
|
.globl .make_fcontext
|
||||||
|
.make_fcontext:
|
||||||
|
mflr %r6 # save return address into R6
|
||||||
|
@@ -99,13 +99,13 @@ make_fcontext:
|
||||||
|
|
||||||
|
# call align_stack, R3 contains address at 16 byte boundary after return
|
||||||
|
# == pointer to fcontext_t and address of context stack
|
||||||
|
- rlwinm %r3, %r3, 0, 0, 59
|
||||||
|
+ rldicr %r3, %r3, 0, 59
|
||||||
|
|
||||||
|
std %r0, 184(%r3) # save address of context stack (base) in fcontext_t
|
||||||
|
std %r4, 192(%r3) # save context stack size in fcontext_t
|
||||||
|
std %r5, 176(%r3) # save address of context function in fcontext_t
|
||||||
|
|
||||||
|
- subf %r0, %r3, 64 # 64 bytes on stack for parameter area (== 8 registers)
|
||||||
|
+ addi %r0, %r3, -64 # 64 bytes on stack for parameter area (== 8 registers)
|
||||||
|
std %r0, 152(%r3) # save the stack base
|
||||||
|
|
||||||
|
mflr %r0 # load LR
|
||||||
|
@@ -128,5 +128,6 @@ finish:
|
||||||
|
stwu %r1, -32(%r1) # allocate stack space, SP % 16 == 0
|
||||||
|
|
||||||
|
li %r3, 0 # set return value to zero
|
||||||
|
- bl _exit@plt # exit application
|
||||||
|
+ bl _exit # exit application
|
||||||
|
+ nop # padding for R_PPC64_REL24
|
||||||
|
.size .make_fcontext, .-.make_fcontext
|
||||||
|
|
||||||
|
Diff finished. Mon Feb 11 19:15:05 2013
|
13
boost.spec
13
boost.spec
@ -25,7 +25,7 @@ Name: boost
|
|||||||
Summary: The free peer-reviewed portable C++ source libraries
|
Summary: The free peer-reviewed portable C++ source libraries
|
||||||
Version: 1.53.0
|
Version: 1.53.0
|
||||||
%define version_enc 1_53_0
|
%define version_enc 1_53_0
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
License: Boost and MIT and Python
|
License: Boost and MIT and Python
|
||||||
|
|
||||||
%define toplev_dirname %{name}_%{version_enc}
|
%define toplev_dirname %{name}_%{version_enc}
|
||||||
@ -101,6 +101,9 @@ Patch10: boost-1.50.0-long-double-1.patch
|
|||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=828857
|
# https://bugzilla.redhat.com/show_bug.cgi?id=828857
|
||||||
Patch15: boost-1.50.0-pool.patch
|
Patch15: boost-1.50.0-pool.patch
|
||||||
|
|
||||||
|
# https://bugzilla.redhat.com/show_bug.cgi?id=909888
|
||||||
|
Patch16: boost-1.53.0-context.patch
|
||||||
|
|
||||||
%bcond_with tests
|
%bcond_with tests
|
||||||
%bcond_with docs_generated
|
%bcond_with docs_generated
|
||||||
|
|
||||||
@ -496,6 +499,7 @@ a number of significant features and is now developed independently
|
|||||||
%patch9 -p1
|
%patch9 -p1
|
||||||
%patch10 -p1
|
%patch10 -p1
|
||||||
%patch15 -p0
|
%patch15 -p0
|
||||||
|
%patch16 -p1
|
||||||
|
|
||||||
# At least python2_version needs to be a macro so that it's visible in
|
# At least python2_version needs to be a macro so that it's visible in
|
||||||
# %%install as well.
|
# %%install as well.
|
||||||
@ -522,6 +526,7 @@ using python : %{python3_version} : /usr/bin/python3 : /usr/include/python%{pyth
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
./bootstrap.sh --with-toolset=gcc --with-icu
|
./bootstrap.sh --with-toolset=gcc --with-icu
|
||||||
|
sed 's/%%{version}/%{version}/g' %{SOURCE2} > $(basename %{SOURCE2})
|
||||||
|
|
||||||
# N.B. When we build the following with PCH, parts of boost (math
|
# N.B. When we build the following with PCH, parts of boost (math
|
||||||
# library in particular) end up being built second time during
|
# library in particular) end up being built second time during
|
||||||
@ -640,7 +645,7 @@ echo ============================= install serial ==================
|
|||||||
# itself for details of why we need to do this.
|
# itself for details of why we need to do this.
|
||||||
[ -f $RPM_BUILD_ROOT%{_libdir}/libboost_thread-mt.so ] # Must be present
|
[ -f $RPM_BUILD_ROOT%{_libdir}/libboost_thread-mt.so ] # Must be present
|
||||||
rm -f $RPM_BUILD_ROOT%{_libdir}/libboost_thread-mt.so
|
rm -f $RPM_BUILD_ROOT%{_libdir}/libboost_thread-mt.so
|
||||||
install -p -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_libdir}/
|
install -p -m 644 $(basename %{SOURCE2}) $RPM_BUILD_ROOT%{_libdir}/
|
||||||
|
|
||||||
echo ============================= install Boost.Build ==================
|
echo ============================= install Boost.Build ==================
|
||||||
(cd tools/build/v2
|
(cd tools/build/v2
|
||||||
@ -1011,6 +1016,10 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%{_mandir}/man1/bjam.1*
|
%{_mandir}/man1/bjam.1*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Feb 11 2013 Petr Machata <pmachata@redhat.com> - 1.53.0-3
|
||||||
|
- Fix Boost.Context on ppc64
|
||||||
|
- Future-proof the linker script boost_thread-mt.so
|
||||||
|
|
||||||
* Sun Feb 10 2013 Denis Arnaud <denis.arnaud_fedora@m4x.org> - 1.53.0-2
|
* Sun Feb 10 2013 Denis Arnaud <denis.arnaud_fedora@m4x.org> - 1.53.0-2
|
||||||
- Fixed the libboost_thread-mt.so script (which wrongly referred to Boost-1.50)
|
- Fixed the libboost_thread-mt.so script (which wrongly referred to Boost-1.50)
|
||||||
|
|
||||||
|
@ -8,5 +8,5 @@
|
|||||||
transitive one. Hence this linker script, which brings in the
|
transitive one. Hence this linker script, which brings in the
|
||||||
Boost.System DSO. */
|
Boost.System DSO. */
|
||||||
|
|
||||||
INPUT(libboost_thread-mt.so.1.53.0)
|
INPUT(libboost_thread-mt.so.%{version})
|
||||||
INPUT(libboost_system-mt.so.1.53.0)
|
INPUT(libboost_system-mt.so.%{version})
|
||||||
|
Loading…
Reference in New Issue
Block a user