From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/4138 Path: news.gmane.org!not-for-mail From: Christopher Meng Newsgroups: gmane.linux.lib.musl.general Subject: -fno-stack-protector and musl Date: Mon, 21 Oct 2013 23:20:06 +0800 Message-ID: Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1382368854 934 80.91.229.3 (21 Oct 2013 15:20:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2013 15:20:54 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-4142-gllmg-musl=m.gmane.org@lists.openwall.com Mon Oct 21 17:20:59 2013 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1VYHHv-0000zN-J1 for gllmg-musl@plane.gmane.org; Mon, 21 Oct 2013 17:20:59 +0200 Original-Received: (qmail 16251 invoked by uid 550); 21 Oct 2013 15:20:58 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 16240 invoked from network); 21 Oct 2013 15:20:58 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=w1GLUfoZYGzl1WF/KkHUdvVmTZUV1a+7qsL+4zpV6oE=; b=IAFFBdbA/hIJBLh2Gcl/wToeT5QV2o6Am1DckPcUY66WjEmGWYy8buPXN4tm0e3oSC tJOcMPPnfOKfFXg4qqrKGxImr+ZNje0eLGt6nAIqSZTa0lg/SiGfO+u9Yyg7ILnnlsxr qIAZzNz4wm3Qy+ldgfn2DD5e62mLfqhjfsLlr0u/Mfdyd/kiPvaZgUDvPSgBFktjJZLv eFzwJ/emx518eR861lsJed3AozfxRMz+WV0GfMzd6XBwjUx99zWgrj42ifqox6hp5F9N GyyWyhmShPjGY8rtFZfqjS12roLCsevxg3zM/Ekvi5sFVz8OT62oZYUpZTlhQXLUl23J UfOw== X-Received: by 10.180.101.197 with SMTP id fi5mr10366754wib.46.1382368846563; Mon, 21 Oct 2013 08:20:46 -0700 (PDT) Xref: news.gmane.org gmane.linux.lib.musl.general:4138 Archived-At: Hi all, I'm going to package this c lib into Fedora for skalibs. However Fedora forces us to package every pkg with optflags inserted: [rpmaker@fab SPECS]$ rpm -E %{optflags} -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables Which caused errors during linking: src/aio/aio_readwrite.lo: In function `new_req': /home/rpmaker/rpmbuild/BUILD/musl-0.9.14/src/aio/aio_readwrite.c:95: undefined reference to `__stack_chk_fail_local' src/aio/aio_readwrite.lo: In function `io_thread': /home/rpmaker/rpmbuild/BUILD/musl-0.9.14/src/aio/aio_readwrite.c:64: undefined reference to `__stack_chk_fail_local' src/aio/aio_suspend.lo: In function `aio_suspend': /home/rpmaker/rpmbuild/BUILD/musl-0.9.14/src/aio/aio_suspend.c:57: undefined reference to `__stack_chk_fail_local' src/aio/lio_listio.lo: In function `wait_thread': /home/rpmaker/rpmbuild/BUILD/musl-0.9.14/src/aio/lio_listio.c:68: undefined reference to `__stack_chk_fail_local' src/aio/lio_listio.lo: In function `lio_listio': /home/rpmaker/rpmbuild/BUILD/musl-0.9.14/src/aio/lio_listio.c:142: undefined reference to `__stack_chk_fail_local' src/complex/__cexp.lo:/home/rpmaker/rpmbuild/BUILD/musl-0.9.14/src/complex/__cexp.c:87: more undefined references to `__stack_chk_fail_local' follow collect2: error: ld returned 1 exit status make: *** [lib/libc.so] Error 1 error: Bad exit status from /var/tmp/rpm-tmp.KSavLI (%build) undefined reference to `__stack_chk_fail_local' is a well-known problem related to stack protector. I know the solution is to change it to: -fno-stack-protector, however this will violate packaging guidelines. Any help? Thanks. PS: gcc-go-4.8.2-1.fc21.i686 glibc-2.18.90-11.fc21.i686 gcc-c++-4.8.2-1.fc21.i686 glibc-common-2.18.90-11.fc21.i686 glibc-headers-2.18.90-11.fc21.i686 gcc-objc-4.8.2-1.fc21.i686 glibc-devel-2.18.90-11.fc21.i686 libgcc-4.8.2-1.fc21.i686 gcc-4.8.2-1.fc21.i686 gcc-gfortran-4.8.2-1.fc21.i686 Yours sincerely, Christopher Meng Always playing in Fedora Project http://cicku.me