All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ni Qingliang <niqingliang@insigma.com.cn>
To: McClintock Matthew-B29882 <B29882@freescale.com>
Cc: "yocto@yoctoproject.org" <yocto@yoctoproject.org>
Subject: Re: ntpclient compile fail
Date: Wed, 28 Sep 2011 09:00:32 +0800	[thread overview]
Message-ID: <1317171633.6536.86.camel@localhost.localdomain> (raw)
In-Reply-To: <CAEsOVNc84ON5Oxri1=eAHG74NGT9B14QYUDs8JXa9KhrG0XaSw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 855 bytes --]

Thanks!

the attachement is the bb file and Makefile(modified),

after 'override' CFLAGS/LDFLAGS in Makefile, I have added
override LDFLAGS += -Wl,--no-as-needed
in the Makefile to neutralize the '-Wl,--as-needed' in the original
LDFLAGS.

and then the world clear.

On Tue, 2011-09-27 at 23:46 +0800, McClintock Matthew-B29882 wrote:
> On Mon, Sep 26, 2011 at 10:18 PM, Ni Qingliang
> <niqingliang@insigma.com.cn> 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.
> 
> If the CFLAGS are not taking effect from the Makefile are you over
> ridding the value in the recipe? Can you point us at a copy of the
> recipe you are using?
> 
> -M

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


[-- Attachment #2: ntpclient.bb --]
[-- Type: text/plain, Size: 490 bytes --]

DESCRIPTION = "ntpclient"
SECTION = "iotproduct"
LICENSE = "Google"
LIC_FILES_CHKSUM = "file://README;md5=098a6a289094e42f974b11e2151f5644"
PR = "r0"
PV = "2010_365"


SRC_URI = "http://doolittle.icarus.com/ntpclient/ntpclient_${PV}.tar.gz \
           file://Makefile"

S = "${WORKDIR}/${PN}-2010"

do_patch () {
	cp -f ${WORKDIR}/Makefile ${S}/
}

do_compile () {
	oe_runmake
}

do_install () {
	install -d ${D}/bin/
	install -m 0755 ${S}/ntpclient ${D}/bin/
}


[-- Attachment #3: Makefile --]
[-- Type: text/x-makefile, Size: 1053 bytes --]

# A long time ago, far, far away, under Solaris, you needed to
#    CFLAGS += -xO2 -Xc
#    LDLIBS += -lnsl -lsocket
# To cross-compile
#    CC = arm-linux-gcc
# To check for lint
#    CFLAGS += -Wpointer-arith -Wcast-align -Wcast-qual -Wshadow -Wundef \
#     -Waggregate-return -Wnested-externs -Winline -Wwrite-strings -Wstrict-prototypes

# This is old-school networking code, making the traditional cast between
# struct sockaddr* and struct sockaddr_in*.  Thus a modern gcc needs:
override CFLAGS += -fno-strict-aliasing

override CFLAGS += -std=c89
override CFLAGS += -W -Wall
override CFLAGS += -O2
# CFLAGS += -DPRECISION_SIOCGSTAMP
override CFLAGS += -DENABLE_DEBUG
override CFLAGS += -DENABLE_REPLAY
# CFLAGS += -DUSE_OBSOLETE_GETTIMEOFDAY

override LDFLAGS += -Wl,--no-as-needed
override LDFLAGS += -Wl,-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

  reply	other threads:[~2011-09-28  1:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-27  3:18 ntpclient compile fail Ni Qingliang
2011-09-27  3:50 ` Ni Qingliang
2011-09-27 15:46 ` McClintock Matthew-B29882
2011-09-28  1:00   ` Ni Qingliang [this message]
2011-09-28  1:50     ` McClintock Matthew-B29882
2011-09-28  2:04       ` Ni Qingliang
2011-09-28  2:12         ` McClintock Matthew-B29882
2011-09-28  2:33           ` Ni Qingliang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1317171633.6536.86.camel@localhost.localdomain \
    --to=niqingliang@insigma.com.cn \
    --cc=B29882@freescale.com \
    --cc=yocto@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.