Web lists-archives.com

Re: Segmentation fault with binutils 2.28.1




On 04/10/2017 04:52, 叶雨飞 wrote:
Guys,

If someone could show me some instructions on how to build and release
binutils for CYGWIN, I'm happy to do it this week.

Cheers.

Hi 叶雨飞,
only the maintainer can release it.

However to see how to build and test it, the easy way
is to download the cygwin source package
   mingw64-x86_64-binutils-2.28.1.12c1f20d-1-src.tar.xz
using setup or directly from a mirror.

The file contains the upstream source used for the build,
a patch and the cygport file.

$ tar -tf mingw64-x86_64-binutils-2.28.1.12c1f20d-1-src.tar.xz
mingw64-x86_64-binutils-2.28.1.12c1f20d-1.src/
mingw64-x86_64-binutils-2.28.1.12c1f20d-1.src/binutils-gdb-2.28.1.12c1f20d.tar.bz2
mingw64-x86_64-binutils-2.28.1.12c1f20d-1.src/config-rpath.patch
mingw64-x86_64-binutils-2.28.1.12c1f20d-1.src/mingw64-x86_64-binutils.cygport


cygport is the standard method for building and maintaining packages for
the Cygwin distribution.
https://sourceware.org/ml/cygwin-announce/2017-05/msg00042.html

Attached for your convenience the same patch and the modified
mingw64-x86_64-binutils.cygport for 2.19.1.

Assuming you have cygport and all the needed tools and libraries,
these commands will download the upstream source file and
build the full cygwin package

$ cygport mingw64-x86_64-binutils.cygport download
$ cygport mingw64-x86_64-binutils.cygport almostall

The build took ~ 1 hour on my PC.
I have not yet tested it.

Regards
Marco
--- a/config.rpath	2008-03-13 14:27:44.000000000 -0500
+++ b/config.rpath	2010-07-11 23:30:45.209832800 -0500
@@ -441,7 +441,7 @@ case "$host_os" in
   bsdi4*)
     ;;
   cygwin* | mingw* | pw32*)
-    shrext=.dll
+    shrext=.dll.a
     ;;
   darwin* | rhapsody*)
     shrext=.dylib
TOOLCHAIN_TARGET="x86_64-w64-mingw32"
ORIG_PN="binutils"
#GIT_URI=git://sourceware.org/git/binutils-gdb.git
#GIT_REV=12c1f20d6fba9dce0011f3ad11a7de60f7df4a7f
#GIT_BRANCH=master

#inherit toolchain git
inherit toolchain 

DESCRIPTION="Binutils for MinGW-w64 Win64 toolchain"
HOMEPAGE="http://mingw-w64.sourceforge.net/";

NAME="mingw64-x86_64-binutils"
VERSION=2.29.1
RELEASE=1
CATEGORY="Devel"

SUMMARY="The GNU Binutils are a collection of binary tools. This package is capable of targeting win64."

#case ${PV[3]} in
#[5-9][0-9])
#	SRC_URI="ftp://sourceware.org/pub/binutils/snapshots/binutils-${PV}.tar.bz2"; ;;
#*)	SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.bz2" ;;
SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.lz" 
#esac
PATCH_URI="config-rpath.patch"

# Avoid strange failures
MAKEOPTS=-j1

CYGCONF_ARGS="
	--disable-gdb
"

src_install() {
	cd ${B}
	cyginstall

	# conflicts with native binutils
	rm -fr ${D}/usr/share/{info,locale}/
	rm -rf ${D}/usr/share/man/man1/gdb*
	rm -rf ${D}/usr/share/man/man5/gdb*
	#rm -rf ${D}/usr/share/gdb
	#rm -rf ${D}/usr/include/gdb
}

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple