coreutils: fix build with uClibc
PATCH 1/1 coreutils: fix build with uClibc
uClibc needs -lrt for posix_spawn(). As a side effect of the fix, the timer_settime() library test breaks. So force timer_settime() library as well.
Fixes
http://autobuild.buildroot.net/results/ab1/ab1250c3d402ec3fbaf22eeffd07de218ffafb22/.
---
Note: something along the same lines should also fix m4 build against uClibc. But since m4 for target is now deprecated I'm not sure it is worth the effort.
--- package/coreutils/coreutils.mk | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
package/coreutils/coreutils.mk +10 -1
@@ -20,6 +20,8 @@ COREUTILS_BIN_PROGS = cat chgrp chmod chown cp date dd df dir echo false hostnam ln ls mkdir mknod mv pwd rm rmdir vdir sleep stty sync touch true \ uname join +COREUTILS_LDFLAGS = $(TARGET_LDFLAGS) + COREUTILS_CONF_ENV = ac_cv_c_restrict=no \ ac_cv_func_chown_works=yes \ ac_cv_func_euidaccess=no \
@@ -54,7 +56,14 @@ COREUTILS_CONF_ENV = ac_cv_c_restrict=no \ gl_cv_func_working_utimes=yes \ gl_getline_needs_run_time_check=no \ utils_cv_localtime_cache=no \ - PERL=missing + PERL=missing \ + LDFLAGS="$(COREUTILS_LDFLAGS)" + +ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y) +COREUTILS_LDFLAGS += -lrt +COREUTILS_CONF_ENV += ac_cv_func_posix_spawn=yes \ + ac_cv_search_timer_settime=-lrt +endif COREUTILS_CONF_OPT = --disable-rpath \ --disable-dependency-tracking \
Signature · 1 line
1.8.5.2
PATCH 1/1 coreutils: fix build with uClibc
Quoted 34 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Baruch" == Baruch Siach <[email protected]> writes:
uClibc needs -lrt for
posix_spawn(). As a side effect of the fix, thetimer_settime()library test breaks. So forcetimer_settime()library as well.Fixes
http://autobuild.buildroot.net/results/ab1/ab1250c3d402ec3fbaf22eeffd07de218ffafb22/.Signed-off-by Baruch Siach <[email protected]>---
Note: something along the same lines should also fix m4 build against uClibc. But since m4 for target is now deprecated I'm not sure it is worth the effort.
--- package/coreutils/coreutils.mk | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)package/coreutils/coreutils.mk +2
-0@@ -20,6 +20,8 @@ COREUTILS_BIN_PROGS = cat chgrp chmod chown cp date dd df dir echo false hostnam ln ls mkdir mknod mv pwd rm rmdir vdir sleep stty sync touch true \ uname join +COREUTILS_LDFLAGS = $(TARGET_LDFLAGS) + COREUTILS_CONF_ENV = ac_cv_c_restrict=no \ ac_cv_func_chown_works=yes \ ac_cv_func_euidaccess=no \@@ -54,7 +56,14 @@ COREUTILS_CONF_ENV = ac_cv_c_restrict=no \ gl_cv_func_working_utimes=yes \
package/coreutils/coreutils.mk COREUTILS_CONF_ENV = ac_cv_c_restrict=no \ · line 65
Quoted 10 lines
package/coreutils/coreutils.mk +7
-1gl_getline_needs_run_time_check=no \ utils_cv_localtime_cache=no \ - PERL=missing + PERL=missing \ + LDFLAGS="$(COREUTILS_LDFLAGS)" + +ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y) +COREUTILS_LDFLAGS += -lrt +COREUTILS_CONF_ENV += ac_cv_func_posix_spawn=yes \ + ac_cv_search_timer_settime=-lrt
Hmm, this is only for uClibc snapshot, right? My 0.9.33 doesn't seem to have posix_spawn, so this breaks the build.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 1/1 coreutils: fix build with uClibc
Hi Peter,
Quoted 8 lines · Peter Korsgaard
package/coreutils/coreutils.mk COREUTILS_CONF_ENV = ac_cv_c_restrict=no \ · line 65
Quoted 5 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Baruch" == Baruch Siach <[email protected]> writes:
package/coreutils/coreutils.mk +4
-0+ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y) +COREUTILS_LDFLAGS += -lrt +COREUTILS_CONF_ENV += ac_cv_func_posix_spawn=yes \ + ac_cv_search_timer_settime=-lrtHmm, this is only for uClibc snapshot, right? My 0.9.33 doesn't seem to have
posix_spawn, so this breaks the build.
Correct. posix_spawn support was added in uClibc after 0.9.33. I posted recently a patch series with a better fix in uClibc
(http://thread.gmane.org/gmane.comp.lib.uclibc.buildroot/73863, first patch). Since then, however, patches 2 and 3 (but not 1) were applied to uClibc master. I'll send an update series that bumps the xtnesa uClibc snapshot version instead.
baruch
Signature · 3 lines
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -PATCH 1/1 coreutils: fix build with uClibc
Quoted 18 lines · Baruch Siach
Date: Sun, 12 Jan 2014 11:39:13 +0200
From: Baruch Siach <[email protected]>
To: Peter Korsgaard <[email protected]>
Cc: buildroot at busybox.net
Subject: Re: [Buildroot] [PATCH] coreutils: fix build with uClibcHi Peter,
Quoted 8 lines · Peter Korsgaard
package/coreutils/coreutils.mk COREUTILS_CONF_ENV = ac_cv_c_restrict=no \ · line 65
Quoted 5 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Baruch" == Baruch Siach <[email protected]> writes:
package/coreutils/coreutils.mk +4
-0+ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y) +COREUTILS_LDFLAGS += -lrt +COREUTILS_CONF_ENV += ac_cv_func_posix_spawn=yes \ + ac_cv_search_timer_settime=-lrtHmm, this is only for uClibc snapshot, right? My 0.9.33 doesn't seem to have
posix_spawn, so this breaks the build.
Quoted 5 lines
Correct.
posix_spawnsupport was added in uClibc after 0.9.33. I posted recently a patch series with a better fix in uClibc
(http://thread.gmane.org/gmane.comp.lib.uclibc.buildroot/73863, first patch). Since then, however, patches 2 and 3 (but not 1) were applied to uClibc master. I'll send an update series that bumps the xtnesa uClibc snapshot
Read as "xtensa uClibc snapshot".
- yba
Quoted 5 lines
version instead.
baruch
Signature · 3 lines
9590 8E58 D30D 1660 C349 673D B205 4FC4 B8F5 B7F9 ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
mailto:yba at tkos.co.il tel:+972.52.486.3386 http://tkos.co.il skype:benavrhmPATCH 1/1 coreutils: fix build with uClibc
In reply to Baruch SiachQuoted 13 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Baruch" == Baruch Siach <[email protected]> writes:
Hi Peter,
Quoted 8 lines · Peter Korsgaard
package/coreutils/coreutils.mk COREUTILS_CONF_ENV = ac_cv_c_restrict=no \ · line 65
Quoted 5 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Baruch" == Baruch Siach <[email protected]> writes:
package/coreutils/coreutils.mk +4
-0+ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y) +COREUTILS_LDFLAGS += -lrt +COREUTILS_CONF_ENV += ac_cv_func_posix_spawn=yes \ + ac_cv_search_timer_settime=-lrtHmm, this is only for uClibc snapshot, right? My 0.9.33 doesn't seem to have
posix_spawn, so this breaks the build.
Quoted 6 lines
Correct.
posix_spawnsupport was added in uClibc after 0.9.33. I posted recently a patch series with a better fix in uClibc
(http://thread.gmane.org/gmane.comp.lib.uclibc.buildroot/73863, first patch). Since then, however, patches 2 and 3 (but not 1) were applied to uClibc master. I'll send an update series that bumps the xtnesa uClibc snapshot version instead.
Ok, great. Could you please also mark obsolete patches as such in patchwork?
Signature · 1 line
Bye, Peter Korsgaard