mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Christopher Meng <cickumqt@gmail.com>
To: musl@lists.openwall.com
Subject: -fno-stack-protector and musl
Date: Mon, 21 Oct 2013 23:20:06 +0800	[thread overview]
Message-ID: <CAHcXnBGZ5vLvOXNRHC9xuMd2KMmv_09G3pjKgDSPpQNtCfVO9g@mail.gmail.com> (raw)

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


             reply	other threads:[~2013-10-21 15:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-21 15:20 Christopher Meng [this message]
2013-10-21 15:32 ` Rich Felker
2013-10-21 15:39   ` Christopher Meng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAHcXnBGZ5vLvOXNRHC9xuMd2KMmv_09G3pjKgDSPpQNtCfVO9g@mail.gmail.com \
    --to=cickumqt@gmail.com \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).