All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] package/erlang-jiffy: fix build failure due to lack of -fPIC
@ 2021-10-14 21:54 Giulio Benetti
  2021-10-14 21:54 ` [Buildroot] [PATCH 2/2] package/erlang-jiffy: bump version to 1.0.9 Giulio Benetti
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Giulio Benetti @ 2021-10-14 21:54 UTC (permalink / raw)
  To: buildroot; +Cc: Giulio Benetti, Will Newton, Johan Oudinet

Package erlang-jiffy needs to be linked with -fPIC otherwise it throws
linker error:
```
failed with return code 1 and the following output:
/home/giuliobenetti/br_reproduce/60296a48210e7ffc6bc9fa50ee586441a8957e85/output/host/opt/ext-toolchain/bin/../lib/gcc/x86_64-buildroot-linux-musl/9.3.0/../../../../x86_64-buildroot-linux-musl/bin/ld: /tmp/jiffy.so.FCaOXC.ltrans1.ltrans.o: relocation R_X86_64_PC32 against symbol `dec_destroy' can not be used when making a shared object;
recompile with -fPIC
```

This is architecture indipendent, so let's add -fPIC flag to LDFLAGS in any
case.

Fixes:
http://autobuild.buildroot.net/results/602/60296a48210e7ffc6bc9fa50ee586441a8957e85/

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
---
 package/erlang-jiffy/erlang-jiffy.mk | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/package/erlang-jiffy/erlang-jiffy.mk b/package/erlang-jiffy/erlang-jiffy.mk
index e50a5f598f..dce6a0f8b3 100644
--- a/package/erlang-jiffy/erlang-jiffy.mk
+++ b/package/erlang-jiffy/erlang-jiffy.mk
@@ -11,4 +11,7 @@ ERLANG_JIFFY_LICENSE = MIT (core), \
 	BSD-3-Clause (tests)
 ERLANG_JIFFY_LICENSE_FILES = LICENSE
 
+# erlang-jiffy needs -fPIC to link succesfully
+ERLANG_JIFFY_REBAR_ENV += LDFLAGS="-fPIC"
+
 $(eval $(rebar-package))
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2021-12-28 22:06 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-14 21:54 [Buildroot] [PATCH 1/2] package/erlang-jiffy: fix build failure due to lack of -fPIC Giulio Benetti
2021-10-14 21:54 ` [Buildroot] [PATCH 2/2] package/erlang-jiffy: bump version to 1.0.9 Giulio Benetti
2021-12-20  9:34   ` Giulio Benetti
2021-12-28 22:06   ` Thomas Petazzoni
2021-10-14 21:54 ` [Buildroot] [PATCH 2/2] package/erlang-jiffy: fix build failure due to lack of -fPIC Giulio Benetti
2021-10-14 21:57   ` Giulio Benetti
2021-10-18 20:14 ` [Buildroot] [PATCH 1/2] " Thomas Petazzoni
2021-12-17 20:49   ` Thomas Petazzoni
2021-12-17 21:14     ` Giulio Benetti
2021-12-19  7:03     ` [Buildroot] [PATCH] package/erlang-rebar: fix linking failure on shared library Giulio Benetti
2021-12-19  8:08       ` Yann E. MORIN
2021-12-27  0:08         ` Giulio Benetti
2021-12-28 21:49       ` Yann E. MORIN

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.