During configure step of package -lcurses requirement for -lreadline isn't picked up, leading to failure when first trying to run a conftest step linked against libreadline (checking size of signed char). This is caused by moving an error message from the compile to the dynamic link step; without hardened-gcc, gcc -o conftest -g -O2 -Wall -Wcast-qual -Wmissing-prototypes -Wshadow - Wstrict-prototypes -pipe conftest.c -lreadline will trigger an error (missing symbols from -lncurses) with hardened-gcc, compilation works and the error comes up on execution - which the config script doesn't check. Workaround with -yet_exec obviously works, but ntp is one of the program where I'd definitely want the full range of protections to be active. Thanks for your efforts, Martin
you can put -yet_exec as CFLAGS for the configure run and later run find ${W} -name "Makefile" -exec sed -i "s,-yet_exec,," {} \; before the actual emake is triggered. this will give configure the right feeling while still proving the ntpd and ntpdate binary to run as etdyn :-) test it out and give me feedback please, thanks, Alex
Yep, workaround produces the expected result [i.e a working etdyn ntpd]. Thanks, Martin
configure logic added to ebuild src_compile() { cp configure{,.orig} sed -i "s:-Wpointer-arith::" configure # http://www.gentoo.org/proj/en/hardened/etdyn-ssp.xml has_version 'sys-devel/hardened-gcc' && CFLAGS="-yet_exec ${CFLAGS}" econf \ --build=${CHOST} \ `use_enable parse-clocks` \ || die has_version 'sys-devel/hardened-gcc' && find ${W} -name "Makefile" -type f -exec sed -i "s,-yet_exec,," {} \; emake || die }
added configure exclusion for hardened-gcc that will be taken out later in the ebuild for proper etdyn building