mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2025-01-17 23:34:07 +00:00
core/binutils to 2.24-7
This commit is contained in:
parent
6aaaf86781
commit
c14d49bbdb
3 changed files with 268 additions and 8 deletions
|
@ -11,22 +11,24 @@ noautobuild=1
|
|||
|
||||
pkgname=binutils
|
||||
pkgver=2.24
|
||||
pkgrel=6
|
||||
pkgrel=7
|
||||
pkgdesc="A set of programs to assemble and manipulate binary and object files"
|
||||
arch=('i686' 'x86_64')
|
||||
url="http://www.gnu.org/software/binutils/"
|
||||
license=('GPL')
|
||||
groups=('base-devel')
|
||||
depends=('glibc>=2.19' 'zlib')
|
||||
depends=('glibc>=2.20' 'zlib')
|
||||
checkdepends=('dejagnu')
|
||||
options=('staticlibs' '!distcc' '!ccache')
|
||||
install=binutils.install
|
||||
source=(ftp://ftp.gnu.org/gnu/binutils/binutils-${pkgver}.tar.bz2{,.sig}
|
||||
binutils-2.24-lto-testsuite.patch
|
||||
binutils-2.24-gold-testsuite-plugin.patch
|
||||
binutils-2.24-shared-pie.patch)
|
||||
md5sums=('e0f71a7b2ddab0f8612336ac81d9636b'
|
||||
'SKIP'
|
||||
'b16e895c24ff80acd98a21021eccefad'
|
||||
'e68a1f221545f082baa5bd417cd077af'
|
||||
'e46bbb03abaa5db58c12247644dc4857'
|
||||
'ec59461c4febab9cfe1c1ef33326bc50')
|
||||
|
||||
prepare() {
|
||||
|
@ -35,9 +37,12 @@ prepare() {
|
|||
# hack! - libiberty configure tests for header files using "$CPP $CPPFLAGS"
|
||||
sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" libiberty/configure
|
||||
|
||||
# fix lto testsuite with gcc-4.9 - commit b35d44f1
|
||||
# fix lto testsuite with gcc-4.9 - commits b35d44f1 and 37a6ac44
|
||||
patch -p1 -i $srcdir/binutils-2.24-lto-testsuite.patch
|
||||
|
||||
# fix gold testsuite with gcc-4.9 - commit ae447ddd
|
||||
patch -p1 -i $srcdir/binutils-2.24-gold-testsuite-plugin.patch
|
||||
|
||||
# fix issues with -static -fPIE -pie - commit 4199e3b8
|
||||
patch -p1 -i $srcdir/binutils-2.24-shared-pie.patch
|
||||
|
||||
|
@ -70,8 +75,9 @@ build() {
|
|||
check() {
|
||||
cd ${srcdir}/binutils-build
|
||||
|
||||
# do not abort on errors - manually check log files
|
||||
#make -k -j1 check || true
|
||||
# unset LDFLAGS as testsuite makes assumptions about which ones are active
|
||||
# ignore failures in gold testsuite...
|
||||
make -k LDFLAGS="" check
|
||||
}
|
||||
|
||||
package() {
|
||||
|
|
229
core/binutils/binutils-2.24-gold-testsuite-plugin.patch
Normal file
229
core/binutils/binutils-2.24-gold-testsuite-plugin.patch
Normal file
|
@ -0,0 +1,229 @@
|
|||
diff --git a/gold/configure b/gold/configure
|
||||
index 2257324..f61307b 100755
|
||||
--- a/gold/configure
|
||||
+++ b/gold/configure
|
||||
@@ -594,10 +594,12 @@ LTLIBOBJS
|
||||
MAINT
|
||||
MAINTAINER_MODE_FALSE
|
||||
MAINTAINER_MODE_TRUE
|
||||
-HAVE_PUBNAMES_FALSE
|
||||
-HAVE_PUBNAMES_TRUE
|
||||
DLOPEN_LIBS
|
||||
CXXCPP
|
||||
+HAVE_NO_USE_LINKER_PLUGIN_FALSE
|
||||
+HAVE_NO_USE_LINKER_PLUGIN_TRUE
|
||||
+HAVE_PUBNAMES_FALSE
|
||||
+HAVE_PUBNAMES_TRUE
|
||||
HAVE_ZLIB_FALSE
|
||||
HAVE_ZLIB_TRUE
|
||||
LIBOBJS
|
||||
@@ -6991,6 +6993,50 @@ cat >>confdefs.h <<_ACEOF
|
||||
_ACEOF
|
||||
|
||||
|
||||
+save_CFLAGS="$CFLAGS"
|
||||
+CFLAGS="$CFLAGS -Werror -gpubnames"
|
||||
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
+/* end confdefs.h. */
|
||||
+int i;
|
||||
+_ACEOF
|
||||
+if ac_fn_c_try_compile "$LINENO"; then :
|
||||
+ have_pubnames=yes
|
||||
+else
|
||||
+ have_pubnames=no
|
||||
+fi
|
||||
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
+CFLAGS="$save_CFLAGS"
|
||||
+ if test "$have_pubnames" = "yes"; then
|
||||
+ HAVE_PUBNAMES_TRUE=
|
||||
+ HAVE_PUBNAMES_FALSE='#'
|
||||
+else
|
||||
+ HAVE_PUBNAMES_TRUE='#'
|
||||
+ HAVE_PUBNAMES_FALSE=
|
||||
+fi
|
||||
+
|
||||
+
|
||||
+save_CFLAGS="$CFLAGS"
|
||||
+CFLAGS="$CFLAGS -Werror -fno-use-linker-plugin"
|
||||
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
+/* end confdefs.h. */
|
||||
+int i;
|
||||
+_ACEOF
|
||||
+if ac_fn_c_try_compile "$LINENO"; then :
|
||||
+ have_no_use_linker_plugin=yes
|
||||
+else
|
||||
+ have_no_use_linker_plugin=no
|
||||
+fi
|
||||
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
+CFLAGS="$save_CFLAGS"
|
||||
+ if test "$have_no_use_linker_plugin" = "yes"; then
|
||||
+ HAVE_NO_USE_LINKER_PLUGIN_TRUE=
|
||||
+ HAVE_NO_USE_LINKER_PLUGIN_FALSE='#'
|
||||
+else
|
||||
+ HAVE_NO_USE_LINKER_PLUGIN_TRUE='#'
|
||||
+ HAVE_NO_USE_LINKER_PLUGIN_FALSE=
|
||||
+fi
|
||||
+
|
||||
+
|
||||
ac_ext=cpp
|
||||
ac_cpp='$CXXCPP $CPPFLAGS'
|
||||
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||
@@ -7515,28 +7561,6 @@ $as_echo "#define HAVE_STAT_ST_MTIM 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
|
||||
-save_CXXFLAGS="$CXXFLAGS"
|
||||
-CXXFLAGS="$CXXFLAGS -Werror -gpubnames"
|
||||
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
-/* end confdefs.h. */
|
||||
-int i;
|
||||
-_ACEOF
|
||||
-if ac_fn_cxx_try_compile "$LINENO"; then :
|
||||
- have_pubnames=yes
|
||||
-else
|
||||
- have_pubnames=no
|
||||
-fi
|
||||
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
-CXXFLAGS="$save_CXXFLAGS"
|
||||
- if test "$have_pubnames" = "yes"; then
|
||||
- HAVE_PUBNAMES_TRUE=
|
||||
- HAVE_PUBNAMES_FALSE='#'
|
||||
-else
|
||||
- HAVE_PUBNAMES_TRUE='#'
|
||||
- HAVE_PUBNAMES_FALSE=
|
||||
-fi
|
||||
-
|
||||
-
|
||||
ac_ext=c
|
||||
ac_cpp='$CPP $CPPFLAGS'
|
||||
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||
@@ -7837,6 +7861,10 @@ if test -z "${HAVE_PUBNAMES_TRUE}" && test -z "${HAVE_PUBNAMES_FALSE}"; then
|
||||
as_fn_error "conditional \"HAVE_PUBNAMES\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
fi
|
||||
+if test -z "${HAVE_NO_USE_LINKER_PLUGIN_TRUE}" && test -z "${HAVE_NO_USE_LINKER_PLUGIN_FALSE}"; then
|
||||
+ as_fn_error "conditional \"HAVE_NO_USE_LINKER_PLUGIN\" was never defined.
|
||||
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
+fi
|
||||
if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
|
||||
as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
diff --git a/gold/configure.ac b/gold/configure.ac
|
||||
index 803cf46..7ad7302 100644
|
||||
--- a/gold/configure.ac
|
||||
+++ b/gold/configure.ac
|
||||
@@ -520,6 +520,25 @@ dnl multiple declarations of functions like basename when compiling
|
||||
dnl with C++.
|
||||
AC_CHECK_DECLS([basename, ffs, asprintf, vasprintf, snprintf, vsnprintf, strverscmp])
|
||||
|
||||
+dnl Check if gcc supports the -gpubnames option.
|
||||
+dnl Use -Werror in case of compilers that make unknown -g options warnings.
|
||||
+dnl They would pass the test here, but fail in actual use when $WARN_CFLAGS
|
||||
+dnl gets set later by default Autoconf magic to include -Werror. (We are
|
||||
+dnl assuming here that there is no compiler that groks -gpubnames
|
||||
+dnl but does not grok -Werror.)
|
||||
+save_CFLAGS="$CFLAGS"
|
||||
+CFLAGS="$CFLAGS -Werror -gpubnames"
|
||||
+AC_COMPILE_IFELSE([int i;], [have_pubnames=yes], [have_pubnames=no])
|
||||
+CFLAGS="$save_CFLAGS"
|
||||
+AM_CONDITIONAL(HAVE_PUBNAMES, test "$have_pubnames" = "yes")
|
||||
+
|
||||
+dnl Check if gcc supports the -fno-use-linker-plugin option.
|
||||
+save_CFLAGS="$CFLAGS"
|
||||
+CFLAGS="$CFLAGS -Werror -fno-use-linker-plugin"
|
||||
+AC_COMPILE_IFELSE([int i;], [have_no_use_linker_plugin=yes], [have_no_use_linker_plugin=no])
|
||||
+CFLAGS="$save_CFLAGS"
|
||||
+AM_CONDITIONAL(HAVE_NO_USE_LINKER_PLUGIN, test "$have_no_use_linker_plugin" = "yes")
|
||||
+
|
||||
AC_LANG_PUSH(C++)
|
||||
|
||||
AC_CHECK_HEADERS(unordered_set unordered_map)
|
||||
@@ -601,18 +620,6 @@ if test "$gold_cv_stat_st_mtim" = "yes"; then
|
||||
[Define if struct stat has a field st_mtim with timespec for mtime])
|
||||
fi
|
||||
|
||||
-dnl Check if gcc supports the -gpubnames option.
|
||||
-dnl Use -Werror in case of compilers that make unknown -g options warnings.
|
||||
-dnl They would pass the test here, but fail in actual use when $WARN_CFLAGS
|
||||
-dnl gets set later by default Autoconf magic to include -Werror. (We are
|
||||
-dnl assuming here that there is no compiler that groks -gpubnames
|
||||
-dnl but does not grok -Werror.)
|
||||
-save_CXXFLAGS="$CXXFLAGS"
|
||||
-CXXFLAGS="$CXXFLAGS -Werror -gpubnames"
|
||||
-AC_COMPILE_IFELSE([int i;], [have_pubnames=yes], [have_pubnames=no])
|
||||
-CXXFLAGS="$save_CXXFLAGS"
|
||||
-AM_CONDITIONAL(HAVE_PUBNAMES, test "$have_pubnames" = "yes")
|
||||
-
|
||||
AC_LANG_POP(C++)
|
||||
|
||||
AC_CHECK_HEADERS(locale.h)
|
||||
diff --git a/gold/testsuite/Makefile.am b/gold/testsuite/Makefile.am
|
||||
index aa41290..52cc05e 100644
|
||||
--- a/gold/testsuite/Makefile.am
|
||||
+++ b/gold/testsuite/Makefile.am
|
||||
@@ -19,18 +19,25 @@ AM_CPPFLAGS = \
|
||||
-DLOCALEDIR="\"$(datadir)/locale\"" \
|
||||
@INCINTL@
|
||||
|
||||
+# Some versions of GCC now automatically enable linker plugins,
|
||||
+# but we want to run our tests without GCC's plugins.
|
||||
+if HAVE_NO_USE_LINKER_PLUGIN
|
||||
+OPT_NO_PLUGINS = -fno-use-linker-plugin
|
||||
+endif
|
||||
+
|
||||
# COMPILE1, LINK1, CXXCOMPILE1, CXXLINK1 are renamed from COMPILE, LINK,
|
||||
# CXXCOMPILE and CXXLINK generated by automake 1.11.1. FIXME: they should
|
||||
# be updated if they are different from automake used by gold.
|
||||
COMPILE1 = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
-LINK1 = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
+LINK1 = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(OPT_NO_PLUGINS) \
|
||||
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
CXXCOMPILE1 = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
|
||||
-CXXLINK1 = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
|
||||
- -o $@
|
||||
+CXXLINK1 = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(OPT_NO_PLUGINS) \
|
||||
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
|
||||
-# Strip out -Wp,-D_FORTIFY_SOURCE=, which is rrelevant for the gold
|
||||
+# Strip out -Wp,-D_FORTIFY_SOURCE=, which is irrelevant for the gold
|
||||
# testsuite and incompatible with -O0 used in gold tests, from
|
||||
# COMPILE, LINK, CXXCOMPILE and CXXLINK.
|
||||
COMPILE = `echo $(COMPILE1) | sed -e 's/-Wp,-D_FORTIFY_SOURCE=[0-9[0-9]]*//'`
|
||||
diff --git a/gold/testsuite/Makefile.in b/gold/testsuite/Makefile.in
|
||||
index 60c2c10..da0a338 100644
|
||||
--- a/gold/testsuite/Makefile.in
|
||||
+++ b/gold/testsuite/Makefile.in
|
||||
@@ -2096,21 +2096,27 @@ AM_CPPFLAGS = \
|
||||
@INCINTL@
|
||||
|
||||
|
||||
+# Some versions of GCC now automatically enable linker plugins,
|
||||
+# but we want to run our tests without GCC's plugins.
|
||||
+@HAVE_NO_USE_LINKER_PLUGIN_TRUE@OPT_NO_PLUGINS = -fno-use-linker-plugin
|
||||
+
|
||||
# COMPILE1, LINK1, CXXCOMPILE1, CXXLINK1 are renamed from COMPILE, LINK,
|
||||
# CXXCOMPILE and CXXLINK generated by automake 1.11.1. FIXME: they should
|
||||
# be updated if they are different from automake used by gold.
|
||||
COMPILE1 = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
|
||||
-LINK1 = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
+LINK1 = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(OPT_NO_PLUGINS) \
|
||||
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
+
|
||||
CXXCOMPILE1 = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
|
||||
|
||||
-CXXLINK1 = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
|
||||
- -o $@
|
||||
+CXXLINK1 = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(OPT_NO_PLUGINS) \
|
||||
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
|
||||
|
||||
-# Strip out -Wp,-D_FORTIFY_SOURCE=, which is rrelevant for the gold
|
||||
+# Strip out -Wp,-D_FORTIFY_SOURCE=, which is irrelevant for the gold
|
||||
# testsuite and incompatible with -O0 used in gold tests, from
|
||||
# COMPILE, LINK, CXXCOMPILE and CXXLINK.
|
||||
COMPILE = `echo $(COMPILE1) | sed -e 's/-Wp,-D_FORTIFY_SOURCE=[0-9[0-9]]*//'`
|
|
@ -48,6 +48,31 @@ index 8df42ae..175449a 100644
|
|||
if { [lindex $status 0] == 0 } {
|
||||
set lto_available_saved 1
|
||||
} else {
|
||||
--
|
||||
1.7.1
|
||||
diff --git a/ld/testsuite/ld-plugin/lto.exp b/ld/testsuite/ld-plugin/lto.exp
|
||||
index b14f13c..765d85f 100644
|
||||
--- a/ld/testsuite/ld-plugin/lto.exp
|
||||
+++ b/ld/testsuite/ld-plugin/lto.exp
|
||||
@@ -324,7 +324,20 @@ if { [is_elf_format] && [check_lto_shared_available] } {
|
||||
|
||||
set testname "Build liblto-11.a"
|
||||
remote_file host delete "tmpdir/liblto-11.a"
|
||||
-set catch_output [run_host_cmd "$ar" "rc tmpdir/liblto-11.a tmpdir/lto-11a.o tmpdir/lto-11b.o tmpdir/lto-11c.o"]
|
||||
+set plugin_names {
|
||||
+ liblto_plugin.so
|
||||
+ liblto_plugin-0.dll
|
||||
+ cyglto_plugin-0.dll
|
||||
+}
|
||||
+set plug_opt ""
|
||||
+foreach plug $plugin_names {
|
||||
+ set plug_so [run_host_cmd $CC "--print-prog-name $plug"]
|
||||
+ if { $plug_so ne $plug } then {
|
||||
+ set plug_opt "--plugin $plug_so"
|
||||
+ break
|
||||
+ }
|
||||
+}
|
||||
+set catch_output [run_host_cmd "$ar" "rc $plug_opt tmpdir/liblto-11.a tmpdir/lto-11a.o tmpdir/lto-11b.o tmpdir/lto-11c.o"]
|
||||
if {![string match "" $catch_output]} {
|
||||
unresolved $testname
|
||||
restore_notify
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue