readline: fix stripping on target
authorCarlos Santos <casantos@datacom.ind.br>
Thu, 7 Jan 2016 16:56:22 +0000 (14:56 -0200)
committerPeter Korsgaard <peter@korsgaard.com>
Fri, 8 Jan 2016 18:17:10 +0000 (19:17 +0100)
Libraries got installed read only, so strip failed.

[Peter: simplify chmod logic]
Signed-off-by: Carlos Santos <casantos@datacom.ind.br>
Acked-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/readline/readline.mk

index 3d3169627df86a3303fd18d759adef74e1f2e488..763197085e15be5f3a950178db4b6d42b2684b3e 100644 (file)
@@ -24,5 +24,13 @@ define READLINE_INSTALL_INPUTRC
 endef
 READLINE_POST_INSTALL_TARGET_HOOKS += READLINE_INSTALL_INPUTRC
 
+ifneq ($(BR2_STATIC_LIBS),y)
+# libraries get installed read only, so strip fails
+define READLINE_INSTALL_FIXUPS_SHARED
+       chmod +w $(addprefix $(TARGET_DIR)/usr/lib/,libhistory.so.* libreadline.so.*)
+endef
+READLINE_POST_INSTALL_TARGET_HOOKS += READLINE_INSTALL_FIXUPS_SHARED
+endif
+
 $(eval $(autotools-package))
 $(eval $(host-autotools-package))