[Buildroot] [PATCH 1/1] package/erlang-jiffy: needs -fPIC

Thomas Petazzoni thomas.petazzoni at bootlin.com
Mon Dec 28 21:53:25 UTC 2020


Hello Fabrice,

On Thu, 24 Dec 2020 11:14:40 +0100
Fabrice Fontaine <fontaine.fabrice at gmail.com> wrote:

> Fixes:
>  - http://autobuild.buildroot.org/results/9ac6e1bf9eaf922c0b7f869416ec33f40ed3543c
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice at gmail.com>

Thanks for the patch. As usual, I'm kind of interested to understand
since when this is happening, why suddenly we need a fix like this. Is
this following a version bump of this package ?

> +     {"(linux|solaris|freebsd|netbsd|openbsd|dragonfly|darwin|gnu)",
> +-        "LDFLAGS", "$LDFLAGS $FLTO_FLAG -lstdc++"},
> ++        "LDFLAGS", "$LDFLAGS $FLTO_FLAG -lstdc++ -fPIC"},

It is surprising that only LDFLAGS need to be changed. Indeed, -fPIC is
also needed at *compile* time when compiling each individual object
file, so typically in CFLAGS/CXXFLAGS. Why isn't it needed in CXXFLAGS
here ? Because it's already passed at compile time, but forgotten at
link time ? Or because LDFLAGS are also used by rebar at compile time ?

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com



More information about the buildroot mailing list