All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] elfutils: fix sparc64 build, -fPIC required
@ 2015-11-03 17:18 Waldemar Brodkorb
  2015-11-03 17:57 ` Thomas Petazzoni
  0 siblings, 1 reply; 4+ messages in thread
From: Waldemar Brodkorb @ 2015-11-03 17:18 UTC (permalink / raw)
  To: buildroot

Fixes following autobuild errors:
http://autobuild.buildroot.net/results/82cc7766d2c805146e94baf82a24d1002f56593d/
http://autobuild.buildroot.net/results/ca4ca362581ee0111cba389d1afbff287692c21b/

Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
---
 package/elfutils/elfutils.mk |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/package/elfutils/elfutils.mk b/package/elfutils/elfutils.mk
index 838c3b8..261849a 100644
--- a/package/elfutils/elfutils.mk
+++ b/package/elfutils/elfutils.mk
@@ -21,6 +21,11 @@ ELFUTILS_CONF_ENV += \
 	CFLAGS="$(filter-out -D_FILE_OFFSET_BITS=64,$(TARGET_CFLAGS))" \
 	CPPFLAGS="$(filter-out -D_FILE_OFFSET_BITS=64,$(TARGET_CPPFLAGS))"
 
+# sparc64 needs -fPIC instead of -fpic
+ifeq ($(BR2_sparc64),y)
+ELFUTILS_CONF_ENV += CFLAGS="$(filter-out -D_FILE_OFFSET_BITS=64,$(TARGET_CFLAGS)) -fPIC"
+endif
+
 ELFUTILS_LDFLAGS = $(TARGET_LDFLAGS)
 
 # Unconditionnally requires gettext.
-- 
1.7.10.4

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

* [Buildroot] [PATCH] elfutils: fix sparc64 build, -fPIC required
  2015-11-03 17:18 [Buildroot] [PATCH] elfutils: fix sparc64 build, -fPIC required Waldemar Brodkorb
@ 2015-11-03 17:57 ` Thomas Petazzoni
  2015-11-03 18:18   ` Waldemar Brodkorb
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Petazzoni @ 2015-11-03 17:57 UTC (permalink / raw)
  To: buildroot

Dear Waldemar Brodkorb,

On Tue, 3 Nov 2015 18:18:32 +0100, Waldemar Brodkorb wrote:
> Fixes following autobuild errors:
> http://autobuild.buildroot.net/results/82cc7766d2c805146e94baf82a24d1002f56593d/
> http://autobuild.buildroot.net/results/ca4ca362581ee0111cba389d1afbff287692c21b/
> 
> Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
> ---
>  package/elfutils/elfutils.mk |    5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/package/elfutils/elfutils.mk b/package/elfutils/elfutils.mk
> index 838c3b8..261849a 100644
> --- a/package/elfutils/elfutils.mk
> +++ b/package/elfutils/elfutils.mk
> @@ -21,6 +21,11 @@ ELFUTILS_CONF_ENV += \
>  	CFLAGS="$(filter-out -D_FILE_OFFSET_BITS=64,$(TARGET_CFLAGS))" \
>  	CPPFLAGS="$(filter-out -D_FILE_OFFSET_BITS=64,$(TARGET_CPPFLAGS))"
>  
> +# sparc64 needs -fPIC instead of -fpic
> +ifeq ($(BR2_sparc64),y)
> +ELFUTILS_CONF_ENV += CFLAGS="$(filter-out -D_FILE_OFFSET_BITS=64,$(TARGET_CFLAGS)) -fPIC"

I don't like the duplication of the _FILE_OFFSET_BITS dance. Can you
introduce an ELFUTILS_CFLAGS instead ?

Also, for libpcap, -fPIC is needed instead of -fpic for both microblaze
and sparc64. But for elfutils, -fPIC is only needed for sparc64 ? I
just tested a quick build of elfutils on microblaze, and it indeed
works without any change.

Do you have any clue why?

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [Buildroot] [PATCH] elfutils: fix sparc64 build, -fPIC required
  2015-11-03 17:57 ` Thomas Petazzoni
@ 2015-11-03 18:18   ` Waldemar Brodkorb
  2015-11-03 19:50     ` Thomas Petazzoni
  0 siblings, 1 reply; 4+ messages in thread
From: Waldemar Brodkorb @ 2015-11-03 18:18 UTC (permalink / raw)
  To: buildroot

Hi Thomas,
Thomas Petazzoni wrote,

> Dear Waldemar Brodkorb,
> 
> On Tue, 3 Nov 2015 18:18:32 +0100, Waldemar Brodkorb wrote:
> > Fixes following autobuild errors:
> > http://autobuild.buildroot.net/results/82cc7766d2c805146e94baf82a24d1002f56593d/
> > http://autobuild.buildroot.net/results/ca4ca362581ee0111cba389d1afbff287692c21b/
> > 
> > Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
> > ---
> >  package/elfutils/elfutils.mk |    5 +++++
> >  1 file changed, 5 insertions(+)
> > 
> > diff --git a/package/elfutils/elfutils.mk b/package/elfutils/elfutils.mk
> > index 838c3b8..261849a 100644
> > --- a/package/elfutils/elfutils.mk
> > +++ b/package/elfutils/elfutils.mk
> > @@ -21,6 +21,11 @@ ELFUTILS_CONF_ENV += \
> >  	CFLAGS="$(filter-out -D_FILE_OFFSET_BITS=64,$(TARGET_CFLAGS))" \
> >  	CPPFLAGS="$(filter-out -D_FILE_OFFSET_BITS=64,$(TARGET_CPPFLAGS))"
> >  
> > +# sparc64 needs -fPIC instead of -fpic
> > +ifeq ($(BR2_sparc64),y)
> > +ELFUTILS_CONF_ENV += CFLAGS="$(filter-out -D_FILE_OFFSET_BITS=64,$(TARGET_CFLAGS)) -fPIC"
> 
> I don't like the duplication of the _FILE_OFFSET_BITS dance. Can you
> introduce an ELFUTILS_CFLAGS instead ?

Okay, I did know you wouldn't like it ;)
 
> Also, for libpcap, -fPIC is needed instead of -fpic for both microblaze
> and sparc64. But for elfutils, -fPIC is only needed for sparc64 ? I
> just tested a quick build of elfutils on microblaze, and it indeed
> works without any change.
> 
> Do you have any clue why?

No idea, sorry.

best regards
 Waldemar

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

* [Buildroot] [PATCH] elfutils: fix sparc64 build, -fPIC required
  2015-11-03 18:18   ` Waldemar Brodkorb
@ 2015-11-03 19:50     ` Thomas Petazzoni
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2015-11-03 19:50 UTC (permalink / raw)
  To: buildroot

Waldemar,

On Tue, 3 Nov 2015 19:18:10 +0100, Waldemar Brodkorb wrote:

> > I don't like the duplication of the _FILE_OFFSET_BITS dance. Can you
> > introduce an ELFUTILS_CFLAGS instead ?
> 
> Okay, I did know you wouldn't like it ;)

So why didn't you fix in the first iteration ? :-)

> > Also, for libpcap, -fPIC is needed instead of -fpic for both microblaze
> > and sparc64. But for elfutils, -fPIC is only needed for sparc64 ? I
> > just tested a quick build of elfutils on microblaze, and it indeed
> > works without any change.
> > 
> > Do you have any clue why?
> 
> No idea, sorry.

In fact, libpcap builds just fine with -fPIC on Microblaze with the
Buildroot toolchain. Maybe it was an issue with a specific toolchain a
while ago.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

end of thread, other threads:[~2015-11-03 19:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-03 17:18 [Buildroot] [PATCH] elfutils: fix sparc64 build, -fPIC required Waldemar Brodkorb
2015-11-03 17:57 ` Thomas Petazzoni
2015-11-03 18:18   ` Waldemar Brodkorb
2015-11-03 19:50     ` 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.