The smallest possible ntpd, unoptimized - NTP

This is a discussion on The smallest possible ntpd, unoptimized - NTP ; I need help setting the configure and build options for ntp-4.2.4p3 on my old 486SX running NetBSD-3.1. I know I've pestered you about a year ago about this old piece of junk, and I even got some offers for free ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: The smallest possible ntpd, unoptimized

  1. The smallest possible ntpd, unoptimized

    I need help setting the configure and build options for ntp-4.2.4p3 on my
    old 486SX running NetBSD-3.1.

    I know I've pestered you about a year ago about this old piece of junk,
    and I even got some offers for free newer hardware. That's beside the
    point. I'd like to make this work. Right now, I'm stuck running ntpdate
    from a cron job to sync the clock. And as I've read here so many times,
    "ntpdate is deprecated". ;-)

    My goal is to produce the smallest program object to fit in the machine's
    limited memory, but I've determined that it cannot be compiled using the
    cc -O2 parameter. I've been told elsewhere, and can confirm, that this
    level of optimization on a 486SX will attempt to use the FPU's sqrt
    functions, which I obviously don't have (SX doesn't have an FPU; DX does).
    Building ntpd with -O2, which seems to be the build's default
    optimization, makes ntpd croak on my box.

    Is there a configuration switch that determines the compiler optimization?

    I don't need any refclocks, this box will poll time from my main server.
    So I can probably use ./configure --disable-all-clocks --disable-debug as
    a starting point. Any other tips?

    I'm a newbie to BSD, cc, linking, makefiles, configuring and building my
    own software, so please bear with me. I've looked at the help text for
    ../configure, but I've seen no options that seem to drive the -O parameter
    for the cc commands the build will be running.

    Thanks for any help.

    --
    Pierre Dubuc
    pldubuc@yahoo.ca

  2. Re: The smallest possible ntpd, unoptimized

    Pierre,

    You might have better luck using the normal -O flags and figuring out which
    math routines are needed, and then seeing if you can find some .s files that
    will implement them.

    Also, "configure CCFLAGS='-O whatever'" may be useful.
    --
    Harlan Stenn
    http://ntpforum.isc.org - be a member!

  3. Re: The smallest possible ntpd, unoptimized

    Replying to message

    > Date: Fri, 04 Jan 2008 20:32:50 +0000
    > From: Harlan Stenn
    > Newsgroups: comp.protocols.time.ntp
    > Subject: Re: The smallest possible ntpd, unoptimized
    >
    > Pierre,
    >
    > You might have better luck using the normal -O flags and figuring out which
    > math routines are needed, and then seeing if you can find some .s files that
    > will implement them.
    >
    > Also, "configure CCFLAGS='-O whatever'" may be useful.
    >




    Thanks for the advice, Harlan. It's working fine now.

    For reference, I used the following command:

    ../configure --disable-all-clocks --disable-debug CFLAGS='-O0'

    The resulting ntpd was 351897 bytes, which suits me fine.

    It seems -O0 is needed, at least for building the daemon, on NetBSD-i386
    on a 486SX.

    Case closed for me.

    --
    Pierre Dubuc
    pldubuc@yahoo.ca

  4. Re: The smallest possible ntpd, unoptimized

    Pierre Dubuc wrote:

    > It seems -O0 is needed, at least for building the daemon, on NetBSD-i386
    > on a 486SX.
    >
    > Case closed for me.
    >

    did you try the 386 specific flag:
    -msoft-float

    uwe

  5. Re: The smallest possible ntpd, unoptimized

    Replying to message

    > Date: Sat, 05 Jan 2008 18:08:43 +0100
    > From: Uwe Klein
    > Newsgroups: comp.protocols.time.ntp
    > Subject: Re: The smallest possible ntpd, unoptimized
    >
    > Pierre Dubuc wrote:
    >
    >> It seems -O0 is needed, at least for building the daemon, on NetBSD-i386 on
    >> a 486SX.
    >>
    >> Case closed for me.
    >>

    > did you try the 386 specific flag:
    > -msoft-float
    >
    > uwe
    >


    Indeed, this works as well, even with -O2 enabled. Thanks again...

    --
    Pierre Dubuc
    pldubuc@yahoo.ca

+ Reply to Thread