From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13155 invoked by alias); 8 Sep 2017 22:34:05 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 12973 invoked by uid 89); 8 Sep 2017 22:34:04 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.0 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS autolearn=no version=3.3.2 spammy=H*M:cygwin, HAuthentication-Results:cygwin.com, H*c:application X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 08 Sep 2017 22:34:03 +0000 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8109A4E909 for ; Fri, 8 Sep 2017 22:34:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 8109A4E909 Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=cygwin.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=none smtp.mailfrom=yselkowitz@cygwin.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 8109A4E909 Received: from [10.10.120.37] (ovpn-120-37.rdu2.redhat.com [10.10.120.37]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 379CB5D6A3 for ; Fri, 8 Sep 2017 22:34:02 +0000 (UTC) Subject: Re: i686-w64-mingw32-gcc -fstack-protector-strong To: cygwin@cygwin.com References: <80ff03da-8e78-f52a-00ad-cf601bbf4e49@gmail.com> <75eecba1-f968-a596-778f-77bbd8bb5c59@gmail.com> From: Yaakov Selkowitz Message-ID: <4a702e1e-5ce1-175f-ca52-088dd21ef905@cygwin.com> Date: Fri, 08 Sep 2017 22:34:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="dowax2SEFWUFW6aO0kK66133etRKlcSid" X-IsSubscribed: yes X-SW-Source: 2017-09/txt/msg00103.txt.bz2 --dowax2SEFWUFW6aO0kK66133etRKlcSid Content-Type: multipart/mixed; boundary="2MCNIiWJtv1KRldAksTdTTJTqm08SSOtv"; protected-headers="v1" From: Yaakov Selkowitz To: cygwin@cygwin.com Message-ID: <4a702e1e-5ce1-175f-ca52-088dd21ef905@cygwin.com> Subject: Re: i686-w64-mingw32-gcc -fstack-protector-strong References: <80ff03da-8e78-f52a-00ad-cf601bbf4e49@gmail.com> <75eecba1-f968-a596-778f-77bbd8bb5c59@gmail.com> In-Reply-To: --2MCNIiWJtv1KRldAksTdTTJTqm08SSOtv Content-Type: text/plain; charset=utf-8 Content-Language: en-CA Content-Transfer-Encoding: quoted-printable Content-length: 1157 On 2017-09-08 16:08, Lee wrote: > $ i686-w64-mingw32-gcc --version > i686-w64-mingw32-gcc (GCC) 6.3.0 > Copyright (C) 2016 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOS= E. >=20 > $ i686-w64-mingw32-gcc -fstack-protector-strong -o div.exe div.c > $ ./div.exe > C:/cygwin/home/Lee/t/div.exe: error while loading shared libraries: ?: > cannot open shared object file: No such file or directory > $ objdump -x ./div.exe | egrep -i "dll name" > DLL Name: KERNEL32.dll > DLL Name: msvcrt.dll > DLL Name: libssp-0.dll > $ ls -l /usr/i686-w64-mingw32/sys-root/mingw/bin/libssp-0.dll > -rwxr-xr-x 1 root None 14336 Aug 17 08:26 > /usr/i686-w64-mingw32/sys-root/mingw/bin/libssp-0.dll You created a MinGW executable which depends on other MinGW DLLs. Therefore, either you have to tell it where to find its dependencies: PATH=3D"$(cygpath -S):$(cygpath -W):/usr/i686-w64-mingw32/sys-root/mingw/bin:$PATH" \ ./div.exe Or, since you're only using GCC's libraries, just link with -static. --=20 Yaakov --2MCNIiWJtv1KRldAksTdTTJTqm08SSOtv-- --dowax2SEFWUFW6aO0kK66133etRKlcSid Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" Content-length: 228 -----BEGIN PGP SIGNATURE----- iHQEARECADQWIQRFYAu5jKh4qpenARn/IK+aZu4flAUCWbMa2BYceXNlbGtvd2l0 ekBjeWd3aW4uY29tAAoJEP8gr5pm7h+US0YAn2Hg7KkZliMbNATisP/bLG8qkDO1 AJ9ogdbSNVsGWSuiHVc+Gzuzij3Zjw== =jCTT -----END PGP SIGNATURE----- --dowax2SEFWUFW6aO0kK66133etRKlcSid--