From: John Kacur <jkacur@redhat.com>
To: leemgs1@gmail.com
Cc: williams <williams@redhat.com>,
linux-rt-users <linux-rt-users@vger.kernel.org>,
tglx <tglx@linutronix.de>
Subject: Re: [PATCH]cyclictest: CFLAGS to support static compiliation with ARM Crosscompiler
Date: Thu, 21 Jan 2010 01:40:35 +0100 [thread overview]
Message-ID: <520f0cf11001201640r4f1cf00ew3b4a4e9424c28602@mail.gmail.com> (raw)
In-Reply-To: <1264032570.2121.4.camel@centos51>
On Thu, Jan 21, 2010 at 1:09 AM, GeunSik Lim <leemgs1@gmail.com> wrote:
>
> Dear williams,
>
> This patch is for support static building using cross-compiler for
> embedded targetboard like ARM.
> When we use -static option for static binary on embedded board after
> patch.
> I tested various toolchain.(e.g: codesourcery toolchain , my self
> toolchain , cross-tool project's toolchain)
> Ref) Don't forget "-static" configuration(CFLAGS += -O2 -static) in
> Makefile When you need static linking.
>
> Before patch)
> /usr/local/arm_v7_vfp_le/bin/../target/usr/lib/librt.a(timer_create.o):
> In function `timer_create':
> /home/build/BUILD/glibc-2.5.90/rt/../nptl/sysdeps/unix/sysv/linux/timer_create.c:174: undefined reference to `pthread_attr_init'
> /home/build/BUILD/glibc-2.5.90/rt/../nptl/sysdeps/unix/sysv/linux/timer_create.c:192: undefined reference to `pthread_attr_setdetachstate'
> /usr/local/arm_v7_vfp_le/bin/../target/usr/lib/librt.a(timer_routines.o): In function `__start_helper_thread':
> /home/build/BUILD/glibc-2.5.90/rt/../nptl/sysdeps/unix/sysv/linux/timer_routines.c:144: undefined reference to `pthread_attr_init'
> /home/build/BUILD/glibc-2.5.90/rt/../nptl/sysdeps/unix/sysv/linux/timer_routines.c:145: undefined reference to `pthread_attr_setstacksize'
> /home/build/BUILD/glibc-2.5.90/rt/../nptl/sysdeps/unix/sysv/linux/timer_routines.c:171: undefined reference to `pthread_attr_destroy'
> /home/build/BUILD/glibc-2.5.90/rt/../nptl/sysdeps/unix/sysv/linux/timer_routines.c:175: undefined reference to `pthread_atfork'
> /usr/local/arm_v7_vfp_le/bin/../target/usr/lib/librt.a(timer_routines.o): In function `timer_helper_thread':
> /home/build/BUILD/glibc-2.5.90/rt/../nptl/sysdeps/unix/sysv/linux/timer_routines.c:114: undefined reference to `pthread_exit'
> collect2: ld returned 1 exit status
> make: *** [cyclictest] Error 1
>
>
> After patch) Success...
> Fedora11$> file ./cyclictest
> ./cyclictest: ELF 32-bit LSB executable, ARM, version 1 (SYSV),
> statically linked, for GNU/Linux 2.6.18, not stripped
>
> ====================================================================
>
> >From 45e4dbeb8e7723cefa9117736b0ece5ea188ce6a Mon Sep 17 00:00:00 2001
> From: Geunsik Lim <geunsik.lim@samsung.com>
> Date: Thu, 21 Jan 2010 09:00:24 +0900
> Subject: [PATCH 2/2] bugfix: Support static linking(-static) with
> Crosscompiler on ARM targetboard.
>
> This patch is for support static building using cross-compiler for
> embedded targetboard like ARM.
> When we use -static option for static binary on embedded board after
> patch.
> I tested various toolchain.(e.g: codesourcery toolchain , my self
> toolchain , cross-tool project's toolchain)
> Ref) Don't forget "-static" configuration(CFLAGS += -O2 -static) in
> Makefile When you need static linking.
>
> Signed-off-by: Geunsik Lim <geunsik.lim@samsung.com>
> ---
> Makefile | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index e14d957..65f506a 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -3,7 +3,7 @@ VERSION_STRING = 0.61
> TARGETS = cyclictest signaltest pi_stress \
> hwlatdetect rt-migrate-test ptsematest sigwaittest svsematest \
> sendme pip
> -LIBS = -lpthread -lrt
> +LIBS = -lrt -lpthread
> EXTRA_LIBS ?= -ldl # for get_cpu
> DESTDIR ?=
> prefix ?= /usr/local
> --
> 1.6.2.5
>
Did you leave something out?
Thanks
John
--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2010-01-21 0:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-03 4:04 [PATCH]cyclictest: Arrange alphabetically for readability of "cyclictest --help" GeunSik Lim
2010-01-21 0:09 ` [PATCH]cyclictest: CFLAGS to support static compiliation with ARM Crosscompiler GeunSik Lim
2010-01-21 0:40 ` John Kacur [this message]
2010-01-21 1:37 ` GeunSik Lim
2010-01-21 11:40 ` John Kacur
2010-01-21 13:10 ` GeunSik Lim
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=520f0cf11001201640r4f1cf00ew3b4a4e9424c28602@mail.gmail.com \
--to=jkacur@redhat.com \
--cc=leemgs1@gmail.com \
--cc=linux-rt-users@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=williams@redhat.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).