binutils: Revert to 2.25.1 as it break msys2-runtime

This commit is contained in:
Alexey Pavlov
2016-03-15 12:34:39 +03:00
parent e7334bbbb3
commit b9dee79142
3 changed files with 2421 additions and 80 deletions

View File

@@ -1,10 +1,10 @@
# Maintainer: Alexey Pavlov <alexpux@gmail.com>
pkgname=binutils
_basever=2.26
_basever=2.25.1
pkgver=${_basever}
#pkgver=2.24.51
pkgrel=1
pkgrel=2
pkgdesc="A set of programs to assemble and manipulate binary and object files"
arch=('i686' 'x86_64')
url="https://www.gnu.org/software/binutils/"
@@ -17,26 +17,24 @@ options=('staticlibs' '!distcc' '!ccache')
install=binutils.install
source=(#https://www.mirrorservice.org/sites/sourceware.org/pub/binutils/snapshots/binutils-${_basever}.tar.bz2
https://ftp.gnu.org/gnu/binutils/binutils-${pkgver}.tar.bz2{,.sig}
binutils-2.26-msys2.patch
0005-bfd-Increase-_bfd_coff_max_nscns-to-65279.patch
coff-linker-weak-nt-externals.patch
gas-aux-nt-weak-externals.patch
objcopy-weak-nt-externals2local.patch)
sha256sums=('c2ace41809542f5237afc7e3b8f32bb92bc7bc53c6232a84463c423b0714ecd9'
#binutils-2.26-msys2.patch
#0005-bfd-Increase-_bfd_coff_max_nscns-to-65279.patch
#coff-linker-weak-nt-externals.patch
#gas-aux-nt-weak-externals.patch
#objcopy-weak-nt-externals2local.patch
binutils-2.24.51-msys2.patch)
sha256sums=('b5b14added7d78a8d1ca70b5cb75fef57ce2197264f4f5835326b0df22ac9f22'
'SKIP'
'91dc8f8624301e1fc54f6c31b076ccdd7aff795b608f547b050bc6df281c7b43'
'bd38317b28b894d5c0e0ba043fc2445af415f6e96bb9ac93c348748d21a43625'
'76663a2493f81e2306140259a2e4306b7cc4592fc4381951df87b5aa52c0fb62'
'a5764911df3bde0e51fe2c244cac38a2f4169081017796b8cc9f214d34c17930'
'05933fb77e5577257fe1d7a6ff2e701e93fd43ce417a29165bc6a71da5326459')
'4661ea9608e0c00c95dff5a43e4db69917a16b2877f4fae2e4f4330a5ec592be')
prepare() {
cd "${srcdir}"/binutils-$_basever
patch -p1 -i "${srcdir}"/coff-linker-weak-nt-externals.patch
patch -p1 -i "${srcdir}"/gas-aux-nt-weak-externals.patch
patch -p1 -i "${srcdir}"/objcopy-weak-nt-externals2local.patch
patch -p1 -i "${srcdir}"/binutils-2.26-msys2.patch
patch -p1 -i "${srcdir}"/0005-bfd-Increase-_bfd_coff_max_nscns-to-65279.patch
#patch -p1 -i "${srcdir}"/coff-linker-weak-nt-externals.patch
#patch -p1 -i "${srcdir}"/gas-aux-nt-weak-externals.patch
#patch -p1 -i "${srcdir}"/objcopy-weak-nt-externals2local.patch
#patch -p1 -i "${srcdir}"/binutils-2.26-msys2.patch
#patch -p1 -i "${srcdir}"/0005-bfd-Increase-_bfd_coff_max_nscns-to-65279.patch
patch -p1 -i "${srcdir}"/binutils-2.24.51-msys2.patch
# hack! - libiberty configure tests for header files using "$CPP $CPPFLAGS"
sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" libiberty/configure

File diff suppressed because it is too large Load Diff

View File

@@ -43,6 +43,15 @@ diff -Naur binutils-2.26/bfd/configure binutils-2.26.msys2/bfd/configure
# On Win9x/ME, this test blows up -- it succeeds, but takes
# about 5 minutes as the teststring grows exponentially.
# Worse, since 9x/ME are not pre-emptively multitasking,
@@ -6334,7 +6334,7 @@
lt_cv_file_magic_test_file=/shlib/libc.so
;;
-cygwin*)
+cygwin*|msys*)
# func_win32_libid is a shell function defined in ltmain.sh
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
lt_cv_file_magic_cmd='func_win32_libid'
@@ -6914,7 +6914,7 @@
aix*)
symcode='[BCDT]'
@@ -162,6 +171,21 @@ diff -Naur binutils-2.26/bfd/configure binutils-2.26.msys2/bfd/configure
+ *-*-msys*)
+ SHARED_LDFLAGS="-no-undefined"
+ SHARED_LIBADD="-L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl -lmsys-2.0 -lkernel32"
+ ;;
# Hack to build or1k-src on OSX
or1k*-*-darwin*)
SHARED_LIBADD="-L`pwd`/../libiberty/pic -L`pwd`/../intl -liberty -lintl"
diff -Naur binutils-2.26/bfd/configure.ac binutils-2.26.msys2/bfd/configure.ac
--- binutils-2.26/bfd/configure.ac 2016-01-25 09:54:07.000000000 +0100
+++ binutils-2.26.msys2/bfd/configure.ac 2016-03-10 12:49:01.938688143 +0100
@@ -576,7 +576,10 @@
SHARED_LDFLAGS="-no-undefined"
SHARED_LIBADD="-L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl -lcygwin -lkernel32"
;;
-
+ *-*-msys*)
+ SHARED_LDFLAGS="-no-undefined"
+ SHARED_LIBADD="-L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl -lmsys-2.0 -lkernel32"
+ ;;
# Hack to build or1k-src on OSX
or1k*-*-darwin*)
@@ -169,49 +193,6 @@ diff -Naur binutils-2.26/bfd/configure binutils-2.26.msys2/bfd/configure
diff -Naur binutils-2.26/binutils/configure binutils-2.26.msys2/binutils/configure
--- binutils-2.26/binutils/configure 2016-01-25 09:54:09.000000000 +0100
+++ binutils-2.26.msys2/binutils/configure 2016-03-10 13:06:52.827584607 +0100
@@ -674,6 +674,7 @@
am__fastdepCC_FALSE
am__fastdepCC_TRUE
CCDEPMODE
+am__nodep
AMDEPBACKSLASH
AMDEP_FALSE
AMDEP_TRUE
@@ -3945,6 +3946,7 @@
if test "x$enable_dependency_tracking" != xno; then
am_depcomp="$ac_aux_dir/depcomp"
AMDEPBACKSLASH='\'
+ am__nodep='_no'
fi
if test "x$enable_dependency_tracking" != xno; then
AMDEP_TRUE=
@@ -4007,14 +4009,11 @@
# We need awk for the "check" target. The system "awk" is bad on
# some platforms.
-# Always define AMTAR for backward compatibility.
-
-AMTAR=${AMTAR-"${am_missing_run}tar"}
-
-am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
-
-
+# Always define AMTAR for backward compatibility. Yes, it's still used
+# in the wild :-( We should find a proper way to deprecate it ...
+AMTAR='$${TAR-tar}'
+am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
depcc="$CC" am_compiler_list=
@@ -4029,6 +4028,7 @@
# instance it was reported that on HP-UX the gcc test will end up
# making a dummy file named `D' -- because `-MD' means `put the output
# in D'.
+ rm -rf conftest.dir
mkdir conftest.dir
# Copy depcomp to subdir because otherwise we won't find it if we're
# using a relative directory.
@@ -4088,7 +4088,7 @@
break
fi
@@ -239,6 +220,15 @@ diff -Naur binutils-2.26/binutils/configure binutils-2.26.msys2/binutils/configu
# func_win32_libid is a shell function defined in ltmain.sh
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
lt_cv_file_magic_cmd='func_win32_libid'
@@ -6681,7 +6681,7 @@
aix*)
symcode='[BCDT]'
;;
-cygwin* | mingw* | pw32* | cegcc*)
+cygwin* | msys* | mingw* | pw32* | cegcc*)
symcode='[ABCDGISTW]'
;;
hpux*)
@@ -8296,7 +8296,7 @@
# PIC is the default for these OSes.
;;
@@ -350,15 +340,6 @@ diff -Naur binutils-2.26/binutils/configure binutils-2.26.msys2/binutils/configu
BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
if test -z "$DLLTOOL_DEFAULT"; then
DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_I386"
@@ -14446,7 +14452,7 @@
powerpc*-aix[5-9].*)
OBJDUMP_DEFS="-DAIX_WEAK_SUPPORT"
;;
- powerpc*-*-pe* | powerpc*-*-cygwin*)
+ powerpc*-*-pe* | powerpc*-*-cygwin* | powerpc*-*-msys*)
BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
if test -z "$DLLTOOL_DEFAULT"; then
DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_PPC"
diff -Naur binutils-2.26/binutils/configure.ac binutils-2.26.msys2/binutils/configure.ac
--- binutils-2.26/binutils/configure.ac 2016-01-25 09:51:06.000000000 +0100
+++ binutils-2.26.msys2/binutils/configure.ac 2016-03-10 13:09:52.773497906 +0100
@@ -380,15 +361,6 @@ diff -Naur binutils-2.26/binutils/configure.ac binutils-2.26.msys2/binutils/conf
changequote([,])dnl
BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
if test -z "$DLLTOOL_DEFAULT"; then
@@ -355,7 +355,7 @@
changequote([,])dnl
OBJDUMP_DEFS="-DAIX_WEAK_SUPPORT"
;;
- powerpc*-*-pe* | powerpc*-*-cygwin*)
+ powerpc*-*-pe* | powerpc*-*-cygwin*| powerpc*-*-msys*)
BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
if test -z "$DLLTOOL_DEFAULT"; then
DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_PPC"
diff -Naur binutils-2.26/binutils/dllwrap.c binutils-2.26.msys2/binutils/dllwrap.c
--- binutils-2.26/binutils/dllwrap.c 2015-11-13 09:27:40.000000000 +0100
+++ binutils-2.26.msys2/binutils/dllwrap.c 2016-03-10 13:16:24.017823555 +0100
@@ -424,7 +396,7 @@ diff -Naur binutils-2.26/binutils/dllwrap.c binutils-2.26.msys2/binutils/dllwrap
name_entry = "_cygwin_dll_entry";
break;
+ case MSYS_TARGET:
+ case MSYS_TARGET:
+ name_entry = "_msys_dll_entry";
+ break;
+
@@ -518,6 +490,27 @@ diff -Naur binutils-2.26/binutils/testsuite/lib/utils-lib.exp binutils-2.26.msys
return ".exe"
} else {
return ""
diff -Naur binutils-2.26/compile binutils-2.26.msys2/compile
--- binutils-2.26/compile 2015-11-13 09:27:41.000000000 +0100
+++ binutils-2.26.msys2/compile 2016-03-10 13:23:35.984441037 +0100
@@ -53,7 +53,7 @@
MINGW*)
file_conv=mingw
;;
- CYGWIN*)
+ CYGWIN*|MSYS*)
file_conv=cygwin
;;
*)
@@ -67,7 +67,7 @@
mingw/*)
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
;;
- cygwin/*)
+ cygwin/*|msys/*)
file=`cygpath -m "$file" || echo "$file"`
;;
wine/*)
diff -Naur binutils-2.26/config/dfp.m4 binutils-2.26.msys2/config/dfp.m4
--- binutils-2.26/config/dfp.m4 2015-11-13 09:27:41.000000000 +0100
+++ binutils-2.26.msys2/config/dfp.m4 2016-03-10 13:23:35.984441037 +0100
@@ -766,6 +759,15 @@ diff -Naur binutils-2.26/configure.ac binutils-2.26.msys2/configure.ac
configdirs="$configdirs libtermcap" ;;
esac
@@ -894,7 +894,7 @@
# Disable the go frontend on systems where it is known to not work. Please keep
# this in sync with contrib/config-list.mk.
case "${target}" in
-*-*-darwin* | *-*-cygwin* | *-*-mingw* | *-*-aix*)
+*-*-darwin* | *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-aix*)
unsupported_languages="$unsupported_languages go"
;;
esac
@@ -907,7 +907,7 @@
# PR 46986
noconfigdirs="$noconfigdirs target-libgo"
@@ -829,6 +831,15 @@ diff -Naur binutils-2.26/configure.ac binutils-2.26.msys2/configure.ac
*) RPATH_ENVVAR=LD_LIBRARY_PATH ;;
esac
@@ -3149,7 +3149,7 @@
case " $target_configargs " in
*" --with-newlib "*)
case "$target" in
- *-cygwin*)
+ *-cygwin*|*msys*)
FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/$(TARGET_SUBDIR)/winsup/cygwin -isystem $$s/winsup/cygwin/include'
;;
esac
diff -Naur binutils-2.26/gas/configure binutils-2.26.msys2/gas/configure
--- binutils-2.26/gas/configure 2016-01-25 09:54:08.000000000 +0100
+++ binutils-2.26.msys2/gas/configure 2016-03-10 14:05:33.795435835 +0100
@@ -1627,6 +1638,18 @@ diff -Naur binutils-2.26/libiberty/configure binutils-2.26.msys2/libiberty/confi
$as_echo "#define HAVE_SYS_ERRLIST 1" >>confdefs.h
$as_echo "#define HAVE_SYS_NERR 1" >>confdefs.h
diff -Naur binutils-2.26/libiberty/configure.ac binutils-2.26.msys2/libiberty/configure.ac
--- binutils-2.26/libiberty/configure.ac 2015-11-13 09:27:42.000000000 +0100
+++ binutils-2.26.msys2/libiberty/configure.ac 2016-03-10 14:17:03.362036323 +0100
@@ -549,7 +549,7 @@
AC_SUBST(target_header_dir)
case "${host}" in
- *-*-cygwin* | *-*-mingw*)
+ *-*-cygwin* | *-*-msys* | *-*-mingw*)
AC_DEFINE(HAVE_SYS_ERRLIST)
AC_DEFINE(HAVE_SYS_NERR)
;;
diff -Naur binutils-2.26/libtool.m4 binutils-2.26.msys2/libtool.m4
--- binutils-2.26/libtool.m4 2015-11-13 09:27:42.000000000 +0100
+++ binutils-2.26.msys2/libtool.m4 2016-03-10 14:17:03.465366853 +0100
@@ -2173,3 +2196,109 @@ diff -Naur binutils-2.26/opcodes/configure.ac binutils-2.26.msys2/opcodes/config
*-*-darwin*)
SHARED_LIBADD="-Wl,`pwd`/../bfd/.libs/libbfd.dylib ${SHARED_LIBADD}"
SHARED_DEPENDENCIES="../bfd/libbfd.la"
diff -Naur binutils-2.26/zlib/configure binutils-2.26.msys2/zlib/configure
--- binutils-2.26/zlib/configure 2016-03-15 10:16:21.857268500 +0300
+++ binutils-2.26.msys2/zlib/configure 2016-03-15 10:17:49.766346800 +0300
@@ -4641,7 +4641,7 @@
lt_cv_sys_max_cmd_len=-1;
;;
- cygwin* | mingw* | cegcc*)
+ cygwin* | msys* | mingw* | cegcc*)
# On Win9x/ME, this test blows up -- it succeeds, but takes
# about 5 minutes as the teststring grows exponentially.
# Worse, since 9x/ME are not pre-emptively multitasking,
@@ -4983,7 +4983,7 @@
lt_cv_file_magic_test_file=/shlib/libc.so
;;
-cygwin*)
+cygwin* | msys*)
# func_win32_libid is a shell function defined in ltmain.sh
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
lt_cv_file_magic_cmd='func_win32_libid'
@@ -5563,7 +5563,7 @@
aix*)
symcode='[BCDT]'
;;
-cygwin* | mingw* | pw32* | cegcc*)
+cygwin* | msys* | mingw* | pw32* | cegcc*)
symcode='[ABCDGISTW]'
;;
hpux*)
@@ -7453,7 +7453,7 @@
# PIC is the default for these OSes.
;;
- mingw* | cygwin* | pw32* | os2* | cegcc*)
+ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
# Although the cygwin gcc ignores -fPIC, still need this for old-style
@@ -7535,7 +7535,7 @@
fi
;;
- mingw* | cygwin* | pw32* | os2* | cegcc*)
+ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
lt_prog_compiler_pic='-DDLL_EXPORT'
@@ -7997,7 +7997,7 @@
extract_expsyms_cmds=
case $host_os in
- cygwin* | mingw* | pw32* | cegcc*)
+ cygwin* | msys* | mingw* | pw32* | cegcc*)
# FIXME: the MSVC++ port hasn't been tested in a loooong time
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
@@ -8112,7 +8112,7 @@
fi
;;
- cygwin* | mingw* | pw32* | cegcc*)
+ cygwin* | msys* | mingw* | pw32* | cegcc*)
# _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
# as there is no search path for DLLs.
hardcode_libdir_flag_spec='-L$libdir'
@@ -8549,7 +8549,7 @@
export_dynamic_flag_spec=-rdynamic
;;
- cygwin* | mingw* | pw32* | cegcc*)
+ cygwin* | msys* | mingw* | pw32* | cegcc*)
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
# hardcode_libdir_flag_spec is actually meaningless, as there is
@@ -9460,7 +9460,7 @@
need_lib_prefix=no
case $GCC,$host_os in
- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
+ yes,cygwin* | yes,msys* | yes,mingw* | yes,pw32* | yes,cegcc*)
library_names_spec='$libname.dll.a'
# DLL is installed to $(libdir)/../bin by postinstall_cmds
postinstall_cmds='base_file=`basename \${file}`~
@@ -9484,6 +9484,12 @@
sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
;;
+ msys*)
+ # MSYS DLLs use 'msys-' prefix rather than 'lib'
+ soname_spec='`echo ${libname} | sed -e 's/^lib/msys-/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
+ ;;
mingw* | cegcc*)
# MinGW DLLs use traditional 'lib' prefix
soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
@@ -10123,7 +10129,7 @@
lt_cv_dlopen_libs=
;;
- cygwin*)
+ cygwin* | msys*)
lt_cv_dlopen="dlopen"
lt_cv_dlopen_libs=
;;