[ntp:questions] Makefile - Add Option

Aggie c.kevin.lam at gmail.com
Tue Oct 2 17:20:36 UTC 2007

After I "make" the ntpd, I found out the executable generated from
"make" can't handle datatype double. Whenever I printf or do any
caculation with double, ntpd will hang.

Then I wrote a simple hello world program to printf double, it also
hangs with regular gcc command.

For example:

#include <stdio.h>
int testmain()
  printf("%f\n", 0.1);
  return 0;

If i compile with this command: gcc -nostdlib -mtune=405 -DCPU=PPC405 -
D_WRS_KERNEL -IC:/WindRiver/vxworks-6.4/target/h -c test.c -o test.o
it will print "hello" on the terminal, but hang at the line where it
tried to print "0.1"

Then I compiled the same program with this command:
gcc -nostdlib -mtube=405 -DCPU=PPC405 -D_WRS_KERNEL -mstrict-align -
msoft-float -mlongcall -IC:/WindRiver/vxworks-6.4/target/h -c test.c -
o test.o

I was able to print out "hello0.10000" and exit the program properly.
Now I believe I need to add -mstrict-align -msoft-float -mlongcall to
the makefile in order to use double.

But I have look throught Makefile.am and makefile.in, I have no clue
where I can add these options.

Any suggestion/advice will help. Thanks.

More information about the questions mailing list