From: "H. J. Lu" <hjl@lucon.org>
To: binutils@sources.redhat.com
Cc: gcc-patches@gcc.gnu.org
Subject: PATCH: Fix shared library build for libiberty
Date: Thu, 16 Dec 2004 23:01:00 -0000 [thread overview]
Message-ID: <20041216230100.GA16067@lucon.org> (raw)
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)
next reply other threads:[~2004-12-16 23:01 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-16 23:01 H. J. Lu [this message]
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
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=20041216230100.GA16067@lucon.org \
--to=hjl@lucon.org \
--cc=binutils@sources.redhat.com \
--cc=gcc-patches@gcc.gnu.org \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).