Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Markos Chandras <markos.chandras@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] bzip2: Rearrange build order
Date: Wed, 5 Jun 2013 13:56:16 +0100	[thread overview]
Message-ID: <1370436976-746-1-git-send-email-markos.chandras@gmail.com> (raw)

From: Markos Chandras <markos.chandras@imgtec.com>

Several object files are shared between the libbz2.so shared library
and the libbz2.a static one. MIPS will refuce to build a relocatable
object when creating a new shared library with the following error:

blocksort.o: relocation R_MIPS_HI16 against `__gnu_local_gp' can not be used
when making a shared object; recompile with -fPIC

This is because these files are build without -fPIC when creating the
static library and later on they are used to build the shared one.

This is easily fixed if we add the shared library build rule before
creating the static library so object files are always compiled with
-fPIC.

Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
---
 package/bzip2/bzip2.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/bzip2/bzip2.mk b/package/bzip2/bzip2.mk
index 5f8c35e..c49109a 100644
--- a/package/bzip2/bzip2.mk
+++ b/package/bzip2/bzip2.mk
@@ -18,9 +18,9 @@ endef
 endif
 
 define BZIP2_BUILD_CMDS
+	$(BZIP2_BUILD_SHARED_CMDS)
 	$(TARGET_MAKE_ENV)
 		$(MAKE) -C $(@D) libbz2.a bzip2 bzip2recover $(TARGET_CONFIGURE_OPTS)
-	$(BZIP2_BUILD_SHARED_CMDS)
 endef
 
 ifeq ($(BR2_PREFER_STATIC_LIB),)
-- 
1.8.2.1

             reply	other threads:[~2013-06-05 12:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-05 12:56 Markos Chandras [this message]
2013-06-05 13:08 ` [Buildroot] [PATCH] bzip2: Rearrange build order Thomas Petazzoni
2013-06-05 13:50 ` Peter Korsgaard
2013-06-05 14:02   ` Markos Chandras
2013-06-05 14:04   ` Thomas Petazzoni
2013-06-05 14:08     ` Markos Chandras
2013-06-05 14:15     ` Peter Korsgaard
2013-06-05 14:25       ` Markos Chandras
2013-06-05 14:48         ` Peter Korsgaard
2013-06-05 15:01           ` Markos Chandras
2013-06-05 15:22       ` Thomas Petazzoni
2013-06-05 21:56         ` 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=1370436976-746-1-git-send-email-markos.chandras@gmail.com \
    --to=markos.chandras@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox