[yocto] ntpclient compile fail

Ni Qingliang niqingliang at insigma.com.cn
Mon Sep 26 20:50:11 PDT 2011


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 at insigma.com.cn
> http://niqingliang2003.wordpress.com
> 
> 
> _______________________________________________
> yocto mailing list
> yocto at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto

-- 
Yi Qingliang
niqingliang at insigma.com.cn
http://niqingliang2003.wordpress.com





More information about the yocto mailing list