diff mbox

[v2,1/5] gcc-final: install libatomic

Message ID 1428511969-28430-2-git-send-email-gustavo@zacarias.com.ar
State Superseded
Headers show

Commit Message

Gustavo Zacarias April 8, 2015, 4:52 p.m. UTC
It's required in some 32-bit architectures for the extended (64-bit)
atomic operations, like __sync_add_and_fetch_8.
These arches are at least: i386, mips & mipsel.

Target size growth is ~15 KiB for ARM.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
 package/gcc/gcc-final/gcc-final.mk | 9 +++++++++
 1 file changed, 9 insertions(+)

Comments

Thomas Petazzoni April 8, 2015, 5:14 p.m. UTC | #1
Dear Gustavo Zacarias,

On Wed,  8 Apr 2015 13:52:45 -0300, Gustavo Zacarias wrote:
> It's required in some 32-bit architectures for the extended (64-bit)
> atomic operations, like __sync_add_and_fetch_8.
> These arches are at least: i386, mips & mipsel.
> 
> Target size growth is ~15 KiB for ARM.
> 
> Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>

What is your proposal to handle libatomic for the external toolchain
case?

Thomas
Gustavo Zacarias April 8, 2015, 5:26 p.m. UTC | #2
On 04/08/2015 02:14 PM, Thomas Petazzoni wrote:

> What is your proposal to handle libatomic for the external toolchain
> case?

Actually it's already copied into staging, so i did't see any breakage
at build time, but yes, runtime is a different story.
Adding libatomic.so.* to LIB_EXTERNAL_LIBS in
toolchain/toolchain-external/toolchain-external.mk is enough.
I'll send a patch if this is the proper course of action, otherwise
exclude webkit/midori for some external toolchains.
Regards.
Thomas Petazzoni April 8, 2015, 5:29 p.m. UTC | #3
Dear Gustavo Zacarias,

On Wed, 08 Apr 2015 14:26:00 -0300, Gustavo Zacarias wrote:

> Actually it's already copied into staging, so i did't see any breakage
> at build time, but yes, runtime is a different story.
> Adding libatomic.so.* to LIB_EXTERNAL_LIBS in
> toolchain/toolchain-external/toolchain-external.mk is enough.
> I'll send a patch if this is the proper course of action, otherwise
> exclude webkit/midori for some external toolchains.

Is libatomic going to be provided by all toolchains on all
architectures?

Thomas
Gustavo Zacarias April 8, 2015, 5:30 p.m. UTC | #4
On 04/08/2015 02:29 PM, Thomas Petazzoni wrote:

> Is libatomic going to be provided by all toolchains on all
> architectures?

It doesn't matter, if the file isn't available it won't error out
(tested on blackfin external toolchain).
Regards.
diff mbox

Patch

diff --git a/package/gcc/gcc-final/gcc-final.mk b/package/gcc/gcc-final/gcc-final.mk
index d76eb31..8fda883 100644
--- a/package/gcc/gcc-final/gcc-final.mk
+++ b/package/gcc/gcc-final/gcc-final.mk
@@ -118,6 +118,15 @@  endef
 
 HOST_GCC_FINAL_POST_INSTALL_HOOKS += HOST_GCC_FINAL_INSTALL_LIBGCC
 
+define HOST_GCC_FINAL_INSTALL_LIBATOMIC
+	-cp -dpf $(HOST_DIR)/usr/$(GNU_TARGET_NAME)/lib*/libatomic* \
+		$(STAGING_DIR)/lib/
+	-cp -dpf $(HOST_DIR)/usr/$(GNU_TARGET_NAME)/lib*/libatomic* \
+		$(TARGET_DIR)/lib/
+endef
+
+HOST_GCC_FINAL_POST_INSTALL_HOOKS += HOST_GCC_FINAL_INSTALL_LIBATOMIC
+
 # Handle the installation of libraries in /usr/lib
 HOST_GCC_FINAL_USR_LIBS =