public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
From: Zhenqiang Chen <zhenqiang.chen@linaro.org>
To: yann.morin.1998@anciens.enib.fr
Cc: crossgcc@sourceware.org
Subject: [zlib PATCH 2 of 3] binutils/binutils: Use the prebuilt zlib to build binutils
Date: Tue, 22 Nov 2011 12:08:00 -0000	[thread overview]
Message-ID: <4ECB90B7.8070502@linaro.org> (raw)

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

Reviewed-by: Michael Hope
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"
@@ -64,9 +66,16 @@

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

+    binutils_cflags=${CT_CFLAGS_FOR_HOST}
+    if [ "${CT_ZLIB}" = "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

                 reply	other threads:[~2011-11-22 12:08 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=4ECB90B7.8070502@linaro.org \
    --to=zhenqiang.chen@linaro.org \
    --cc=crossgcc@sourceware.org \
    --cc=yann.morin.1998@anciens.enib.fr \
    /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).