xo ip n00b
Joined: 06 Nov 2024 Posts: 2
|
Posted: Wed Nov 06, 2024 3:17 pm Post subject: elfutils error thread support required - musl llvm hardened |
|
|
hello gentoo community,
i'm using stage3-amd64-musl-llvm-20241027T164832Z.tar.xz for installation and update it today, add manual the following to make.conf (enable hardening flags):
Code: | WARNING_FLAGS="-Werror=odr -Werror=strict-aliasing"
HARDENING_CFLAGS="-fPIC -fPIE -fstack-clash-protection -fstack-protector-strong -fcf-protection=full -D_FORTIFY_SOURCE=2"
HARDENING_LDFLAGS="-Wl,-z,relro,-z,now -pie"
COMMON_FLAGS="-march=native -O2 -pipe -flto=thin ${WARNING_FLAGS}"
CFLAGS="${COMMON_FLAGS} ${HARDENING_CFLAGS}"
CXXFLAGS="${COMMON_FLAGS} ${HARDENING_CFLAGS}"
LDFLAGS="${LDFLAGS} -Wl,-O2 -Wl,--as-needed ${HARDENING_LDFLAGS}" |
Then i recompile the whole system with: Code: | emerge -e --ask --update --newuse --with-bdeps=y --quiet --deep @world |
One program failed: dev-libs/elfutils with the following error:
Code: | configure: error: __thread support required |
I then try nopie and nossp to /etc/portage/package.env from here: https://wiki.gentoo.org/wiki/Hardened_Gentoo for just elfutils.
But it's still failed but when i remove all the ${WARNING_FLAGS} ${HARDENING_CFLAGS} ${HARDENING_LDFLAGS} from make.conf like just use:
Code: | CFLAGS="${COMMON_FLAGS}"
CXXFLAGS="${COMMON_FLAGS}"
LDFLAGS="${LDFLAGS} -Wl,-O2 -Wl,--as-needed" | it works.
So what i have to add to another /etc/portage/env/unknown to make it just work for dev-libs/elfutils ? |
|