Re: ntpclient compile fail


niqingliang
 

I have added "override" in the head of every CFLAGS/LDFLAGS line, but
error still there.

the link order is a common problem.
-Wl,-lrt ntpclient.o phaselock.o -o ntpclient
should be
ntpclient.o phaselock.o -Wl,-lrt ntpclient

Does poky have some option or some solution for that?
(I build it success on host.)

On Tue, 2011-09-27 at 11:18 +0800, Ni Qingliang wrote:
Hello:
I'm adding ntpclient into my distro.

but build fail, reason is the CFLAGS/LDFLAGS in it's Makefile didn't
take effect.

What can I do?

the original makefile is:
CFLAGS += -fno-strict-aliasing
CFLAGS += -std=c89
CFLAGS += -W -Wall
CFLAGS += -O2
CFLAGS += -DENABLE_DEBUG
CFLAGS += -DENABLE_REPLAY

LDFLAGS += -lrt

all: ntpclient

test: ntpclient
./ntpclient -d -r <test.dat

ntpclient: ntpclient.o phaselock.o

ntpclient.o phaselock.o: ntpclient.h

adjtimex: adjtimex.o

clean:
rm -f ntpclient adjtimex *.o

--
Yi Qingliang
niqingliang@...
http://niqingliang2003.wordpress.com


_______________________________________________
yocto mailing list
yocto@...
https://lists.yoctoproject.org/listinfo/yocto
--
Yi Qingliang
niqingliang@...
http://niqingliang2003.wordpress.com

Join yocto@lists.yoctoproject.org to automatically receive all group messages.