* [Buildroot] glibc and locale
@ 2015-02-08 23:44 Steve Kenton
2015-02-09 7:09 ` Thomas Petazzoni
0 siblings, 1 reply; 4+ messages in thread
From: Steve Kenton @ 2015-02-08 23:44 UTC (permalink / raw)
To: buildroot
I have a script that wants the locale program. I notice that is is already built
as part of the glibc build process, but it is not installed. Would there be
any objections to something along these lines to go ahead and install locale?
I'm not sure if this is the best way since glibc build uses autotools.
Steve
--- glibc.mk.ori 2015-02-08 17:38:16.824281939 -0600
+++ glibc.mk 2015-02-08 17:40:27.932284454 -0600
@@ -115,6 +115,7 @@ GLIBC_LIBS_LIB += libthread_db.so.*
endif
define GLIBC_INSTALL_TARGET_CMDS
+ $(INSTALL) -m 0755 -D $(@D)/build/locale/locale $(TARGET_DIR)/usr/bin/locale
for libs in $(GLIBC_LIBS_LIB); do \
$(call copy_toolchain_lib_root,$(STAGING_DIR)/,,lib,$$libs,/lib) ; \
done
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] glibc and locale
2015-02-08 23:44 [Buildroot] glibc and locale Steve Kenton
@ 2015-02-09 7:09 ` Thomas Petazzoni
2015-02-09 14:37 ` Steve Kenton
0 siblings, 1 reply; 4+ messages in thread
From: Thomas Petazzoni @ 2015-02-09 7:09 UTC (permalink / raw)
To: buildroot
Dear Steve Kenton,
On Sun, 08 Feb 2015 17:44:56 -0600, Steve Kenton wrote:
> I have a script that wants the locale program. I notice that is is already built
> as part of the glibc build process, but it is not installed. Would there be
> any objections to something along these lines to go ahead and install locale?
> I'm not sure if this is the best way since glibc build uses autotools.
This looks ok, but I am wondering how that would be done with the
uClibc and musl C libraries. Remember that we support three different C
libraries, so when we're doing a change to one of them, we always need
to check what needs to be done for the two other ones.
Best regards,
Thomas Petazzoni
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] glibc and locale
2015-02-09 7:09 ` Thomas Petazzoni
@ 2015-02-09 14:37 ` Steve Kenton
2015-02-09 17:50 ` [Buildroot] glibc (and uClibc) " Steve Kenton
0 siblings, 1 reply; 4+ messages in thread
From: Steve Kenton @ 2015-02-09 14:37 UTC (permalink / raw)
To: buildroot
On 02/09/2015 01:09 AM, Thomas Petazzoni wrote:
> Dear Steve Kenton,
>
> On Sun, 08 Feb 2015 17:44:56 -0600, Steve Kenton wrote:
>> I have a script that wants the locale program. I notice that is is already built
>> as part of the glibc build process, but it is not installed. Would there be
>> any objections to something along these lines to go ahead and install locale?
>> I'm not sure if this is the best way since glibc build uses autotools.
>
> This looks ok, but I am wondering how that would be done with the
> uClibc and musl C libraries. Remember that we support three different C
> libraries, so when we're doing a change to one of them, we always need
> to check what needs to be done for the two other ones.
OK, I'll take a look at the other two.
Steve Kenton
>
> Best regards,
>
> Thomas Petazzoni
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] glibc (and uClibc) and locale
2015-02-09 14:37 ` Steve Kenton
@ 2015-02-09 17:50 ` Steve Kenton
0 siblings, 0 replies; 4+ messages in thread
From: Steve Kenton @ 2015-02-09 17:50 UTC (permalink / raw)
To: buildroot
On 02/09/2015 08:37 AM, Steve Kenton wrote:
>> This looks ok, but I am wondering how that would be done with the
>> uClibc and musl C libraries. Remember that we support three different C
>> libraries, so when we're doing a change to one of them, we always need
>> to check what needs to be done for the two other ones.
> OK, I'll take a look at the other two.
The locale program source for uClibc is in extra/local/programs/locale.c
However, attempting to build it the obvious way adding another line to the build
commands in the .mk file does not work
define UCLIBC_BUILD_CMDS
$(UCLIBC_MAKE) -C $(@D) $(UCLIBC_MAKE_FLAGS) headers
$(UCLIBC_MAKE) -C $(@D) $(UCLIBC_MAKE_FLAGS)
+ $(UCLIBC_MAKE) -C $(@D) $(UCLIBC_MAKE_FLAGS) extra/locale/programs/locale
$(MAKE) -C $(@D)/utils \
PREFIX=$(HOST_DIR) \
HOSTCC="$(HOSTCC)" hostutils
endef
It gets a build error because of the TARGET_ABI (i386 in this example) inserted by the UCLIBC_MAKE_FLAGS
immediately before i386 extra/locale/programs/locale.c on the gcc command.
Could someone familiar with the uClibc build process give me a pointer how to proceed?
Thanks,
Steve Kenton
UCLIBC_MAKE_FLAGS = \
ARCH="$(UCLIBC_TARGET_ARCH)" \
CROSS_COMPILE="$(TARGET_CROSS)" \
UCLIBC_EXTRA_CFLAGS="$(UCLIBC_EXTRA_CFLAGS) $(TARGET_ABI)" \
HOSTCC="$(HOSTCC)"
steve at Cube:/data/bcdist/test/buildroot-2015.02-rc1/output/build/uclibc-0.9.33.2$ make -n extra/locale/programs/locale
/data/bcdist/test/buildroot-2015.02-rc1/output/host/usr/bin/i586-buildroot-linux-uclibc-gcc -include ./include/libc-symbols.h -Wall -Wstrict-prototypes -Wstrict-aliasing -funsigned-char -fno-builtin -fno-asm -std=gnu99 -m32 -march=i586
-fno-stack-protector -nostdinc -I./include -I./include -I. -I./libc/sysdeps/linux -I./libc/sysdeps/linux/i386 -Os -funit-at-a-time -fmerge-all-constants -fstrict-aliasing -fno-tree-loop-optimize -fno-tree-dominator-opts -fno-strength-reduce
-fomit-frame-pointer -m32 -mpreferred-stack-boundary=2 -falign-functions=1 -falign-jumps=1 -falign-labels=1 -falign-loops=1 -DHAVE_FORCED_UNWIND -I./libpthread/nptl -I./libpthread/nptl -I./libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586
-I./libpthread/nptl/sysdeps/unix/sysv/linux/i386 -I./libpthread/nptl/sysdeps/i386 -I./libpthread/nptl/sysdeps/i386 -I./libpthread/nptl/sysdeps/unix/sysv/linux -I./libpthread/nptl/sysdeps/unix/sysv/linux -I./libpthread/nptl/sysdeps/pthread
-I./libpthread/nptl/sysdeps/pthread/bits -I./libpthread/nptl/sysdeps/generic -I./ldso/ldso/i386 -I./ldso/include -I./libc/sysdeps/linux/common -I/data/bcdist/test/buildroot-2015.02-rc1/output/build/linux-headers-3.18.6/usr/include/ -isystem
/data/bcdist/test/buildroot-2015.02-rc1/output/host/usr/lib/gcc/i586-buildroot-linux-uclibc/4.8.4/include-fixed -isystem /data/bcdist/test/buildroot-2015.02-rc1/output/host/usr/lib/gcc/i586-buildroot-linux-uclibc/4.8.4/include -DNDEBUG
-D__USE_STDIO_FUTEXES__ -Wl,-EL -Wl,--sort-common -Wl,--sort-section=alignment -m32 -shared -Wl,--warn-common -Wl,--warn-once -Wl,-z,combreloc -Wl,-z,relro -Wl,-z,now -Wl,-z,defs i386 extra/locale/programs/locale.c -o extra/locale/programs/locale
steve at Cube:/data/bcdist/test/buildroot-2015.02-rc1/output/build/uclibc-0.9.33.2$
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-02-09 17:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-08 23:44 [Buildroot] glibc and locale Steve Kenton
2015-02-09 7:09 ` Thomas Petazzoni
2015-02-09 14:37 ` Steve Kenton
2015-02-09 17:50 ` [Buildroot] glibc (and uClibc) " Steve Kenton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox