Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [git commit master] Revert "Add -rpath option for host package compilation"
@ 2010-05-30  8:42 Peter Korsgaard
  2010-06-01 17:52 ` Thomas Petazzoni
  0 siblings, 1 reply; 5+ messages in thread
From: Peter Korsgaard @ 2010-05-30  8:42 UTC (permalink / raw)
  To: buildroot


commit: http://git.buildroot.net/buildroot/commit/?id=e1a7d916e9eeaa215551740de40c055130d6c073
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master

Closes #1789

This reverts commit 6b939d40f6a29a43277566adc9d4312d49cb3abf.

The problem this commit tries to fix is valid, but the fix unfortunately
seems to cause worse problems on certain distributions/setups, so revert
for now.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
 CHANGES             |    1 +
 package/Makefile.in |    5 -----
 2 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/CHANGES b/CHANGES
index c6b64c0..26dab3c 100644
--- a/CHANGES
+++ b/CHANGES
@@ -7,6 +7,7 @@
 
 	Issues resolved (http://bugs.uclibc.org):
 
+	#1789: binutils fails to build for i386
 	#1843: Fix libcap build failure
 
 2010.05-rc3, Released May 27th, 2010:
diff --git a/package/Makefile.in b/package/Makefile.in
index 7ac429c..eeb9450 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -77,11 +77,6 @@ ifeq ($(BR2_LARGEFILE),y)
 TARGET_CFLAGS+=-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
 endif
 
-# Host packages are sometimes linked against host libraries installed
-# in $(HOST_DIR)/usr/lib. As we cannot add $(HOST_DIR)/usr/lib to
-# LD_LIBRARY_PATH when building target packages because it causes
-# libtool breakage, we force a rpath to be added to host binaries.
-HOST_CFLAGS+=-Wl,-rpath -Wl,$(HOST_DIR)/usr/lib
 
 #########################################################################
 ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y)
-- 
1.6.3.3

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

* [Buildroot] [git commit master] Revert "Add -rpath option for host package compilation"
  2010-05-30  8:42 [Buildroot] [git commit master] Revert "Add -rpath option for host package compilation" Peter Korsgaard
@ 2010-06-01 17:52 ` Thomas Petazzoni
  2010-06-01 18:47   ` Peter Korsgaard
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2010-06-01 17:52 UTC (permalink / raw)
  To: buildroot

On Sun, 30 May 2010 10:42:17 +0200
Peter Korsgaard <jacmet@sunsite.dk> wrote:

> This reverts commit 6b939d40f6a29a43277566adc9d4312d49cb3abf.
> 
> The problem this commit tries to fix is valid, but the fix
> unfortunately seems to cause worse problems on certain
> distributions/setups, so revert for now.

As it seems that all HOST_CFLAGS/HOST_LDFLAGS combination have tried do
not work, I've tried another solution: setting the rpath in host
binaries outside of the build process of those binaries.

For this, I've added a new package, patchelf, which is compiled for the
host. And then, everytime a package installs something for the host
(in the $(BUILD_DIR)/%/.stamp_host_installed target in
package/Makefile.package.in), I do:

find $(HOST_DIR)/bin $(HOST_DIR)/usr/bin $(HOST_DIR)/usr/sbin $(HOST_DIR)/sbin -type f -perm +111 -exec $(HOST_DIR)/usr/bin/patchelf --set-rpath $(HOST_DIR)/usr/lib {} \; >/dev/null 2>&1 || true

Would this sort of solution be acceptable ?

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

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

* [Buildroot] [git commit master] Revert "Add -rpath option for host package compilation"
  2010-06-01 17:52 ` Thomas Petazzoni
@ 2010-06-01 18:47   ` Peter Korsgaard
  2010-06-01 19:18     ` Thomas Petazzoni
  0 siblings, 1 reply; 5+ messages in thread
From: Peter Korsgaard @ 2010-06-01 18:47 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

Hi,

 Thomas> find $(HOST_DIR)/bin $(HOST_DIR)/usr/bin $(HOST_DIR)/usr/sbin $(HOST_DIR)/sbin -type f -perm +111 -exec $(HOST_DIR)/usr/bin/patchelf --set-rpath $(HOST_DIR)/usr/lib {} \; >/dev/null 2>&1 || true

 Thomas> Would this sort of solution be acceptable ?

I wouldn't exactly call it pretty, but if we don't have any other
options ..

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [git commit master] Revert "Add -rpath option for host package compilation"
  2010-06-01 18:47   ` Peter Korsgaard
@ 2010-06-01 19:18     ` Thomas Petazzoni
  2010-06-01 20:10       ` Peter Korsgaard
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2010-06-01 19:18 UTC (permalink / raw)
  To: buildroot

On Tue, 01 Jun 2010 20:47:22 +0200
Peter Korsgaard <jacmet@uclibc.org> wrote:

>  Thomas> find $(HOST_DIR)/bin $(HOST_DIR)/usr/bin
>  Thomas> $(HOST_DIR)/usr/sbin $(HOST_DIR)/sbin -type f -perm +111
>  Thomas> -exec $(HOST_DIR)/usr/bin/patchelf --set-rpath
>  Thomas> $(HOST_DIR)/usr/lib {} \; >/dev/null 2>&1 || true
> 
>  Thomas> Would this sort of solution be acceptable ?
> 
> I wouldn't exactly call it pretty, but if we don't have any other
> options ..

I don't find this pretty either, but what other options do you see ?
I'm ready to try other approaches.

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

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

* [Buildroot] [git commit master] Revert "Add -rpath option for host package compilation"
  2010-06-01 19:18     ` Thomas Petazzoni
@ 2010-06-01 20:10       ` Peter Korsgaard
  0 siblings, 0 replies; 5+ messages in thread
From: Peter Korsgaard @ 2010-06-01 20:10 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

Hi,

 >> I wouldn't exactly call it pretty, but if we don't have any other
 >> options ..

 Thomas> I don't find this pretty either, but what other options do you see ?

None :/ So I would say, go for it.

 Thomas> I'm ready to try other approaches.

Lets try this approach, we can always move to a cleaner approach later
if we find one. In the mean time the build is fixed for those
situations.

-- 
Bye, Peter Korsgaard

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

end of thread, other threads:[~2010-06-01 20:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-30  8:42 [Buildroot] [git commit master] Revert "Add -rpath option for host package compilation" Peter Korsgaard
2010-06-01 17:52 ` Thomas Petazzoni
2010-06-01 18:47   ` Peter Korsgaard
2010-06-01 19:18     ` Thomas Petazzoni
2010-06-01 20:10       ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox