Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] jimtcl: fix compile problem for sparc64
@ 2015-11-21  9:23 Waldemar Brodkorb
  2015-11-22 13:12 ` Thomas Petazzoni
  0 siblings, 1 reply; 2+ messages in thread
From: Waldemar Brodkorb @ 2015-11-21  9:23 UTC (permalink / raw)
  To: buildroot

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@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
 endef
 endif
 
@@ -47,6 +47,8 @@ define JIMTCL_CONFIGURE_CMDS
 endef
 
 define JIMTCL_BUILD_CMDS
+	SH_CFLAGS="-fPIC" \
+	SHOBJ_CFLAGS="-fPIC" \
 	$(MAKE) -C $(@D)
 endef
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [Buildroot] [PATCH] jimtcl: fix compile problem for sparc64
  2015-11-21  9:23 [Buildroot] [PATCH] jimtcl: fix compile problem for sparc64 Waldemar Brodkorb
@ 2015-11-22 13:12 ` Thomas Petazzoni
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2015-11-22 13:12 UTC (permalink / raw)
  To: buildroot

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@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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-11-22 13:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-21  9:23 [Buildroot] [PATCH] jimtcl: fix compile problem for sparc64 Waldemar Brodkorb
2015-11-22 13:12 ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox