From patchwork Wed Jun 20 09:48:27 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 165970 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ozlabs.org (Postfix) with ESMTP id F374AB6FA2 for ; Wed, 20 Jun 2012 19:48:51 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id BC60B315F4; Wed, 20 Jun 2012 09:48:47 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Ah3AxoiQgj37; Wed, 20 Jun 2012 09:48:45 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id D439731424; Wed, 20 Jun 2012 09:48:44 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 1E7A78F75B for ; Wed, 20 Jun 2012 09:48:43 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 17F4C8B6DC for ; Wed, 20 Jun 2012 09:48:43 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xg3zIaik1YxQ for ; Wed, 20 Jun 2012 09:48:41 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.free-electrons.com (mail.free-electrons.com [88.190.12.23]) by whitealder.osuosl.org (Postfix) with ESMTP id DE2588B6C1 for ; Wed, 20 Jun 2012 09:48:40 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 106) id CA294192; Wed, 20 Jun 2012 11:48:31 +0200 (CEST) Received: from localhost (col31-4-88-188-83-94.fbx.proxad.net [88.188.83.94]) by mail.free-electrons.com (Postfix) with ESMTPSA id 8EFFD131 for ; Wed, 20 Jun 2012 11:48:20 +0200 (CEST) From: Thomas Petazzoni To: buildroot@uclibc.org Date: Wed, 20 Jun 2012 11:48:27 +0200 Message-Id: <1340185707-6285-1-git-send-email-thomas.petazzoni@free-electrons.com> X-Mailer: git-send-email 1.7.9.5 Subject: [Buildroot] [PATCH] libnspr: fix build issue on ARM with certain toolchains X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net Fixes issues like http://autobuild.buildroot.org/results/aed444bf37b9e289866a9b6c754ed74a3cc0f3b2/build-end.log. Signed-off-by: Thomas Petazzoni --- package/libnspr/libnspr-fix-flags.patch | 65 +++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 package/libnspr/libnspr-fix-flags.patch diff --git a/package/libnspr/libnspr-fix-flags.patch b/package/libnspr/libnspr-fix-flags.patch new file mode 100644 index 0000000..d5ad4fa --- /dev/null +++ b/package/libnspr/libnspr-fix-flags.patch @@ -0,0 +1,65 @@ +Fix build issues on ARM with certain toolchains + +Some gcc/binutils combinations do not like having a space between +"-Wa," and the following assembler option, so we simply remove those +spaces. + +However, fixing the configure.in is not sufficient, because libnspr +absolutely requires the prehistoric autoconf 2.13 to re-generate the +configure script. So, since the patch to the configure script is not +horrible, we also patch this script directly. + +Signed-off-by: Thomas Petazzoni + +Index: b/mozilla/nsprpub/configure.in +=================================================================== +--- a/mozilla/nsprpub/configure.in ++++ b/mozilla/nsprpub/configure.in +@@ -925,8 +925,8 @@ + case "$target_cpu" in + arm*) + if test "$GNU_CC"; then +- CFLAGS="$CFLAGS -march=armv7-a -mthumb -Wa, -march=armv7-a -Wa, -mthumb" +- CXXFLAGS="$CXXFLAGS -march=armv7-a -mthumb -Wa, -march=armv7-a -Wa, -mthumb" ++ CFLAGS="$CFLAGS -march=armv7-a -mthumb -Wa,-march=armv7-a -Wa,-mthumb" ++ CXXFLAGS="$CXXFLAGS -march=armv7-a -mthumb -Wa,-march=armv7-a -Wa,-mthumb" + ASFLAGS="$ASFLAGS -march=armv7-a -mthumb" + else + AC_MSG_ERROR([--enable-thumb2 is not supported for non-GNU toolchains]) +@@ -940,8 +940,8 @@ + case "$target_cpu" in + arm*) + if test "$GNU_CC"; then +- CFLAGS="$CFLAGS -march=armv5te -mthumb-interwork -Wa, -march=armv5te -Wa, -mthumb-interwork" +- CXXFLAGS="$CXXFLAGS -march=armv5te -mthumb-interwork -Wa, -march=armv5te -Wa, -mthumb-interwork" ++ CFLAGS="$CFLAGS -march=armv5te -mthumb-interwork -Wa,-march=armv5te -Wa,-mthumb-interwork" ++ CXXFLAGS="$CXXFLAGS -march=armv5te -mthumb-interwork -Wa,-march=armv5te -Wa,-mthumb-interwork" + ASFLAGS="$ASFLAGS -march=armv5te -mthumb-interwork" + fi + ;; +Index: b/mozilla/nsprpub/configure +=================================================================== +--- a/mozilla/nsprpub/configure ++++ b/mozilla/nsprpub/configure +@@ -3101,8 +3101,8 @@ + case "$target_cpu" in + arm*) + if test "$GNU_CC"; then +- CFLAGS="$CFLAGS -march=armv7-a -mthumb -Wa, -march=armv7-a -Wa, -mthumb" +- CXXFLAGS="$CXXFLAGS -march=armv7-a -mthumb -Wa, -march=armv7-a -Wa, -mthumb" ++ CFLAGS="$CFLAGS -march=armv7-a -mthumb -Wa,-march=armv7-a -Wa,-mthumb" ++ CXXFLAGS="$CXXFLAGS -march=armv7-a -mthumb -Wa,-march=armv7-a -Wa,-mthumb" + ASFLAGS="$ASFLAGS -march=armv7-a -mthumb" + else + { echo "configure: error: --enable-thumb2 is not supported for non-GNU toolchains" 1>&2; exit 1; } +@@ -3116,8 +3116,8 @@ + case "$target_cpu" in + arm*) + if test "$GNU_CC"; then +- CFLAGS="$CFLAGS -march=armv5te -mthumb-interwork -Wa, -march=armv5te -Wa, -mthumb-interwork" +- CXXFLAGS="$CXXFLAGS -march=armv5te -mthumb-interwork -Wa, -march=armv5te -Wa, -mthumb-interwork" ++ CFLAGS="$CFLAGS -march=armv5te -mthumb-interwork -Wa,-march=armv5te -Wa,-mthumb-interwork" ++ CXXFLAGS="$CXXFLAGS -march=armv5te -mthumb-interwork -Wa,-march=armv5te -Wa,-mthumb-interwork" + ASFLAGS="$ASFLAGS -march=armv5te -mthumb-interwork" + fi + ;;