Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHcXnBGZ5vLvOXNRHC9xuMd2KMmv_09G3pjKgDSPpQNtCfVO9g@mail.gmail.com>
Date: Mon, 21 Oct 2013 23:20:06 +0800
From: Christopher Meng <cickumqt@...il.com>
To: musl@...ts.openwall.com
Subject: -fno-stack-protector and musl

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

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.