X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type; q=dns; s=default; b=q/KS kH3Xn5+w9hQUfqQ7TSLukYo0eHYw5NF/U6OEgQs700MZk8gSVJBnwCDn3+rGUAUI TJaERDVZjz8flLfLhXf+hcz/ka4WpxrlIhI+R7lStMFZh3Atw/oL1Ok6ODURc9Xg RGe7IWLyH9c1P93xbSfYK/fqONIA8E0rHlCVDCg= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type; s=default; bh=Vix7A2L2CA Vn5B8TJJOVZgcKgDQ=; b=cxSOvbRMNU6ZfZ9GzaHSkYsgmr6NtwZuPE6oEjjwD0 nGdG24ihZcDeW7pl0PAVxCc0Ipuif6/BfltGxmi5Tllso3/PWR0luRxgC45gfTZ2 JFidA6Vo3n9Rg8w0thWB83irSaZY4oFi/y9fPBnSRM/3XvGMyg2fEE1LJud4h88G E= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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 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 AT cygwin DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 8109A4E909 Subject: Re: i686-w64-mingw32-gcc -fstack-protector-strong To: cygwin AT cygwin DOT com References: <80ff03da-8e78-f52a-00ad-cf601bbf4e49 AT gmail DOT com> <75eecba1-f968-a596-778f-77bbd8bb5c59 AT gmail DOT com> From: Yaakov Selkowitz Message-ID: <4a702e1e-5ce1-175f-ca52-088dd21ef905@cygwin.com> Date: Fri, 8 Sep 2017 17:34:00 -0500 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 --dowax2SEFWUFW6aO0kK66133etRKlcSid Content-Type: multipart/mixed; boundary="2MCNIiWJtv1KRldAksTdTTJTqm08SSOtv"; protected-headers="v1" From: Yaakov Selkowitz To: cygwin AT cygwin DOT com Message-ID: <4a702e1e-5ce1-175f-ca52-088dd21ef905 AT cygwin DOT com> Subject: Re: i686-w64-mingw32-gcc -fstack-protector-strong References: <80ff03da-8e78-f52a-00ad-cf601bbf4e49 AT gmail DOT com> <75eecba1-f968-a596-778f-77bbd8bb5c59 AT gmail DOT com> In-Reply-To: --2MCNIiWJtv1KRldAksTdTTJTqm08SSOtv Content-Type: text/plain; charset=utf-8 Content-Language: en-CA Content-Transfer-Encoding: quoted-printable 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" -----BEGIN PGP SIGNATURE----- iHQEARECADQWIQRFYAu5jKh4qpenARn/IK+aZu4flAUCWbMa2BYceXNlbGtvd2l0 ekBjeWd3aW4uY29tAAoJEP8gr5pm7h+US0YAn2Hg7KkZliMbNATisP/bLG8qkDO1 AJ9ogdbSNVsGWSuiHVc+Gzuzij3Zjw== =jCTT -----END PGP SIGNATURE----- --dowax2SEFWUFW6aO0kK66133etRKlcSid--