Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 28673 - hardened-gcc fails to build net-misc/ntp-4.1.1b-r6
Summary: hardened-gcc fails to build net-misc/ntp-4.1.1b-r6
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GCC Porting (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Alexander Gabert (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-09-14 00:54 UTC by Martin bene
Modified: 2003-09-26 12:01 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin bene 2003-09-14 00:54:06 UTC
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
Comment 1 Alexander Gabert (RETIRED) gentoo-dev 2003-09-14 03:16:54 UTC
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
Comment 2 Martin bene 2003-09-14 06:42:14 UTC
Yep, workaround produces the expected result [i.e a working etdyn ntpd].

Thanks, Martin
Comment 3 Alexander Gabert (RETIRED) gentoo-dev 2003-09-20 12:33:27 UTC
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
}
Comment 4 Alexander Gabert (RETIRED) gentoo-dev 2003-09-26 12:01:48 UTC
added configure exclusion for hardened-gcc that will be taken out later in
the ebuild for proper etdyn building