All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] package/luajit: build host variant dynamically
@ 2016-03-04 23:00 Romain Naour
  2016-03-04 23:00 ` [Buildroot] [PATCH 2/2] package/efl: enable luajit support Romain Naour
  2016-03-20 21:35 ` [Buildroot] [PATCH 1/2] package/luajit: build host variant dynamically Thomas Petazzoni
  0 siblings, 2 replies; 5+ messages in thread
From: Romain Naour @ 2016-03-04 23:00 UTC (permalink / raw)
  To: buildroot

While building libevas.so for the host-efl with luajit support, the link fail
when libluajit is build statically:

/usr/bin/ld: output/host/usr/lib/libluajit-5.1.a(ljamalg.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
output/host/usr/lib/libluajit-5.1.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status

Build luajit dynamically in order to build host-efl with luajit support.

Also we need to provide a rpath to HOST_DIR otherwise we hit the rpath sanity
check:

***
*** ERROR: package host-luajit installs executables without proper RPATH:
***   output/host/usr/bin/luajit

Signed-off-by: Romain Naour <romain.naour@gmail.com>
---
 package/luajit/luajit.mk | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/package/luajit/luajit.mk b/package/luajit/luajit.mk
index d45598e..791ef37 100644
--- a/package/luajit/luajit.mk
+++ b/package/luajit/luajit.mk
@@ -64,8 +64,11 @@ define LUAJIT_INSTALL_SYMLINK
 endef
 LUAJIT_POST_INSTALL_TARGET_HOOKS += LUAJIT_INSTALL_SYMLINK
 
+# host-efl package needs host-luajit to be linked dynamically.
 define HOST_LUAJIT_BUILD_CMDS
-	$(MAKE) PREFIX="/usr" BUILDMODE=static -C $(@D) amalg
+	$(MAKE) PREFIX="/usr" BUILDMODE=dynamic \
+		TARGET_LDFLAGS="$(HOST_LDFLAGS) -Wl,-rpath,$(HOST_DIR)/usr/lib/" \
+		-C $(@D) amalg
 endef
 
 define HOST_LUAJIT_INSTALL_CMDS
-- 
2.5.0

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

end of thread, other threads:[~2016-03-26 21:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-04 23:00 [Buildroot] [PATCH 1/2] package/luajit: build host variant dynamically Romain Naour
2016-03-04 23:00 ` [Buildroot] [PATCH 2/2] package/efl: enable luajit support Romain Naour
2016-03-20 21:42   ` Thomas Petazzoni
2016-03-26 21:28     ` Romain Naour
2016-03-20 21:35 ` [Buildroot] [PATCH 1/2] package/luajit: build host variant dynamically Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.