All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] boost: fix sparc compile
@ 2015-11-15 12:24 Waldemar Brodkorb
  2015-11-16 20:40 ` Thomas Petazzoni
  2015-11-17 21:18 ` Thomas Petazzoni
  0 siblings, 2 replies; 7+ messages in thread
From: Waldemar Brodkorb @ 2015-11-15 12:24 UTC (permalink / raw)
  To: buildroot

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

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
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [Buildroot] [PATCH] boost: fix sparc compile
  2015-11-15 12:24 [Buildroot] [PATCH] boost: fix sparc compile Waldemar Brodkorb
@ 2015-11-16 20:40 ` Thomas Petazzoni
  2015-11-16 20:43   ` Arnout Vandecappelle
  2015-11-16 21:07   ` Waldemar Brodkorb
  2015-11-17 21:18 ` Thomas Petazzoni
  1 sibling, 2 replies; 7+ messages in thread
From: Thomas Petazzoni @ 2015-11-16 20:40 UTC (permalink / raw)
  To: buildroot

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
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] [PATCH] boost: fix sparc compile
  2015-11-16 20:40 ` Thomas Petazzoni
@ 2015-11-16 20:43   ` Arnout Vandecappelle
  2015-11-16 20:52     ` Thomas Petazzoni
  2015-11-16 21:07   ` Waldemar Brodkorb
  1 sibling, 1 reply; 7+ messages in thread
From: Arnout Vandecappelle @ 2015-11-16 20:43 UTC (permalink / raw)
  To: buildroot

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
> 


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] [PATCH] boost: fix sparc compile
  2015-11-16 20:43   ` Arnout Vandecappelle
@ 2015-11-16 20:52     ` Thomas Petazzoni
  0 siblings, 0 replies; 7+ messages in thread
From: Thomas Petazzoni @ 2015-11-16 20:52 UTC (permalink / raw)
  To: buildroot

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
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] [PATCH] boost: fix sparc compile
  2015-11-16 20:40 ` Thomas Petazzoni
  2015-11-16 20:43   ` Arnout Vandecappelle
@ 2015-11-16 21:07   ` Waldemar Brodkorb
  2015-11-16 21:09     ` Thomas Petazzoni
  1 sibling, 1 reply; 7+ messages in thread
From: Waldemar Brodkorb @ 2015-11-16 21:07 UTC (permalink / raw)
  To: buildroot

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] [PATCH] boost: fix sparc compile
  2015-11-16 21:07   ` Waldemar Brodkorb
@ 2015-11-16 21:09     ` Thomas Petazzoni
  0 siblings, 0 replies; 7+ messages in thread
From: Thomas Petazzoni @ 2015-11-16 21:09 UTC (permalink / raw)
  To: buildroot

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, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] [PATCH] boost: fix sparc compile
  2015-11-15 12:24 [Buildroot] [PATCH] boost: fix sparc compile Waldemar Brodkorb
  2015-11-16 20:40 ` Thomas Petazzoni
@ 2015-11-17 21:18 ` Thomas Petazzoni
  1 sibling, 0 replies; 7+ messages in thread
From: Thomas Petazzoni @ 2015-11-17 21:18 UTC (permalink / raw)
  To: buildroot

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
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-11-17 21:18 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-15 12:24 [Buildroot] [PATCH] boost: fix sparc compile Waldemar Brodkorb
2015-11-16 20:40 ` Thomas Petazzoni
2015-11-16 20:43   ` Arnout Vandecappelle
2015-11-16 20:52     ` Thomas Petazzoni
2015-11-16 21:07   ` Waldemar Brodkorb
2015-11-16 21:09     ` Thomas Petazzoni
2015-11-17 21:18 ` Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.