gcc-final: install libatomic
authorGustavo Zacarias <gustavo@zacarias.com.ar>
Sun, 19 Apr 2015 09:48:16 +0000 (06:48 -0300)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 19 Apr 2015 12:39:59 +0000 (14:39 +0200)
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>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/gcc/gcc-final/gcc-final.mk

index d76eb313827b5b7126036dfd0cee0d1a9b7148a1..8fda883e46db99ee1c9eb3955ce53b10dca68a08 100644 (file)
@@ -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 =