public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* PATCH: Fix shared library build for libiberty
@ 2004-12-16 23:01 H. J. Lu
  2004-12-17  2:01 ` DJ Delorie
  2004-12-24 14:10 ` Andreas Jaeger
  0 siblings, 2 replies; 19+ messages in thread
From: H. J. Lu @ 2004-12-16 23:01 UTC (permalink / raw)
  To: binutils; +Cc: gcc-patches

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)

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

end of thread, other threads:[~2004-12-24 15:23 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-16 23:01 PATCH: Fix shared library build for libiberty H. J. Lu
2004-12-17  2:01 ` DJ Delorie
2004-12-17  2:08   ` H. J. Lu
2004-12-17  2:10     ` DJ Delorie
2004-12-17  2:56       ` Zack Weinberg
2004-12-17  4:16         ` Gabriel Dos Reis
2004-12-17  6:03           ` Zack Weinberg
2004-12-17  5:21       ` H. J. Lu
2004-12-17 15:41         ` H. J. Lu
2004-12-17 17:48           ` DJ Delorie
2004-12-17 19:01             ` H. J. Lu
2004-12-17 19:11               ` DJ Delorie
2004-12-18  0:22             ` H. J. Lu
2004-12-18  0:49               ` DJ Delorie
2004-12-18  1:44                 ` H. J. Lu
2004-12-18  1:51                   ` DJ Delorie
2004-12-18 21:38                   ` Andrew Pinski
2004-12-24 14:10 ` Andreas Jaeger
2004-12-24 15:23   ` DJ Delorie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).