binutils: Fix msys2 patch
This commit is contained in:
@@ -492,7 +492,7 @@ diff -Naur binutils-2.30.orig/binutils/testsuite/lib/binutils-common.exp binutil
|
||||
if { [istarget *-*-beospe*]
|
||||
|| [istarget *-*-cegcc*]
|
||||
|| [istarget *-*-cygwin*]
|
||||
+ && ![istarget *-*-msys*]
|
||||
+ || [istarget *-*-msys*]
|
||||
|| [istarget *-*-interix*]
|
||||
|| [istarget *-*-mingw*]
|
||||
|| [istarget *-*-netbsdpe*]
|
||||
@@ -1053,6 +1053,15 @@ diff -Naur binutils-2.30.orig/gas/testsuite/gas/i386/i386.exp binutils-2.30/gas/
|
||||
} then {
|
||||
run_dump_test "secrel"
|
||||
}
|
||||
@@ -667,7 +667,7 @@
|
||||
run_dump_test "x86-64-addr32-intel"
|
||||
run_dump_test "x86-64-opcode"
|
||||
run_dump_test "x86-64-intel64"
|
||||
- if { ! [istarget "*-*-*cygwin*"] && ![istarget "*-*-mingw*"] } then {
|
||||
+ if { ! [istarget "*-*-*cygwin*"] && ![istarget "*-*-mingw*"] && ![istarget "*-*-msys*"] } then {
|
||||
run_dump_test "x86-64-pcrel"
|
||||
run_dump_test "x86-64-disassem"
|
||||
} else {
|
||||
diff -Naur binutils-2.30.orig/gprof/configure binutils-2.30/gprof/configure
|
||||
--- binutils-2.30.orig/gprof/configure 2018-01-27 18:02:44.000000000 +0300
|
||||
+++ binutils-2.30/gprof/configure 2018-06-13 08:19:13.292763300 +0300
|
||||
@@ -1475,7 +1484,7 @@ diff -Naur binutils-2.30.orig/ld/testsuite/ld-auto-import/auto-import.exp binuti
|
||||
set MYLIBS "-L/usr/lib -lcygwin -L/usr/lib/w32api -lkernel32"
|
||||
-
|
||||
+ } else {
|
||||
+ set MYLIBS "-L/usr/lib -lmsys-2.0 -L/usr/lib/w32api -lkernel32"
|
||||
+ set MYLIBS "-L/usr/lib -lmsys-2.0 -L/usr/lib/w32api -lkernel32"
|
||||
+ }
|
||||
+
|
||||
# Compile the dll.
|
||||
@@ -1598,6 +1607,64 @@ diff -Naur binutils-2.30.orig/ld/testsuite/ld-pe/pe-compile.exp binutils-2.30/ld
|
||||
|| [istarget i*86-*-pe]
|
||||
|| [istarget i*86-*-mingw*]
|
||||
|| [istarget x86_64-*-mingw*] } {
|
||||
diff -Naur binutils-2.30.orig/ld/testsuite/ld-pe/weakdef-1.d binutils-2.30/ld/testsuite/ld-pe/weakdef-1.d
|
||||
--- binutils-2.30.orig/ld/testsuite/ld-pe/weakdef-1.d 2018-01-13 16:31:16.000000000 +0300
|
||||
+++ binutils-2.30/ld/testsuite/ld-pe/weakdef-1.d 2018-06-13 08:19:13.339563400 +0300
|
||||
@@ -1,5 +1,5 @@
|
||||
#source: weakdef-1.s
|
||||
-#target: i*86-*-cygwin* i*86-*-pe i*86-*-mingw*
|
||||
+#target: i*86-*-cygwin* i*86-*-msys* i*86-*-pe i*86-*-mingw*
|
||||
#ld: -e _start --gc-sections
|
||||
#objdump: -d
|
||||
|
||||
diff -Naur binutils-2.30.orig/ld/testsuite/ld-scripts/fill.d binutils-2.30/ld/testsuite/ld-scripts/fill.d
|
||||
--- binutils-2.30.orig/ld/testsuite/ld-scripts/fill.d 2018-01-13 16:31:16.000000000 +0300
|
||||
+++ binutils-2.30/ld/testsuite/ld-scripts/fill.d 2018-06-13 08:19:13.339563400 +0300
|
||||
@@ -5,7 +5,7 @@
|
||||
#objdump: -s -j .text
|
||||
#skip: ia64-*-* mips*-*-freebsd* mips*-*-gnu* mips*-*-irix* mips*-*-kfreebsd*
|
||||
#skip: mips*-*-linux* mips*-*-netbsd* mips*-*-openbsd* mips*-*-sysv4*
|
||||
-#skip: tilegx*-*-* tilepro-*-* x86_64-*-cygwin x86_64-*-mingw* x86_64-*-pe*
|
||||
+#skip: tilegx*-*-* tilepro-*-* x86_64-*-cygwin x86_64-*-msys x86_64-*-mingw* x86_64-*-pe*
|
||||
#xfail: alpha*-*-*ecoff sh-*-pe sparc*-*-coff
|
||||
#xfail: tic30-*-coff tic4x-*-* tic54x-*-* z8k-*-*
|
||||
#
|
||||
diff -Naur binutils-2.30.orig/ld/testsuite/ld-scripts/pr20302.d binutils-2.30/ld/testsuite/ld-scripts/pr20302.d
|
||||
--- binutils-2.30.orig/ld/testsuite/ld-scripts/pr20302.d 2018-01-13 16:31:16.000000000 +0300
|
||||
+++ binutils-2.30/ld/testsuite/ld-scripts/pr20302.d 2018-06-13 08:19:13.339563400 +0300
|
||||
@@ -1,7 +1,7 @@
|
||||
#ld: -Tdata=0x1000 -Tdata=0x2000 -Tcross2.t
|
||||
#source: align2a.s
|
||||
#objdump: -h
|
||||
-#notarget: *-*-*aout *-*-netbsd *-*-vms ns32k-*-* rx-*-* x86_64-*-cygwin
|
||||
+#notarget: *-*-*aout *-*-netbsd *-*-vms ns32k-*-* rx-*-* x86_64-*-cygwin x86_64-*-msys
|
||||
# AOUT and NETBSD (ns32k is aout) have fixed address for the data section.
|
||||
# VMS targets need extra libraries.
|
||||
# RX uses non standard section names.
|
||||
diff -Naur binutils-2.30.orig/ld/testsuite/ld-scripts/provide-6.d binutils-2.30/ld/testsuite/ld-scripts/provide-6.d
|
||||
--- binutils-2.30.orig/ld/testsuite/ld-scripts/provide-6.d 2018-01-13 16:31:16.000000000 +0300
|
||||
+++ binutils-2.30/ld/testsuite/ld-scripts/provide-6.d 2018-06-13 08:19:13.339563400 +0300
|
||||
@@ -1,7 +1,7 @@
|
||||
#source: provide-5.s
|
||||
#ld: -T provide-6.t
|
||||
#nm: -B
|
||||
-#xfail: x86_64-*-cygwin
|
||||
+#xfail: x86_64-*-cygwin x86_64-*-msys
|
||||
|
||||
#...
|
||||
0+1000 D foo
|
||||
diff -Naur binutils-2.30.orig/ld/testsuite/ld-scripts/provide-8.d binutils-2.30/ld/testsuite/ld-scripts/provide-8.d
|
||||
--- binutils-2.30.orig/ld/testsuite/ld-scripts/provide-8.d 2018-01-13 16:31:16.000000000 +0300
|
||||
+++ binutils-2.30/ld/testsuite/ld-scripts/provide-8.d 2018-06-13 08:19:13.339563400 +0300
|
||||
@@ -1,7 +1,7 @@
|
||||
#source: provide-5.s
|
||||
#ld: -T provide-8.t
|
||||
#nm: -B
|
||||
-#xfail: x86_64-*-cygwin mmix-*-* sh-*-pe spu-*-*
|
||||
+#xfail: x86_64-*-cygwin x86_64-*-msys mmix-*-* sh-*-pe spu-*-*
|
||||
|
||||
#...
|
||||
0+4000 D __FOO
|
||||
diff -Naur binutils-2.30.orig/ld/testsuite/ld-scripts/script.exp binutils-2.30/ld/testsuite/ld-scripts/script.exp
|
||||
--- binutils-2.30.orig/ld/testsuite/ld-scripts/script.exp 2018-01-13 16:31:16.000000000 +0300
|
||||
+++ binutils-2.30/ld/testsuite/ld-scripts/script.exp 2018-06-13 08:19:13.339563400 +0300
|
||||
@@ -2332,3 +2399,144 @@ diff -Naur binutils-2.30.orig/zlib/configure binutils-2.30/zlib/configure
|
||||
lt_cv_dlopen="dlopen"
|
||||
lt_cv_dlopen_libs=
|
||||
;;
|
||||
--- binutils-2.34/libctf/configure.orig 2020-01-18 17:02:31.000000000 +0300
|
||||
+++ binutils-2.34/libctf/configure 2020-03-19 20:36:45.535998000 +0300
|
||||
@@ -5999,7 +5999,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,
|
||||
@@ -6341,7 +6341,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'
|
||||
@@ -6921,7 +6921,7 @@
|
||||
aix*)
|
||||
symcode='[BCDT]'
|
||||
;;
|
||||
-cygwin* | mingw* | pw32* | cegcc*)
|
||||
+cygwin* | msys* | mingw* | pw32* | cegcc*)
|
||||
symcode='[ABCDGISTW]'
|
||||
;;
|
||||
hpux*)
|
||||
@@ -8506,7 +8506,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
|
||||
@@ -8588,7 +8588,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'
|
||||
@@ -9050,7 +9050,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++.
|
||||
@@ -9165,7 +9165,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'
|
||||
@@ -9596,7 +9596,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
|
||||
@@ -10497,14 +10497,14 @@
|
||||
# libtool to hard-code these into programs
|
||||
;;
|
||||
|
||||
-cygwin* | mingw* | pw32* | cegcc*)
|
||||
+cygwin* | msys* | mingw* | pw32* | cegcc*)
|
||||
version_type=windows
|
||||
shrext_cmds=".dll"
|
||||
need_version=no
|
||||
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}`~
|
||||
@@ -10528,6 +10528,12 @@
|
||||
|
||||
sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
|
||||
;;
|
||||
+ msys*)
|
||||
+ # MSYS DLLs use 'cyg' 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}'
|
||||
@@ -11164,7 +11170,7 @@
|
||||
lt_cv_dlopen_libs=
|
||||
;;
|
||||
|
||||
- cygwin*)
|
||||
+ cygwin* | msys*)
|
||||
lt_cv_dlopen="dlopen"
|
||||
lt_cv_dlopen_libs=
|
||||
;;
|
||||
@@ -13195,6 +13201,12 @@
|
||||
BFD_LIBADD="-L`pwd`/../bfd -lbfd"
|
||||
;;
|
||||
|
||||
+ *-*-msys*)
|
||||
+ SHARED_LDFLAGS="-no-undefined"
|
||||
+ SHARED_LIBADD="-L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl -lmsys-2.0"
|
||||
+ BFD_LIBADD="-L`pwd`/../bfd -lbfd"
|
||||
+ ;;
|
||||
+
|
||||
*-*-darwin*)
|
||||
BFD_LIBADD="-Wl,`pwd`/../bfd/.libs/libbfd.dylib"
|
||||
BFD_DEPENDENCIES="../bfd/libbfd.la"
|
||||
--- binutils-2.34/libctf/configure.ac.orig 2020-03-19 20:39:09.663478400 +0300
|
||||
+++ binutils-2.34/libctf/configure.ac 2020-03-19 20:39:41.375811400 +0300
|
||||
@@ -188,6 +188,12 @@
|
||||
BFD_LIBADD="-L`pwd`/../bfd -lbfd"
|
||||
;;
|
||||
|
||||
+ *-*-msys*)
|
||||
+ SHARED_LDFLAGS="-no-undefined"
|
||||
+ SHARED_LIBADD="-L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl -lmsys-2.0"
|
||||
+ BFD_LIBADD="-L`pwd`/../bfd -lbfd"
|
||||
+ ;;
|
||||
+
|
||||
*-*-darwin*)
|
||||
BFD_LIBADD="-Wl,`pwd`/../bfd/.libs/libbfd.dylib"
|
||||
BFD_DEPENDENCIES="../bfd/libbfd.la"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
pkgname=binutils
|
||||
pkgver=2.34
|
||||
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/"
|
||||
@@ -18,7 +18,7 @@ source=(https://ftp.gnu.org/gnu/binutils/binutils-${pkgver}.tar.bz2
|
||||
0100-binutils-2.30-msys2.patch)
|
||||
sha256sums=('89f010078b6cf69c23c27897d686055ab89b198dddf819efb0a4f2c38a0b36e6'
|
||||
'604e76e0f702ced493ee22aa3c1768b4776b2008a7d70ae0dd35fe5be3522141'
|
||||
'0e4080a9a132e3e645e6f7b17a2db6b671d2139e7600c60176622aa78c6160bf')
|
||||
'21a5f835d8e9c1d7daba1ffb8369fce8e38be05949997c4039b5cb10d8589082')
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}"/binutils-${pkgver}
|
||||
|
||||
@@ -154,6 +154,8 @@ build() {
|
||||
# FIXME: --disable-libssp should suffice in GCC 8
|
||||
export gcc_cv_libc_provides_ssp=yes
|
||||
# libssp: conflicts with builtin SSP
|
||||
|
||||
export lt_cv_deplibs_check_method='pass_all'
|
||||
|
||||
${srcdir}/gcc-${pkgver}/configure \
|
||||
--build=${CHOST} \
|
||||
|
||||
Reference in New Issue
Block a user