package/util-linux: remove patch for uClibc support
PATCH 1/1 package/util-linux: remove patch for uClibc support
This patch is not needed anymore since the uClibc support has been removed from Buildroot.
This patch was needed for uClibc <= 0.9.33 support.
---
Build tested with 2014R1 bfin toolchain.
The arc-1015.12 toolchain shouldn't trigger the build issue since it's based on uClibc-snapshot (upstream HEAD)
--- ...fine-mkostemp-for-older-version-of-uClibc.patch | 50 ---------------------- 1 file changed, 50 deletions(-) delete mode 100644 package/util-linux/0003-c.h-define-mkostemp-for-older-version-of-uClibc.patch
package/util-linux/0003-c.h-define-mkostemp-for-older-version-of-uClibc.patch deleted +0 -50
@@ -1,50 +0,0 @@ -From 42a84250fc78bae3e885ecd1379e713663fe6487 Mon Sep 17 00:00:00 2001 -From: Romain Naour <[email protected]> -Date: Sun, 6 Apr 2014 12:12:41 +0200 -Subject: [PATCH 1/1] c.h: define mkostemp for older version of uClibc - -Signed-off-by: Romain Naour <[email protected]> ---- - configure.ac | 2 ++ - include/c.h | 14 ++++++++++++++ - 2 files changed, 16 insertions(+) - -diff --git a/configure.ac b/configure.ac -index 35a1f26..a9b8d34 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -321,6 +321,8 @@ AC_CHECK_FUNCS([ \ - ]) - AC_FUNC_FSEEKO - -+AC_CHECK_FUNCS([mkostemp]) -+ - AC_CHECK_FUNCS([openat fstatat unlinkat], [have_openat=yes], [have_openat=no]) - AC_CHECK_FUNCS([ioperm iopl], [have_io=yes]) - -diff --git a/include/c.h b/include/c.h -index 4a9bf3d..1b880ed 100644 ---- a/include/c.h -+++ b/include/c.h -@@ -300,4 +300,18 @@ static inline int usleep(useconds_t usec) - # define SEEK_HOLE 4 - #endif - -+/* -+ * mkostemp() may be missing with older version of uClibc -+ */ -+#ifndef HAVE_MKOSTEMP -+static inline int mkostemp(char *template, int flags) -+{ -+ int fd; -+ fd = mkstemp(template); -+ if (flags & O_CLOEXEC && fd >= 0) -+ fcntl(fd, F_SETFD, FD_CLOEXEC); -+ return fd; -+} -+#endif -+ - #endif /* UTIL_LINUX_C_H */ --- -1.9.0 -
Signature · 1 line
2.5.0
PATCH 1/1 package/util-linux: remove patch for uClibc support
Quoted 7 lines · Romain Naour
This patch is not needed anymore since the uClibc support has been removed from Buildroot.
This patch was needed for uClibc <= 0.9.33 support.Signed-off-by Romain Naour <[email protected]>---
Build tested with 2014R1 bfin toolchain.
But that toolchain is using uClibc 0.9.33, no? So how come it still works then?
Regards,
Arnout
Quoted 6 lines
The arc-1015.12 toolchain shouldn't trigger the build issue since it's based on uClibc-snapshot (upstream HEAD)
--- ...fine-mkostemp-for-older-version-of-uClibc.patch | 50 ---------------------- 1 file changed, 50 deletions(-) delete mode 100644 package/util-linux/0003-c.h-define-mkostemp-for-older-version-of-uClibc.patch
[snip]
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
PATCH 1/1 package/util-linux: remove patch for uClibc support
Dear Arnout Vandecappelle,
Quoted 10 lines · Arnout Vandecappelle
Quoted 7 lines · Romain Naour
This patch is not needed anymore since the uClibc support has been removed from Buildroot.
This patch was needed for uClibc <= 0.9.33 support.Signed-off-by Romain Naour <[email protected]>---
Build tested with 2014R1 bfin toolchain.But that toolchain is using uClibc 0.9.33, no? So how come it still works then?
mkostemp is used in three places:
lib/fileutils.c: fd = mkostemp(localtmp, O_RDWR|O_CREAT|O_EXCL|O_CLOEXEC);libblkid/src/save.c: fd = mkostemp(tmp, O_RDWR|O_CREAT|O_EXCL|O_CLOEXEC);libmount/src/utils.c: fd = mkostemp(n, O_RDWR|O_CREAT|O_EXCL|O_CLOEXEC);
Both libblkid and libmount are "depends on BR2_USE_MMU", so they are not built on Blackfin.
However, I don't see how it can work with lib/fileutils. And indeed, at build time I get:
CC lib/libcommon_la-match.lolib/fileutils.c: In function ?xmkstemp?:lib/fileutils.c:36: warning: implicit declaration of function ?mkostemp? lib/fileutils.c:36: warning: nested extern declaration of ?mkostemp?
And indeed:
$ ./output/host/usr/bin/bfin-linux-uclibc-gcc -o foo foo.c -lsmartcols /home/thomas/projets/buildroot/output/host/usr/bfin-buildroot-linux-uclibc/sysroot/usr/lib/libsmartcols.so: undefined reference to `_fork' /home/thomas/projets/buildroot/output/host/usr/bfin-buildroot-linux-uclibc/sysroot/usr/lib/libsmartcols.so: undefined reference to `_mkostemp' collect2: ld returned 1 exit status
Though it looks like this smartcols library also uses fork(), so it anyway cannot work properly.
Romain, it seems like your patch is not completely correct, so I've marked it as Rejected.
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/1 package/util-linux: remove patch for uClibc support
Hi Thomas, Arnout,
Le 21/02/2016 15:10, Thomas Petazzoni a ?crit :
Quoted 38 lines
Dear Arnout Vandecappelle,
Quoted 10 lines · Arnout Vandecappelle
Quoted 7 lines · Romain Naour
This patch is not needed anymore since the uClibc support has been removed from Buildroot.
This patch was needed for uClibc <= 0.9.33 support.Signed-off-by Romain Naour <[email protected]>---
Build tested with 2014R1 bfin toolchain.But that toolchain is using uClibc 0.9.33, no? So how come it still works then?
mkostemp is used in three places:
lib/fileutils.c: fd =mkostemp(localtmp, O_RDWR|O_CREAT|O_EXCL|O_CLOEXEC);libblkid/src/save.c: fd =mkostemp(tmp, O_RDWR|O_CREAT|O_EXCL|O_CLOEXEC);libmount/src/utils.c: fd =mkostemp(n, O_RDWR|O_CREAT|O_EXCL|O_CLOEXEC);Both libblkid and libmount are "depends on
BR2_USE_MMU", so they are not built on Blackfin.However, I don't see how it can work with lib/fileutils. And indeed, at build time I get:
CC
lib/libcommon_la-match.lolib/fileutils.c: In function ?xmkstemp?:lib/fileutils.c:36: warning: implicit declaration of function ?mkostemp?lib/fileutils.c:36: warning: nested extern declaration of ?mkostemp?And indeed:
$ ./output/host/usr/bin/bfin-linux-uclibc-gcc -o foo foo.c -lsmartcols /home/thomas/projets/buildroot/output/host/usr/bfin-buildroot-linux-uclibc/sysroot/usr/lib/libsmartcols.so: undefined reference to `_fork' /home/thomas/projets/buildroot/output/host/usr/bfin-buildroot-linux-uclibc/sysroot/usr/lib/libsmartcols.so: undefined reference to `_mkostemp' collect2: ld returned 1 exit status
Quoted 5 lines
Though it looks like this smartcols library also uses
fork(), so it anyway cannot work properly.Romain, it seems like your patch is not completely correct, so I've marked it as Rejected.
Ok no problem, I probably didn't selected the good util-linux option... my bad.
Best regards,
Romain
Quoted 5 lines
Best regards,
Thomas
PATCH 1/1 package/util-linux: remove patch for uClibc support
Hello,
Quoted 7 lines · Romain Naour
Quoted 5 lines
Though it looks like this smartcols library also uses
fork(), so it anyway cannot work properly.Romain, it seems like your patch is not completely correct, so I've marked it as Rejected.
Ok no problem, I probably didn't selected the good util-linux option... my bad.
util-linux itself build fine. It's then if you try to link a program with libsmartcols.
But on the other hand, libsmartcols uses fork(), which cannot be used on no-MMU platforms... So the fact that libsmartcols uses mkostemp() is maybe not that relevant.
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/1 package/util-linux: remove patch for uClibc support
Thomas,
Le 21/02/2016 18:20, Thomas Petazzoni a ?crit :
Quoted 10 lines
Hello,
Quoted 6 lines · Romain Naour
Quoted 5 lines
Though it looks like this smartcols library also uses
fork(), so it anyway cannot work properly.Romain, it seems like your patch is not completely correct, so I've marked it as Rejected.
Quoted 8 lines
Quoted 1 line
Ok no problem, I probably didn't selected the good util-linux option... my bad.
util-linux itself build fine. It's then if you try to link a program with libsmartcols.
But on the other hand, libsmartcols uses
fork(), which cannot be used on no-MMU platforms... So the fact that libsmartcols usesmkostemp()is maybe not that relevant.
So let's disable libsmartcols for no-MMU platforms and remove the patch :)
Best regards,
Romain
Quoted 5 lines
Best regards,
Thomas