* [Buildroot] [PATCH] libnspr: fix build issue on ARM with certain toolchains
@ 2012-06-20 9:48 Thomas Petazzoni
2012-06-20 20:58 ` Peter Korsgaard
0 siblings, 1 reply; 2+ messages in thread
From: Thomas Petazzoni @ 2012-06-20 9:48 UTC (permalink / raw)
To: buildroot
Fixes issues like
http://autobuild.buildroot.org/results/aed444bf37b9e289866a9b6c754ed74a3cc0f3b2/build-end.log.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
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 <thomas.petazzoni@free-electrons.com>
+
+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
+ ;;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Buildroot] [PATCH] libnspr: fix build issue on ARM with certain toolchains
2012-06-20 9:48 [Buildroot] [PATCH] libnspr: fix build issue on ARM with certain toolchains Thomas Petazzoni
@ 2012-06-20 20:58 ` Peter Korsgaard
0 siblings, 0 replies; 2+ messages in thread
From: Peter Korsgaard @ 2012-06-20 20:58 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
Thomas> Fixes issues like
Thomas> http://autobuild.buildroot.org/results/aed444bf37b9e289866a9b6c754ed74a3cc0f3b2/build-end.log.
Committed, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-06-20 20:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-20 9:48 [Buildroot] [PATCH] libnspr: fix build issue on ARM with certain toolchains Thomas Petazzoni
2012-06-20 20:58 ` Peter Korsgaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox