All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] jimtcl: fix sparc64 compile
Date: Mon, 23 Nov 2015 18:29:55 +0100	[thread overview]
Message-ID: <20151123182955.0bd4db5d@free-electrons.com> (raw)
In-Reply-To: <20151123164853.GA29207@waldemar-brodkorb.de>

Waldemar,

On Mon, 23 Nov 2015 17:48:53 +0100, Waldemar Brodkorb wrote:
> It is general safe to use -fPIC for all architectures.
> -fpic breaks sparc64 compile.
> 
> Generally gcc just optimize position independent code
> for m68k, powerpc and sparc with -fpic.
> The size differences are minimal, f.e. for powerpc:
>    text    data     bss     dec     hex filename
>  235983    5336     684  242003   3b153 output/target/usr/lib/libjim.0.75
>  236255    8456     684  245395   3be93 output/target/usr/lib/libjim.so.0.75
> 
> So instead of keeping special settings for sparc64 it would be better
> to always use -fPIC in general.

So in other words, you're saying that in other packages that add -fPIC
only for sparc/sparc64, we should add it unconditionally?

> +# -fPIC works for any architecture

I think this comment is a bit useless. It should rather be:

# -fPIC is mandatory to build shared libraries on certain architectures
# (e.g. SPARC) and causes no harm or drawbacks on other architectures

>  define JIMTCL_BUILD_CMDS
> +	SH_CFLAGS="-fPIC" \
> +	SHOBJ_CFLAGS="-fPIC" \
>  	$(MAKE) -C $(@D)
>  endef
>  

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

  reply	other threads:[~2015-11-23 17:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-23 16:48 [Buildroot] [PATCH] jimtcl: fix sparc64 compile Waldemar Brodkorb
2015-11-23 17:29 ` Thomas Petazzoni [this message]
2015-11-23 17:40   ` Waldemar Brodkorb
2015-11-26 21:34 ` Peter Korsgaard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151123182955.0bd4db5d@free-electrons.com \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.