-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
i486 toolchain (and maybe others) fail with -fPIE -fstack-protector-all #45
Comments
I've tested x86_64, mips, arm (hardfloat, v7a), and i486 with current git master (09bb1b9). Only i486 seems to have this compile-time issue. I have not tested that the resulting binaries actually run. For example, on the mips output, readelf shows:
I assume this is the desired result |
OK, the patch SEEMS harmless. ssp_nonshared shouldn't hurt if no-stack-protector is used, since it doesn't actually pull in anything fingers crossed. As such I've integrated the Alpine patch directly. Revision c57e607a5a5d of musl-cross. |
No, cancel that. I wasn't doing a full bootstrapping build to test (I already had the target directory filled). This patch breaks bootstrapping. This... is frustrating :). In the interest of getting something released, I'm just going to revoke the patch for 1.1.6. Reinvestigation required later. |
this causes the cross-build to fail on i386 due to GregorR/musl-cross#45 additionally it's against sabotage's philosophy that the user makes the decision which CFLAGS are added and which not, and not the software author. the user can still add -fstack-protector-all to his CFLAGS in his /etc/butch-optflags.sh if he wants to.
this patch https://github.com/sabotage-linux/sabotage/blob/master/KEEP/gcc474-libssp_nonshared.patch doesn't break bootstrapping |
While it does not break bootstrapping it introduces a bug where static linking fails with stack-protector. I am investigating. |
With this and sabotage's musl patched I can bootstrap the cross-toolchain and build every package in sabotage stage1 with stack-protector-all, except gcc4.7.4 where I need to disable stack-protector entirely. |
the libressl issue can be fixed by adding -lssp_nonshared to LDFLAGS. investigating further. |
fixes GregorR#45 the gcc patch is from https://gcc.gnu.org/ml/gcc/2012-01/msg00012.html
Any conclusions? |
Oh, probably in that other ticket :) |
this alloms musl-cross compiler to be built with ssp support. together with a patch in musl upstream (not in any stable release yet) http://git.musl-libc.org/cgit/musl/commit/?id=55d061f031085f24d138664c897791aebe9a2fab this fixes GregorR/musl-cross#51 and GregorR/musl-cross#45
and now at a third location too |
this alloms musl-cross compiler to be built with ssp support. together with a patch in musl upstream (not in any stable release yet) http://git.musl-libc.org/cgit/musl/commit/?id=55d061f031085f24d138664c897791aebe9a2fab this fixes GregorR/musl-cross#51 and GregorR/musl-cross#45
I like to spread the issue around :) |
test.c
interestingly, the gcc build is aware of the need of libssp_nonshared.a and creates it from ssp-local.c, and it even installs it into lib/.
however, it fails to add it to its linker invocation when it's needed.
works.
alpine linux uses the following patch for the same issue:
http://git.alpinelinux.org/cgit/aports/tree/main/gcc/gcc-4.8-musl-libssp.patch
The text was updated successfully, but these errors were encountered: