[Buildroot] [PATCH] jimtcl: fix compile problem for sparc64
Thomas Petazzoni
thomas.petazzoni at free-electrons.com
Sun Nov 22 13:12:37 UTC 2015
Waldemar,
On Sat, 21 Nov 2015 10:23:31 +0100, Waldemar Brodkorb wrote:
> It is general safe to use -fPIC for all architectures.
> -fpic breaks sparc64 compile.
>
> Runtime tested on Qemu ARM, MIPS and SPARC64.
>
> Fixes:
> http://autobuild.buildroot.net/results/98f391ad13f22828c022f185c0166daabdb4c1ad/
>
> It also addresses a problem with the wrong symlink for the shared library
> recognized while runtime testing.
>
> Signed-off-by: Waldemar Brodkorb <wbx at uclibc-ng.org>
> ---
> package/jimtcl/jimtcl.mk | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/package/jimtcl/jimtcl.mk b/package/jimtcl/jimtcl.mk
> index e79e0f6..79fa742 100644
> --- a/package/jimtcl/jimtcl.mk
> +++ b/package/jimtcl/jimtcl.mk
> @@ -33,8 +33,8 @@ else
> JIMTCL_SHARED = --shared
> define JIMTCL_INSTALL_LIB
> $(INSTALL) -m 0755 -D $(@D)/libjim.so.$(JIMTCL_VERSION) \
> - $(1)/usr/lib/libjim.$(JIMTCL_VERSION)
> - ln -s libjim.$(JIMTCL_VERSION) $(1)/usr/lib/libjim.so
> + $(1)/usr/lib/libjim.so.$(JIMTCL_VERSION)
> + ln -sf libjim.so.$(JIMTCL_VERSION) $(1)/usr/lib/libjim.so
This is unrelated to sparc64 fix, so it should be a separate patch
(though it is obviously a good fix).
> @@ -47,6 +47,8 @@ define JIMTCL_CONFIGURE_CMDS
> endef
>
> define JIMTCL_BUILD_CMDS
> + SH_CFLAGS="-fPIC" \
> + SHOBJ_CFLAGS="-fPIC" \
In other packages (such as elfutils), you made passing -fPIC
conditional on sparc64. Why don't we do the same here? I believe on
many platforms -fpic and -fPIC are the same, but I think we should be
consistent in the way we handle this before the different packages.
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
More information about the buildroot
mailing list