diff mbox

boost: fix sparc compile

Message ID 20151115122455.GA29481@waldemar-brodkorb.de
State Accepted
Headers show

Commit Message

Waldemar Brodkorb Nov. 15, 2015, 12:24 p.m. UTC
Like for sparc64, set correct instruction set.
Patch is obsoleted by this changeset.

Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
---

boost::context still does not compile. Don't know why it is
disabled for sparc/sparc64 as it contains the needed code.
Need to check on my sparc systems before enabling via a patch.

---
 ...0003-Remove-bogus-c3-cpu-varant-for-SPARC.patch |   42 --------------------
 package/boost/boost.mk                             |    4 ++
 2 files changed, 4 insertions(+), 42 deletions(-)
 delete mode 100644 package/boost/0003-Remove-bogus-c3-cpu-varant-for-SPARC.patch

Comments

Thomas Petazzoni Nov. 16, 2015, 8:40 p.m. UTC | #1
Dear Waldemar Brodkorb,

On Sun, 15 Nov 2015 13:24:55 +0100, Waldemar Brodkorb wrote:
> Like for sparc64, set correct instruction set.
> Patch is obsoleted by this changeset.
> 
> Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
> ---

Is this fixing an actual issue / build failure, or just making the
Sparc fix nicer ?

Also, Boost on Sparc still doesn't build properly for me in certain
configurations. For example:

BR2_sparc=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-sparc-glibc-2015.08-647-gc356fb2.tar.bz2"
BR2_TOOLCHAIN_EXTERNAL_GCC_4_9=y
BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_2=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC=y
BR2_TOOLCHAIN_EXTERNAL_CXX=y
BR2_INIT_NONE=y
BR2_SYSTEM_BIN_SH_NONE=y
# BR2_PACKAGE_BUSYBOX is not set
BR2_PACKAGE_BOOST=y
BR2_PACKAGE_BOOST_ATOMIC=y
BR2_PACKAGE_BOOST_CHRONO=y
BR2_PACKAGE_BOOST_CONTAINER=y
BR2_PACKAGE_BOOST_CONTEXT=y
BR2_PACKAGE_BOOST_COROUTINE=y
BR2_PACKAGE_BOOST_DATE_TIME=y
BR2_PACKAGE_BOOST_EXCEPTION=y
BR2_PACKAGE_BOOST_FILESYSTEM=y
BR2_PACKAGE_BOOST_GRAPH=y
BR2_PACKAGE_BOOST_GRAPH_PARALLEL=y
BR2_PACKAGE_BOOST_IOSTREAMS=y
BR2_PACKAGE_BOOST_LOCALE=y
BR2_PACKAGE_BOOST_LOG=y
BR2_PACKAGE_BOOST_MATH=y
BR2_PACKAGE_BOOST_MPI=y
BR2_PACKAGE_BOOST_PROGRAM_OPTIONS=y
BR2_PACKAGE_BOOST_RANDOM=y
BR2_PACKAGE_BOOST_REGEX=y
BR2_PACKAGE_BOOST_SERIALIZATION=y
BR2_PACKAGE_BOOST_SIGNALS=y
BR2_PACKAGE_BOOST_SYSTEM=y
BR2_PACKAGE_BOOST_TEST=y
BR2_PACKAGE_BOOST_TIMER=y
BR2_PACKAGE_BOOST_WAVE=y
# BR2_TARGET_ROOTFS_TAR is not set

Fails with:

...failed gcc.compile.asm bin.v2/libs/context/build/gcc-4.9.3/release/threading-multi/asm/jump_sparc_sysv_elf_gas.o...
gcc.compile.c++ bin.v2/libs/context/build/gcc-4.9.3/release/threading-multi/unsupported.o
libs/context/src/unsupported.cpp:7:2: error: #error "platform not supported"
 #error "platform not supported"

Best regards,

Thomas
Arnout Vandecappelle Nov. 16, 2015, 8:43 p.m. UTC | #2
On 16-11-15 21:40, Thomas Petazzoni wrote:
> Dear Waldemar Brodkorb,
> 
> On Sun, 15 Nov 2015 13:24:55 +0100, Waldemar Brodkorb wrote:
>> Like for sparc64, set correct instruction set.
>> Patch is obsoleted by this changeset.
>>
>> Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
>> ---
> 
> Is this fixing an actual issue / build failure, or just making the
> Sparc fix nicer ?
> 
> Also, Boost on Sparc still doesn't build properly for me in certain
> configurations. For example:
> 
> BR2_sparc=y
> BR2_TOOLCHAIN_EXTERNAL=y
> BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
> BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-sparc-glibc-2015.08-647-gc356fb2.tar.bz2"
> BR2_TOOLCHAIN_EXTERNAL_GCC_4_9=y
> BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_2=y
> BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC=y
> BR2_TOOLCHAIN_EXTERNAL_CXX=y
> BR2_INIT_NONE=y
> BR2_SYSTEM_BIN_SH_NONE=y
> # BR2_PACKAGE_BUSYBOX is not set
> BR2_PACKAGE_BOOST=y
> BR2_PACKAGE_BOOST_ATOMIC=y
> BR2_PACKAGE_BOOST_CHRONO=y
> BR2_PACKAGE_BOOST_CONTAINER=y
> BR2_PACKAGE_BOOST_CONTEXT=y

 Quoting Waldemar:

boost::context still does not compile. Don't know why it is
disabled for sparc/sparc64 as it contains the needed code.
Need to check on my sparc systems before enabling via a patch.

 But for the release we probably want to disable it in Config.in.

 Regards,
 Arnout

> BR2_PACKAGE_BOOST_COROUTINE=y
> BR2_PACKAGE_BOOST_DATE_TIME=y
> BR2_PACKAGE_BOOST_EXCEPTION=y
> BR2_PACKAGE_BOOST_FILESYSTEM=y
> BR2_PACKAGE_BOOST_GRAPH=y
> BR2_PACKAGE_BOOST_GRAPH_PARALLEL=y
> BR2_PACKAGE_BOOST_IOSTREAMS=y
> BR2_PACKAGE_BOOST_LOCALE=y
> BR2_PACKAGE_BOOST_LOG=y
> BR2_PACKAGE_BOOST_MATH=y
> BR2_PACKAGE_BOOST_MPI=y
> BR2_PACKAGE_BOOST_PROGRAM_OPTIONS=y
> BR2_PACKAGE_BOOST_RANDOM=y
> BR2_PACKAGE_BOOST_REGEX=y
> BR2_PACKAGE_BOOST_SERIALIZATION=y
> BR2_PACKAGE_BOOST_SIGNALS=y
> BR2_PACKAGE_BOOST_SYSTEM=y
> BR2_PACKAGE_BOOST_TEST=y
> BR2_PACKAGE_BOOST_TIMER=y
> BR2_PACKAGE_BOOST_WAVE=y
> # BR2_TARGET_ROOTFS_TAR is not set
> 
> Fails with:
> 
> ...failed gcc.compile.asm bin.v2/libs/context/build/gcc-4.9.3/release/threading-multi/asm/jump_sparc_sysv_elf_gas.o...
> gcc.compile.c++ bin.v2/libs/context/build/gcc-4.9.3/release/threading-multi/unsupported.o
> libs/context/src/unsupported.cpp:7:2: error: #error "platform not supported"
>  #error "platform not supported"
> 
> Best regards,
> 
> Thomas
>
Thomas Petazzoni Nov. 16, 2015, 8:52 p.m. UTC | #3
Arnout,

On Mon, 16 Nov 2015 21:43:32 +0100, Arnout Vandecappelle wrote:

> boost::context still does not compile. Don't know why it is
> disabled for sparc/sparc64 as it contains the needed code.
> Need to check on my sparc systems before enabling via a patch.

Indeed.

>  But for the release we probably want to disable it in Config.in.

Done:
http://git.buildroot.net/buildroot/commit/?id=648956a137949e0388536688fff3ae4f7bb298a8.
sparc64 was already not allowed.

Thanks,

Thomas
Waldemar Brodkorb Nov. 16, 2015, 9:07 p.m. UTC | #4
Hi Thomas,
Thomas Petazzoni wrote,

> Dear Waldemar Brodkorb,
> 
> On Sun, 15 Nov 2015 13:24:55 +0100, Waldemar Brodkorb wrote:
> > Like for sparc64, set correct instruction set.
> > Patch is obsoleted by this changeset.
> > 
> > Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
> > ---
> 
> Is this fixing an actual issue / build failure, or just making the
> Sparc fix nicer ?

It makes the sparc fix nicer, no patch required to disable c3 and
it will use sparcv8 instead sparcv7, which matches more your
targeting sparc systems.
 
> Also, Boost on Sparc still doesn't build properly for me in certain
> configurations. For example:
> 
> BR2_PACKAGE_BOOST_CONTEXT=y
> BR2_PACKAGE_BOOST_COROUTINE=y
> 
> Fails with:
> 
> ...failed gcc.compile.asm bin.v2/libs/context/build/gcc-4.9.3/release/threading-multi/asm/jump_sparc_sysv_elf_gas.o...
> gcc.compile.c++ bin.v2/libs/context/build/gcc-4.9.3/release/threading-multi/unsupported.o
> libs/context/src/unsupported.cpp:7:2: error: #error "platform not supported"
>  #error "platform not supported"

As mentioned in my comment, context/coroutine are not yet supported.
Will need to do some testing and then I will try to get the fixes to
enable it upstream.

best regards
 Waldemar
Thomas Petazzoni Nov. 16, 2015, 9:09 p.m. UTC | #5
Hello,

On Mon, 16 Nov 2015 22:07:22 +0100, Waldemar Brodkorb wrote:

> > Is this fixing an actual issue / build failure, or just making the
> > Sparc fix nicer ?
> 
> It makes the sparc fix nicer, no patch required to disable c3 and
> it will use sparcv8 instead sparcv7, which matches more your
> targeting sparc systems.

Ok, so it's more material for next than for master.

> As mentioned in my comment, context/coroutine are not yet supported.
> Will need to do some testing and then I will try to get the fixes to
> enable it upstream.

Ok, no problem. Note that from the Buildroot point of view, enabling
Boost context is not really important. Nothing requires it, so having
it supported only on certain architectures is not a problem. So only do
the sparc support if you have some other interest in it.

Thanks,

Thomas
Thomas Petazzoni Nov. 17, 2015, 9:18 p.m. UTC | #6
Dear Waldemar Brodkorb,

On Sun, 15 Nov 2015 13:24:55 +0100, Waldemar Brodkorb wrote:
> Like for sparc64, set correct instruction set.
> Patch is obsoleted by this changeset.
> 
> Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
> ---

Applied to next after rewording the commit log, thanks!

Thomas
diff mbox

Patch

diff --git a/package/boost/0003-Remove-bogus-c3-cpu-varant-for-SPARC.patch b/package/boost/0003-Remove-bogus-c3-cpu-varant-for-SPARC.patch
deleted file mode 100644
index a4d39b3..0000000
--- a/package/boost/0003-Remove-bogus-c3-cpu-varant-for-SPARC.patch
+++ /dev/null
@@ -1,42 +0,0 @@ 
-From ec60c37295146bb80aa44a92cf416027b75b5ff7 Mon Sep 17 00:00:00 2001
-From: Vladimir Prus <vladimir@codesourcery.com>
-Date: Mon, 27 Apr 2015 19:12:54 +0300
-Subject: [PATCH] Remove bogus 'c3' cpu varant for SPARC.
-
-Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
----
- src/tools/gcc.jam | 3 +--
- src/tools/gcc.py  | 3 +--
- 2 files changed, 2 insertions(+), 4 deletions(-)
-
-diff --git a/src/tools/gcc.jam b/src/tools/gcc.jam
-index eff95ae..128ab84 100644
---- a/tools/build/src/tools/gcc.jam
-+++ b/tools/build/src/tools/gcc.jam
-@@ -1138,8 +1138,7 @@ cpu-flags gcc OPTIONS : x86 : c3-2 : -march=c3-2 ;
- ##
- cpu-flags gcc OPTIONS : x86 : atom : -march=atom ;
- # Sparc
--cpu-flags gcc OPTIONS : sparc : c3 : -mcpu=c3 : default ;
--cpu-flags gcc OPTIONS : sparc : v7 : -mcpu=v7 ;
-+cpu-flags gcc OPTIONS : sparc : v7 : -mcpu=v7 : default ;
- cpu-flags gcc OPTIONS : sparc : cypress : -mcpu=cypress ;
- cpu-flags gcc OPTIONS : sparc : v8 : -mcpu=v8 ;
- cpu-flags gcc OPTIONS : sparc : supersparc : -mcpu=supersparc ;
-diff --git a/src/tools/gcc.py b/src/tools/gcc.py
-index a13ce7a..d2d3294 100644
---- a/tools/build/src/tools/gcc.py
-+++ b/tools/build/src/tools/gcc.py
-@@ -789,8 +789,7 @@ cpu_flags('gcc', 'OPTIONS', 'x86', 'atom', ['-march=atom'])
- # Sparc
- flags('gcc', 'OPTIONS', ['<architecture>sparc/<address-model>32'], ['-m32'])
- flags('gcc', 'OPTIONS', ['<architecture>sparc/<address-model>64'], ['-m64'])
--cpu_flags('gcc', 'OPTIONS', 'sparc', 'c3', ['-mcpu=c3'], default=True)
--cpu_flags('gcc', 'OPTIONS', 'sparc', 'v7', ['-mcpu=v7'])
-+cpu_flags('gcc', 'OPTIONS', 'sparc', 'v7', ['-mcpu=v7'], default=True)
- cpu_flags('gcc', 'OPTIONS', 'sparc', 'cypress', ['-mcpu=cypress'])
- cpu_flags('gcc', 'OPTIONS', 'sparc', 'v8', ['-mcpu=v8'])
- cpu_flags('gcc', 'OPTIONS', 'sparc', 'supersparc', ['-mcpu=supersparc'])
--- 
-2.3.6
-
diff --git a/package/boost/boost.mk b/package/boost/boost.mk
index d91baf1..74bb710 100644
--- a/package/boost/boost.mk
+++ b/package/boost/boost.mk
@@ -89,6 +89,10 @@  BOOST_OPTS += toolset=gcc \
 	     abi=$(BOOST_ABI) \
 	     variant=$(if $(BR2_ENABLE_DEBUG),debug,release)
 
+ifeq ($(BR2_sparc),y)
+BOOST_OPTS += architecture=sparc instruction-set=v8
+endif
+
 ifeq ($(BR2_sparc64),y)
 BOOST_OPTS += architecture=sparc instruction-set=ultrasparc
 endif