[Buildroot] [PATCH] jimtcl: fix sparc64 compile
Waldemar Brodkorb
wbx at openadk.org
Mon Nov 23 16:48:53 UTC 2015
It is general safe to use -fPIC for all architectures.
-fpic breaks sparc64 compile.
Generally gcc just optimize position independent code
for m68k, powerpc and sparc with -fpic.
The size differences are minimal, f.e. for powerpc:
text data bss dec hex filename
235983 5336 684 242003 3b153 output/target/usr/lib/libjim.0.75
236255 8456 684 245395 3be93 output/target/usr/lib/libjim.so.0.75
So instead of keeping special settings for sparc64 it would be better
to always use -fPIC in general.
Runtime tested on Qemu ARM, MIPS, PPC and SPARC64.
Fixes:
http://autobuild.buildroot.net/results/98f391ad13f22828c022f185c0166daabdb4c1ad/
Signed-off-by: Waldemar Brodkorb <wbx at openadk.org>
---
package/jimtcl/jimtcl.mk | 3 +++
1 file changed, 3 insertions(+)
diff --git a/package/jimtcl/jimtcl.mk b/package/jimtcl/jimtcl.mk
index 4afb217..50078e7 100644
--- a/package/jimtcl/jimtcl.mk
+++ b/package/jimtcl/jimtcl.mk
@@ -46,7 +46,10 @@ define JIMTCL_CONFIGURE_CMDS
)
endef
+# -fPIC works for any architecture
define JIMTCL_BUILD_CMDS
+ SH_CFLAGS="-fPIC" \
+ SHOBJ_CFLAGS="-fPIC" \
$(MAKE) -C $(@D)
endef
--
1.7.10.4
More information about the buildroot
mailing list