When cross compiling sys-apps/coreutils-8.2 for armv4tl-softfloat-linux-gnueabi it fails on tac with the following error: CC tac.o tac.c: In function 'output': tac.c:170: warning: ignoring return value of 'fwrite_unlocked', declared with attribute warn_unused_result tac.c:181: warning: ignoring return value of 'fwrite_unlocked', declared with attribute warn_unused_result CCLD tac ../lib/libcoreutils.a(gethrxtime.o): In function `gethrxtime': gethrxtime.c:(.text+0xc): undefined reference to `clock_gettime' ../lib/libcoreutils.a(gettime.o): In function `gettime': gettime.c:(.text+0x10): undefined reference to `clock_gettime' collect2: ld returned 1 exit status Something along the lines of the following patch is needed to fix this problem --- coreutils-8.2/src/Makefile.am.orig 2009-12-27 15:45:07.000000000 -0600 +++ coreutils-8.2/src/Makefile.am 2009-12-27 15:45:55.000000000 -0600 @@ -262,7 +262,7 @@ stty_LDADD = $(LDADD) su_LDADD = $(LDADD) sum_LDADD = $(LDADD) sync_LDADD = $(LDADD) -tac_LDADD = $(LDADD) +tac_LDADD = $(LDADD) $(LIB_CLOCK_GETTIME) tail_LDADD = $(LDADD) tee_LDADD = $(LDADD) test_LDADD = $(LDADD) Reproducible: Always Steps to Reproduce:
i dont think that's correct. you probably want upstream commit 67bfde6668268. -# for gethrxtime, randint, randread, gen_tempname +# for gethrxtime, randint, randread, gen_tempname, mkstemp dd_LDADD += $(LIB_GETHRXTIME) mktemp_LDADD += $(LIB_GETHRXTIME) shred_LDADD += $(LIB_GETHRXTIME) shuf_LDADD += $(LIB_GETHRXTIME) sort_LDADD += $(LIB_GETHRXTIME) +tac_LDADD += $(LIB_GETHRXTIME)
Verified, thanks SpanKY, the diff from the commit you mentioned fixed the issue :-) Commit: http://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=67bfde666826888f12934fb610705cf253a72293
Can we get this patch added to the tree?
added to patchset http://sources.gentoo.org/gentoo/src/patchsets/coreutils/8.2/005_all_coreutils-upstream-tac-dep.patch?rev=1.1