This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH: Fix shared library build for libiberty


This patch fixes

http://sources.redhat.com/ml/binutils/2004-12/msg00117.html


H.J.
----
2004-12-16  H.J. Lu  <hongjiu.lu@intel.com>

	* Makefile.tpl: Add @host_pic_frag@.
	* Makefile.in: Regenerated.

	* configure.in: Set host_pic_frag if needed and substitute
	host_pic_frag.
	* configure: Regenerated.

--- binutils/Makefile.tpl.pic	2004-12-10 14:19:01.000000000 -0800
+++ binutils/Makefile.tpl	2004-12-16 14:44:05.358692208 -0800
@@ -499,6 +499,7 @@ PICFLAG_FOR_TARGET = 
 @alphaieee_frag@
 @ospace_frag@
 @host_makefile_frag@
+@host_pic_frag@
 ###
 
 # Flags to pass down to all sub-makes.
--- binutils/configure.in.pic	2004-12-03 08:36:57.000000000 -0800
+++ binutils/configure.in	2004-12-16 14:55:00.520599754 -0800
@@ -1649,9 +1649,11 @@ case $enable_shared in
   else 
     set_lib_path=no
   fi
+  need_host_pic_frag=no
   ;;
 *)
   set_lib_path=$enable_shared
+  need_host_pic_frag=$enable_shared
   ;;
 esac
 
@@ -1667,6 +1669,24 @@ case "${host}" in
   *) RPATH_ENVVAR=LD_LIBRARY_PATH ;;
 esac
 
+# We need to pass the right PICFLAG down.
+host_pic_frag=/dev/null
+if test "${need_host_pic_frag}" = "yes"; then
+  case "${host}" in
+    *-*-cygwin*)	;;
+    alpha*-*-linux*)	host_pic_frag=config/mh-elfalphapic ;;
+    arm*-*-*)		host_pic_frag=config/mh-armpic ;;
+    hppa*-*-*)		host_pic_frag=config/mh-papic ;;
+    i[[34567]]86-*-* | x86_64-*-*)
+			host_pic_frag=config/mh-x86pic ;;
+    powerpc*-*-aix*)	;;
+    powerpc*-*-*)	host_pic_frag=config/mh-ppcpic ;;
+    sparc*-*-*)		host_pic_frag=config/mh-sparcpic ;;
+    s390*-*-*)		host_pic_frag=config/mh-s390pic ;;
+    *)			host_pic_frag=config/mh-${host_cpu}pic ;;
+  esac
+fi
+
 # Record target_configdirs and the configure arguments for target and
 # build configuration in Makefile.
 target_configdirs=`echo "${target_configdirs}" | sed -e 's/target-//g'`
@@ -2120,7 +2140,8 @@ CXX_FOR_TARGET_FOR_RECURSIVE_MAKE="\$(ST
 RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE="\$(STAGE_CC_WRAPPER) ${qqRAW_CXX_FOR_TARGET}"
 
 # Makefile fragments.
-for frag in host_makefile_frag target_makefile_frag alphaieee_frag ospace_frag;
+for frag in host_makefile_frag target_makefile_frag alphaieee_frag \
+	    ospace_frag host_pic_frag
 do
   eval fragval=\$$frag
   if test $fragval != /dev/null; then
@@ -2131,6 +2152,7 @@ AC_SUBST_FILE(host_makefile_frag)
 AC_SUBST_FILE(target_makefile_frag)
 AC_SUBST_FILE(alphaieee_frag)
 AC_SUBST_FILE(ospace_frag)
+AC_SUBST_FILE(host_pic_frag)
 
 # Miscellanea: directories, flags, etc.
 AC_SUBST(SET_LIB_PATH)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]