-
Notifications
You must be signed in to change notification settings - Fork 270
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
Build fails with -fstack-protector-* in target CFLAGS #84
Comments
some how I try rebuild fresh again, not get stop error. |
What's happening contrary to your expectation? Apparently the program you're compiling has one or more bugs leading to invalid memory access. |
First time I try with After I clear every thing and rebuild, the configure pass but the example I create from fist |
As an aside, some options in your build are definitely broken/invalid, like Also the flags you're passing via |
It looks like this particular case is not presently caught in musl's build process, which is an oversight; I'll fix it. But you really need to remove those options. They will badly break lots of code including code that does not use long double at all (at least |
Back to your crash, are you saying that the crashing program is a test that one of the configure scripts is running during build? Can you show which one it is? It looks to me like it's a program you're trying to compile yourself so I'm confused. |
It is the configure scripts for zlib from
Thanks for the explain.
I just want to make sure the target lib XLD = -s
XARCH = -march=x86-64 -mtune=generic
XFLAG = -g0 -O3 -mlong-double-64 -fno-plt -DNDEBUG -fomit-frame-pointer -m64
XCPU = -mmmx -msse -msse2 -msse3 -msse4 -msse4.1 -msse4.2 -maes -mavx
XSSP = -fstack-protector-strong
XMUSL = "${XARCH} ${XFLAG} ${XCPU} ${XSSP}"
COMMON_CONFIG += --disable-nls --disable-lto
GCC_CONFIG += --disable-libquadmath --disable-decimal-float --disable-libitm --disable-fixed-point
GCC_CONFIG += --disable-multilib
GCC_CONFIG += --disable-shared
GCC_CONFIG += --enable-static
GCC_CONFIG += --enable-ld
GCC_CONFIG += --enable-default-pie --enable-static-pie
GCC_CONFIG += --enable-libssp --enable-default-ssp
GCC_CONFIG += --with-isl
GCC_CONFIG_FOR_TARGET += CFLAGS="${XMUSL}" CXXFLAGS="${XARCH} ${XMUSL}" LDFLAGS="${XLD}"
MUSL_CONFIG += CFLAGS="${XMUSL}" CXXFLAGS="${XARCH} ${XMUSL}" LDFLAGS="${XLD}"
MUSL_CONFIG += --enable-optimize=yes --disable-shared |
and one more question , the musl-cross-make generate static pie binary for me checksec -f sapi/cli/php
RELRO STACK CANARY NX PIE RPATH RUNPATH Symbols FORTIFY Fortified Fortifiable FILE
Full RELRO Canary found NX enabled PIE enabled No RPATH No RUNPATH 79864 Symbols but after I checksec -f sapi/cli/php
RELRO STACK CANARY NX PIE RPATH RUNPATH Symbols FORTIFY Fortified Fortifiable FILE
Full RELRO No canary found NX enabled PIE enabled No RPATH No RUNPATH No Symbols No 0 0 sapi/cli/php I think |
In addition this:
should be:
|
Re: |
I adjust it to this and rebuild, hope every things work. COMMON_CONFIG += --disable-nls --disable-lto
GCC_CONFIG += --disable-libquadmath --disable-decimal-float --disable-libitm --disable-fixed-point
GCC_CONFIG += --disable-multilib
GCC_CONFIG += --disable-shared
GCC_CONFIG += --enable-static
GCC_CONFIG += --enable-ld
GCC_CONFIG += --enable-default-pie --enable-static-pie
GCC_CONFIG += --enable-libssp --enable-default-ssp
GCC_CONFIG += --with-isl
XLD = -s
XCC = -march=x86-64 -mtune=generic -g0 -O3 -fno-plt -DNDEBUG -fomit-frame-pointer -m64 -mmmx -msse -msse2 -msse3 -msse4 -msse4.1 -msse4.2 -maes -mavx -fstack-protector-strong
GCC_CONFIG_FOR_TARGET += CFLAGS_FOR_TARGET="${XCC}" CXXFLAGS_FOR_TARGET="${XCC}" LDFLAGS_FOR_TARGET="${XLD}"
MUSL_CONFIG += CFLAGS="${XCC}" CXXFLAGS="${XCC}" LDFLAGS="${XLD}"
MUSL_CONFIG += --enable-optimize=yes --disable-shared |
The build stop at step I need remove |
I'm not sure GCC supports building its own target libs with |
I will do it tomorrow, I guess add with my last post |
I'm trying a run with just |
Indeed, I can reproduce this. I think building gcc target libs with For musl, you can use I will try to improve this in a future version but for now I think you should just remove the option (from gcc target libs; you can keep it for musl). |
I confirm |
today I start use
GCC_CONFIG += --enable-libssp
.gdb:
my
config.mk
I also try remove
--enable-default-ssp, add
-g0 -O3`, get same errorThe text was updated successfully, but these errors were encountered: