public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
* [updated zlib PATCH 2 of 3] binutils/binutils: use the prebuilt zlib
@ 2011-11-23 11:57 Zhenqiang Chen
  0 siblings, 0 replies; only message in thread
From: Zhenqiang Chen @ 2011-11-23 11:57 UTC (permalink / raw)
  To: yann.morin.1998; +Cc: crossgcc

# HG changeset patch
# User Zhenqiang Chen <zhenqiang.chen@linaro.org>
# Date 1322037380 -28800
# Node ID d681a5a526e81fdda839a04b27fcb6bce50f65a7
# Parent  ffb01c946be470adbd63b2a2f4784bd01fa25771
binutils/binutils: use the prebuilt zlib to build binutils
to remove the dependence on system zlib.

Signed-off-by: Zhenqiang Chen <zhenqiang.chen@linaro.org>

diff --git a/config/binutils/binutils.in b/config/binutils/binutils.in
--- a/config/binutils/binutils.in
+++ b/config/binutils/binutils.in
@@ -75,6 +75,7 @@
  config BINUTILS_2_18_or_later
      bool
      select BINUTILS_HAS_PKGVERSION_BUGURL
+    select ZLIB_NEEDED

  config BINUTILS_HAS_GOLD
      bool
diff --git a/scripts/build/binutils/binutils.sh b/scripts/build/binutils/binutils.sh
--- a/scripts/build/binutils/binutils.sh
+++ b/scripts/build/binutils/binutils.sh
@@ -22,6 +22,8 @@
      local -a binutils_tools
      local -a manuals_for
      local -a manuals_install
+    local -a binutils_CFLAGS
+    local -a binutils_LDFLAGS

      mkdir -p "${CT_BUILD_DIR}/build-binutils"
      cd "${CT_BUILD_DIR}/build-binutils"
@@ -66,9 +68,16 @@

      CT_DoLog DEBUG "Extra config passed: '${extra_config[*]}'"

+    binutils_CFLAGS=${CT_CFLAGS_FOR_HOST}
+    if [ "${CT_ZLIB_NEEDED}" = "y" ]; then
+        binutils_CFLAGS+=" -I${CT_COMPLIBS_DIR}/zlib/include"
+        binutils_LDFLAGS+=" -L${CT_COMPLIBS_DIR}/zlib/lib"
+    fi
+
      CT_DoExecLog CFG                                            \
-    CFLAGS="${CT_CFLAGS_FOR_HOST}"                              \
-    CXXFLAGS="${CT_CFLAGS_FOR_HOST}"                            \
+    CFLAGS="${binutils_CFLAGS}"                                 \
+    CXXFLAGS="${binutils_CFLAGS}"                               \
+    LDFLAGS="${binutils_LDFLAGS}"                               \
      "${CT_SRC_DIR}/binutils-${CT_BINUTILS_VERSION}/configure"   \
          --build=${CT_BUILD}                                     \
          --host=${CT_HOST}                                       \

--
For unsubscribe information see http://sourceware.org/lists.html#faq

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-11-23 11:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-23 11:57 [updated zlib PATCH 2 of 3] binutils/binutils: use the prebuilt zlib Zhenqiang Chen

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).