This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
PATCH: Don't set HOST_LIB_PATH_bfd/HOST_LIB_PATH_opcodes
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Binutils <binutils at sourceware dot org>, GCC Development <gcc at gcc dot gnu dot org>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Cc: Paolo Bonzini <bonzini at gnu dot org>
- Date: Sat, 25 Aug 2012 08:58:08 -0700
- Subject: PATCH: Don't set HOST_LIB_PATH_bfd/HOST_LIB_PATH_opcodes
On Sat, Aug 25, 2012 at 8:31 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
> Hi,
>
> Setting HOST_LIB_PATH_bfd/HOST_LIB_PATH_opcodes causes:
>
> as: error while loading shared libraries:
> /builddir/build/BUILD/binutils/./opcodes/.libs/libopcodes-2.23.51.0.2-0.1.fc17.so:
> file too short
> make[4]: *** [gold-threads.o] Error 2
>
> when compiling gold using binutils linked with the same versions of libbfd
> and libopcodes. As far as I can tell, one can run the newly built binutils
> without setting them since libtool already sets up proper DT_RPATH.
>
The change was introduced by
http://gcc.gnu.org/ml/gcc-cvs/2005-03/msg01452.html
Paolo, do you remember the reason for this?
I tested this patch and works fine with --enable-shared for binutils.
I tested both separate build directory and in-source build. OK
to install?
Thanks.
--
H.J.
----
2012-08-24 H.J. Lu <hongjiu.lu@intel.com>
* Makefile.def (host_modules): Rmove lib_path=.libs from bfd
and opcodes.
* Makefile.in: Regenerated.
diff --git a/Makefile.def b/Makefile.def
index 9e41ff5..220c720 100644
--- a/Makefile.def
+++ b/Makefile.def
@@ -32,8 +32,8 @@ build_modules= { module= m4; };
build_modules= { module= texinfo; };
build_modules= { module= fixincludes; };
-host_modules= { module= bfd; lib_path=.libs; bootstrap=true; };
-host_modules= { module= opcodes; lib_path=.libs; bootstrap=true; };
+host_modules= { module= bfd; bootstrap=true; };
+host_modules= { module= opcodes; bootstrap=true; };
host_modules= { module= binutils; bootstrap=true; };
host_modules= { module= bison; no_check_cross= true; };
host_modules= { module= cgen; };
diff --git a/Makefile.in b/Makefile.in
index 038f801..4fc4d36 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -621,7 +621,7 @@ TARGET_LIB_PATH_libgomp =
$$r/$(TARGET_SUBDIR)/libgomp/.libs:
# This is the list of directories that may be needed in RPATH_ENVVAR
# so that programs built for the host machine work.
-HOST_LIB_PATH =
$(HOST_LIB_PATH_bfd)$(HOST_LIB_PATH_opcodes)$(HOST_LIB_PATH_gmp)$(HOST_LIB_PATH_mpfr)$(HOST_LIB_PATH_mpc)$(HOST_LIB_PATH_ppl)$(HOST_LIB_PATH_cloog)$(HOST_LIB_PATH_libelf)
+HOST_LIB_PATH =
$(HOST_LIB_PATH_gmp)$(HOST_LIB_PATH_mpfr)$(HOST_LIB_PATH_mpc)$(HOST_LIB_PATH_ppl)$(HOST_LIB_PATH_cloog)$(HOST_LIB_PATH_libelf)
# Define HOST_LIB_PATH_gcc here, for the sake of TARGET_LIB_PATH, ouch
@if gcc
@@ -629,16 +629,6 @@ HOST_LIB_PATH_gcc =
$$r/$(HOST_SUBDIR)/gcc$(GCC_SHLIB_SUBDIR):$$r/$(HOST_SUBDIR)
@endif gcc
-@if bfd
-HOST_LIB_PATH_bfd = \
- $$r/$(HOST_SUBDIR)/bfd/.libs:$$r/$(HOST_SUBDIR)/prev-bfd/.libs:
-@endif bfd
-
-@if opcodes
-HOST_LIB_PATH_opcodes = \
- $$r/$(HOST_SUBDIR)/opcodes/.libs:$$r/$(HOST_SUBDIR)/prev-opcodes/.libs:
-@endif opcodes
-
@if gmp
HOST_LIB_PATH_gmp = \
$$r/$(HOST_SUBDIR)/gmp/.libs:$$r/$(HOST_SUBDIR)/prev-gmp/.libs: