uclibc: add various upstream patches
PATCH 1/1 uclibc: add various upstream patches
Fix some static linking issues for Xtensa/Blackfin. Optimize the size for non-threaded static binaries and fix static C/C++ applications when running on the target. Fix noMMU madvise declarations.
Signed-off-by Waldemar Brodkorb <[email protected]>
--- ...s-linux-common-madvise.c-disable-on-noMMU.patch | 31 ++++++++ ...-mman.h-remove-madvise-posix_madvise-prot.patch | 36 ++++++++++ package/uclibc/0003-bfin-fix-a-gcc-warning.patch | 25 +++++++ ...4-fix-static-linking-for-FDPIC-toolchains.patch | 49 +++++++++++++ .../uclibc/0005-xtensa-fix-static-linking.patch | 60 ++++++++++++++++ ...ads-optimize-single-threaded-applications.patch | 83 ++++++++++++++++++++++ 6 files changed, 284 insertions(+) create mode 100644 package/uclibc/0001-libc-sysdeps-linux-common-madvise.c-disable-on-noMMU.patch create mode 100644 package/uclibc/0002-include-sys-mman.h-remove-madvise-posix_madvise-prot.patch create mode 100644 package/uclibc/0003-bfin-fix-a-gcc-warning.patch create mode 100644 package/uclibc/0004-fix-static-linking-for-FDPIC-toolchains.patch create mode 100644 package/uclibc/0005-xtensa-fix-static-linking.patch create mode 100644 package/uclibc/0006-threads-optimize-single-threaded-applications.patch
package/uclibc/0001-libc-sysdeps-linux-common-madvise.c-disable-on-noMMU.patch new file +31 -0
@@ -0,0 +1,31 @@ +From bf7a84dc1fd8c9c340222260cb3e53019715088c Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni <[email protected]> +Date: Wed, 7 Dec 2016 23:18:49 +0100 +Subject: [PATCH] libc/sysdeps/linux/common/madvise.c: disable on noMMU + architectures + +Similar to what was done in commit +9945c6d21797553e78cbef8034f6dd16b3824df5 for posix_madvise(). + +Signed-off-by: Thomas Petazzoni <[email protected]> +Signed-off-by: Waldemar Brodkorb <[email protected]> +--- + libc/sysdeps/linux/common/madvise.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/libc/sysdeps/linux/common/madvise.c b/libc/sysdeps/linux/common/madvise.c +index e953d7b..bb486d2 100644 +--- a/libc/sysdeps/linux/common/madvise.c ++++ b/libc/sysdeps/linux/common/madvise.c +@@ -9,6 +9,8 @@ + + #include <sys/syscall.h> + #include <sys/mman.h> ++#ifdef __ARCH_USE_MMU__ + #if defined __NR_madvise && defined __USE_BSD + _syscall3(int, madvise, void *, __addr, size_t, __len, int, __advice) ++#endif /* __ARCH_USE_MMU__ */ + #endif +-- +2.1.4 +
package/uclibc/0002-include-sys-mman.h-remove-madvise-posix_madvise-prot.patch new file +36 -0
@@ -0,0 +1,36 @@ +From 25a60624713990c637f125e094e968ff4655307c Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni <[email protected]> +Date: Wed, 7 Dec 2016 23:20:18 +0100 +Subject: [PATCH] include/sys/mman.h: remove madvise/posix_madvise + prototypes on noMMU + +Signed-off-by: Thomas Petazzoni <[email protected]> +Signed-off-by: Waldemar Brodkorb <[email protected]> +--- + include/sys/mman.h | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/include/sys/mman.h b/include/sys/mman.h +index 71d553a..fc8fce5 100644 +--- a/include/sys/mman.h ++++ b/include/sys/mman.h +@@ -99,6 +99,7 @@ static __inline__ int msync (void *__addr, size_t __len, int __flags) { return 0 + + #endif + ++#ifdef __ARCH_USE_MMU__ + #if defined __USE_BSD && (defined __UCLIBC_LINUX_SPECIFIC__ || defined __UCLIBC_HAS_THREADS_NATIVE__) + /* Advise the system about particular usage patterns the program follows + for the region starting at ADDR and extending LEN bytes. */ +@@ -108,6 +109,8 @@ extern int madvise (void *__addr, size_t __len, int __advice) __THROW; + /* This is the POSIX name for this function. */ + extern int posix_madvise (void *__addr, size_t __len, int __advice) __THROW; + #endif ++#endif /* __ARCH_USE_MMU__ */ ++ + + #if defined __UCLIBC_HAS_REALTIME__ + # ifdef __ARCH_USE_MMU__ +-- +2.1.4 +
package/uclibc/0003-bfin-fix-a-gcc-warning.patch new file +25 -0
@@ -0,0 +1,25 @@ +From 1f79f41508d0f9c30be812bea9b84fd7900a273e Mon Sep 17 00:00:00 2001 +From: Waldemar Brodkorb <[email protected]> +Date: Thu, 8 Dec 2016 04:07:47 +0100 +Subject: [PATCH] bfin: fix a gcc warning + +Signed-off-by: Waldemar Brodkorb <[email protected]> +--- + ldso/ldso/bfin/dl-sysdep.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/ldso/ldso/bfin/dl-sysdep.h b/ldso/ldso/bfin/dl-sysdep.h +index 5758117..4262a26 100644 +--- a/ldso/ldso/bfin/dl-sysdep.h ++++ b/ldso/ldso/bfin/dl-sysdep.h +@@ -93,6 +93,6 @@ static __always_inline void + elf_machine_relative (DL_LOADADDR_TYPE load_off, const Elf32_Addr rel_addr, + Elf32_Word relative_count) + { +- return 0; ++ return; + } + #endif +-- +2.1.4 +
package/uclibc/0004-fix-static-linking-for-FDPIC-toolchains.patch new file +49 -0
49 lines not on this page · raw message
package/uclibc/0005-xtensa-fix-static-linking.patch new file +60 -0
60 lines not on this page · raw message
package/uclibc/0006-threads-optimize-single-threaded-applications.patch new file +83 -0
83 lines not on this page · raw message
Signature · 1 line
2.1.4
Thomas Petazzoni
AppliedPATCH 1/1 uclibc: add various upstream patches
Hello,
Quoted 6 lines · Waldemar Brodkorb
Fix some static linking issues for Xtensa/Blackfin. Optimize the size for non-threaded static binaries and fix static C/C++ applications when running on the target. Fix noMMU madvise declarations.
Signed-off-by Waldemar Brodkorb <[email protected]>
Quoted 14 lines
--- ...s-linux-common-madvise.c-disable-on-noMMU.patch | 31 ++++++++ ...-mman.h-remove-madvise-posix_madvise-prot.patch | 36 ++++++++++ package/uclibc/0003-bfin-fix-a-gcc-warning.patch | 25 +++++++ ...4-fix-static-linking-for-FDPIC-toolchains.patch | 49 +++++++++++++ .../uclibc/0005-xtensa-fix-static-linking.patch | 60 ++++++++++++++++ ...ads-optimize-single-threaded-applications.patch | 83 ++++++++++++++++++++++ 6 files changed, 284 insertions(+) create mode 100644 package/uclibc/0001-libc-sysdeps-linux-common-madvise.c-disable-on-noMMU.patch create mode 100644 package/uclibc/0002-include-sys-mman.h-remove-madvise-posix_madvise-prot.patch create mode 100644 package/uclibc/0003-bfin-fix-a-gcc-warning.patch create mode 100644 package/uclibc/0004-fix-static-linking-for-FDPIC-toolchains.patch create mode 100644 package/uclibc/0005-xtensa-fix-static-linking.patch create mode 100644 package/uclibc/0006-threads-optimize-single-threaded-applications.patch
Applied to master, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com