From 3c95e3492ae66ee012a0ec886be7af9529cfbeb1 Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Tue, 20 Oct 2015 20:37:03 +0100 Subject: binutils: Fix typo pthread_mutextattr_settype -> pthread_mutexattr_settype .. I'm not sure why this didn't fail everywhere, unless no one has tried to build gold? Signed-off-by: Ray Donnelly --- patches/binutils/2.25.1/310-fix-gold-pthreads-typo.patch | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 patches/binutils/2.25.1/310-fix-gold-pthreads-typo.patch (limited to 'patches/binutils') diff --git a/patches/binutils/2.25.1/310-fix-gold-pthreads-typo.patch b/patches/binutils/2.25.1/310-fix-gold-pthreads-typo.patch new file mode 100755 index 00000000..f2e6ff25 --- /dev/null +++ b/patches/binutils/2.25.1/310-fix-gold-pthreads-typo.patch @@ -0,0 +1,14 @@ +--- binutils-2.25.1/gold/gold-threads.cc.orig 2014-10-14 08:32:04.000000000 +0100 ++++ binutils-2.25.1/gold/gold-threads.cc 2015-10-20 22:38:18.640819300 +0100 +@@ -102,9 +102,9 @@ + if (err != 0) + gold_fatal(_("pthead_mutextattr_init failed: %s"), strerror(err)); + #ifdef PTHREAD_MUTEX_ADAPTIVE_NP +- err = pthread_mutextattr_settype(&attr, PTHREAD_MUTEX_ADAPTIVE_NP); ++ err = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ADAPTIVE_NP); + if (err != 0) +- gold_fatal(_("pthread_mutextattr_settype failed: %s"), strerror(err)); ++ gold_fatal(_("pthread_mutexattr_settype failed: %s"), strerror(err)); + #endif + + err = pthread_mutex_init(&this->mutex_, &attr); -- cgit v1.2.3 From df02517fd73789f3c8a30d959f386243bf346a0f Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Sun, 25 Oct 2015 18:46:52 +0000 Subject: binutils: Don't link to libfl as it's unnecessary AM_PROG_LEX sets this for some weird reason; it should look for a program only and not a library. Then later it gets linked to ar, ranlib, dlltool, windres, windmc and itbl-test despite nothing in the code #include'ing FlexLexer.h This isn't a big deal but it did cause a build failure on Cygwin as it triggered a bug with their flex package dependencies which I reported at: https://www.cygwin.com/ml/cygwin/2015-10/msg00433.html Arguably I should remove all traces of LIBLEX in each Makefile.am instead? Signed-off-by: Ray Donnelly --- ...330-Dont-link-to-libfl-as-its-unnecessary.patch | 102 +++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 patches/binutils/2.25.1/330-Dont-link-to-libfl-as-its-unnecessary.patch (limited to 'patches/binutils') diff --git a/patches/binutils/2.25.1/330-Dont-link-to-libfl-as-its-unnecessary.patch b/patches/binutils/2.25.1/330-Dont-link-to-libfl-as-its-unnecessary.patch new file mode 100644 index 00000000..af4032a5 --- /dev/null +++ b/patches/binutils/2.25.1/330-Dont-link-to-libfl-as-its-unnecessary.patch @@ -0,0 +1,102 @@ +diff -urN binutils-2.25.1.orig/binutils/configure binutils-2.25.1/binutils/configure +--- binutils-2.25.1.orig/binutils/configure 2015-10-25 13:18:46.249052806 +0000 ++++ binutils-2.25.1/binutils/configure 2015-10-25 13:39:21.339034801 +0000 +@@ -12067,6 +12067,7 @@ + done + test -n "$YACC" || YACC="yacc" + ++save_LIBS=$LIBS + for ac_prog in flex lex + do + # Extract the first word of "$ac_prog", so it can be a program name with args. +@@ -12227,6 +12228,8 @@ + if test "$LEX" = :; then + LEX=${am_missing_run}flex + fi ++LIBS=$save_LIBS ++LEXLIB= + + ALL_LINGUAS="bg da es fi fr id it ja ro ru rw sk sv tr uk vi zh_CN zh_TW hr" + # If we haven't got the data from the intl directory, +diff -urN binutils-2.25.1.orig/binutils/configure.ac binutils-2.25.1/binutils/configure.ac +--- binutils-2.25.1.orig/binutils/configure.ac 2015-10-25 13:18:46.249052806 +0000 ++++ binutils-2.25.1/binutils/configure.ac 2015-10-25 13:38:52.969035216 +0000 +@@ -87,7 +87,10 @@ + fi + + AC_PROG_YACC ++save_LIBS=$LIBS + AM_PROG_LEX ++LIBS=$save_LIBS ++LEXLIB= + + ALL_LINGUAS="bg da es fi fr id it ja ro ru rw sk sv tr uk vi zh_CN zh_TW hr" + ZW_GNU_GETTEXT_SISTER_DIR +diff -urN binutils-2.25.1.orig/gas/configure binutils-2.25.1/gas/configure +--- binutils-2.25.1.orig/gas/configure 2015-10-25 13:18:46.389052803 +0000 ++++ binutils-2.25.1/gas/configure 2015-10-25 15:16:55.988949456 +0000 +@@ -12795,6 +12795,7 @@ + done + test -n "$YACC" || YACC="yacc" + ++save_LIBS=$LIBS + for ac_prog in flex lex + do + # Extract the first word of "$ac_prog", so it can be a program name with args. +@@ -12955,6 +12956,8 @@ + if test "$LEX" = :; then + LEX=${am_missing_run}flex + fi ++LIBS=$save_LIBS ++LEXLIB= + + ALL_LINGUAS="fr tr es rw id ru fi ja" + # If we haven't got the data from the intl directory, +diff -urN binutils-2.25.1.orig/gas/configure.ac binutils-2.25.1/gas/configure.ac +--- binutils-2.25.1.orig/gas/configure.ac 2015-10-25 15:15:06.000000000 +0000 ++++ binutils-2.25.1/gas/configure.ac 2015-10-25 14:45:32.000000000 +0000 +@@ -717,7 +717,10 @@ + AC_DEFINE_UNQUOTED(TARGET_OS, "${target_os}", [Target OS.]) + + AC_PROG_YACC ++save_LIBS=$LIBS + AM_PROG_LEX ++LIBS=$save_LIBS ++LEXLIB= + + ALL_LINGUAS="fr tr es rw id ru fi ja" + ZW_GNU_GETTEXT_SISTER_DIR +diff -urN binutils-2.25.1.orig/ld/configure binutils-2.25.1/ld/configure +--- binutils-2.25.1.orig/ld/configure 2015-10-25 13:18:47.399052788 +0000 ++++ binutils-2.25.1/ld/configure 2015-10-25 15:17:06.472282637 +0000 +@@ -16071,6 +16071,7 @@ + done + test -n "$YACC" || YACC="yacc" + ++save_LIBS=$LIBS + for ac_prog in flex lex + do + # Extract the first word of "$ac_prog", so it can be a program name with args. +@@ -16231,6 +16232,8 @@ + if test "$LEX" = :; then + LEX=${am_missing_run}flex + fi ++LIBS=$save_LIBS ++LEXLIB= + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 +diff -urN binutils-2.25.1.orig/ld/configure.ac binutils-2.25.1/ld/configure.ac +--- binutils-2.25.1.orig/ld/configure.ac 2015-10-25 13:18:47.415719456 +0000 ++++ binutils-2.25.1/ld/configure.ac 2015-10-25 15:14:43.000000000 +0000 +@@ -173,7 +173,10 @@ + AC_EXEEXT + + AC_PROG_YACC ++save_LIBS=$LIBS + AM_PROG_LEX ++LIBS=$save_LIBS ++LEXLIB= + + AM_MAINTAINER_MODE + AM_CONDITIONAL(GENINSRC_NEVER, false) -- cgit v1.2.3 From 9ef1750f3cf7be50d0cb08d9e27e66b12107e836 Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Tue, 20 Oct 2015 20:39:00 +0100 Subject: MinGW-w64: winpthreads doesn't have pthread_mutexattr_settype It's only used as a hint, so excluding it shouldn't cause any problems. Signed-off-by: Ray Donnelly --- ...64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 patches/binutils/2.25.1/320-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch (limited to 'patches/binutils') diff --git a/patches/binutils/2.25.1/320-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch b/patches/binutils/2.25.1/320-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch new file mode 100755 index 00000000..f9a8af67 --- /dev/null +++ b/patches/binutils/2.25.1/320-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch @@ -0,0 +1,11 @@ +--- binutils-2.25.1/gold/gold-threads.cc.orig 2015-10-20 22:39:36.371169400 +0100 ++++ binutils-2.25.1/gold/gold-threads.cc 2015-10-20 22:39:38.182772700 +0100 +@@ -101,7 +101,7 @@ + int err = pthread_mutexattr_init(&attr); + if (err != 0) + gold_fatal(_("pthead_mutextattr_init failed: %s"), strerror(err)); +-#ifdef PTHREAD_MUTEX_ADAPTIVE_NP ++#if defined(PTHREAD_MUTEX_ADAPTIVE_NP) && !defined(_WIN32) + err = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ADAPTIVE_NP); + if (err != 0) + gold_fatal(_("pthread_mutexattr_settype failed: %s"), strerror(err)); -- cgit v1.2.3