gnutls: Fix compilation on uclibc
PATCH 1/2 gnutls: Fix compilation on uclibc
Examples do not compile correctly on latest uclibc
--- .../correct_rpl_gettimeofday_signature.patch | 57 ++++++++++++++++++++ meta/recipes-support/gnutls/gnutls_2.12.14.bb | 6 ++- 2 files changed, 61 insertions(+), 2 deletions(-) create mode 100644 meta/recipes-support/gnutls/gnutls-2.12.14/correct_rpl_gettimeofday_signature.patch
meta/recipes-support/gnutls/gnutls-2.12.14/correct_rpl_gettimeofday_signature.patch new file +57 -0
@@ -0,0 +1,57 @@ +Currently we fail on uclibc like below + +| In file included from /home/kraj/work/angstrom/sources/openembedded-core/build/tmp-uclibc/sysroots/qemuarm/usr/include/sys/procfs.h:32:0, +| from /home/kraj/work/angstrom/sources/openembedded-core/build/tmp-uclibc/sysroots/qemuarm/usr/include/sys/ucontext.h:26, +| from /home/kraj/work/angstrom/sources/openembedded-core/build/tmp-uclibc/sysroots/qemuarm/usr/include/signal.h:392, +| from ../../gl/signal.h:52, +| from ../../gl/sys/select.h:58, +| from /home/kraj/work/angstrom/sources/openembedded-core/build/tmp-uclibc/sysroots/qemuarm/usr/include/sys/types.h:220, +| from ../../gl/sys/types.h:28, +| from ../../lib/includes/gnutls/gnutls.h:46, +| from ex-cxx.cpp:3: +| ../../gl/sys/time.h:396:66: error: conflicting declaration 'void* restrict' +| ../../gl/sys/time.h:396:50: error: 'restrict' has a previous declaration as 'timeval* restrict' +| make[4]: *** [ex-cxx.o] Error 1 +| make[4]: *** Waiting for unfinished jobs.... + + +GCC detects that we call 'restrict' as param name in function +signatures and complains since both params are called 'restrict' +therefore we use __restrict to denote the C99 keywork + +This only happens of uclibc since this code is not excercised with +eglibc otherwise we will have same issue there too + +Signed-off-by: Khem Raj <[email protected]> + +Upstream-Status: Pending + +Index: gnutls-2.12.14/gl/sys_time.in.h +=================================================================== +--- gnutls-2.12.14.orig/gl/sys_time.in.h 2012-01-15 10:54:39.517285351 -0800 ++++ gnutls-2.12.14/gl/sys_time.in.h 2012-01-15 10:59:23.773299108 -0800 +@@ -82,20 +82,20 @@ + # define gettimeofday rpl_gettimeofday + # endif + _GL_FUNCDECL_RPL (gettimeofday, int, +- (struct timeval *restrict, void *restrict) ++ (struct timeval *__restrict, void *__restrict) + _GL_ARG_NONNULL ((1))); + _GL_CXXALIAS_RPL (gettimeofday, int, +- (struct timeval *restrict, void *restrict)); ++ (struct timeval *__restrict, void *__restrict)); + # else + # if !@HAVE_GETTIMEOFDAY@ + _GL_FUNCDECL_SYS (gettimeofday, int, +- (struct timeval *restrict, void *restrict) ++ (struct timeval *__restrict, void *__restrict) + _GL_ARG_NONNULL ((1))); + # endif + /* Need to cast, because on glibc systems, by default, the second argument is + struct timezone *. */ + _GL_CXXALIAS_SYS_CAST (gettimeofday, int, +- (struct timeval *restrict, void *restrict)); ++ (struct timeval *__restrict, void *__restrict)); + # endif + _GL_CXXALIASWARN (gettimeofday); + # elif defined GNULIB_POSIXCHECK
meta/recipes-support/gnutls/gnutls_2.12.14.bb +4 -2
@@ -1,9 +1,11 @@ require gnutls.inc -PR = "${INC_PR}.4" +PR = "${INC_PR}.5" SRC_URI += "file://gnutls-openssl.patch \ - file://configure-fix.patch" + file://correct_rpl_gettimeofday_signature.patch \ + file://configure-fix.patch \ + " python() { if not ((d.getVar("INCOMPATIBLE_LICENSE", True) or "").find("GPLv3") != -1):
Signature · 1 line
1.7.5.4
PATCH 2/2 uclibc: Upgrade to latest master
--- .../uclibc/uclibc-git/cross_compile_check.patch | 13 + .../recipes-core/uclibc/uclibc-git/fix_libdl.patch | 58 +++ .../uclibc/uclibc-git/orign_path.patch | 183 -------- meta/recipes-core/uclibc/uclibc-git/rtld_no.patch | 216 --------- .../uclibc/uclibc-git/sort-sections-option.patch | 15 + meta/recipes-core/uclibc/uclibc-git/uClibc.distro | 2 + .../uclibc-git/uclibc_scheduler_update.patch | 455 -------------------- meta/recipes-core/uclibc/uclibc.inc | 2 +- meta/recipes-core/uclibc/uclibc_git.bb | 13 +- 9 files changed, 97 insertions(+), 860 deletions(-) create mode 100644 meta/recipes-core/uclibc/uclibc-git/cross_compile_check.patch create mode 100644 meta/recipes-core/uclibc/uclibc-git/fix_libdl.patch delete mode 100644 meta/recipes-core/uclibc/uclibc-git/orign_path.patch delete mode 100644 meta/recipes-core/uclibc/uclibc-git/rtld_no.patch create mode 100644 meta/recipes-core/uclibc/uclibc-git/sort-sections-option.patch delete mode 100644 meta/recipes-core/uclibc/uclibc-git/uclibc_scheduler_update.patch
meta/recipes-core/uclibc/uclibc-git/cross_compile_check.patch new file +13 -0
@@ -0,0 +1,13 @@ +diff --git a/Rules.mak b/Rules.mak +index 84baa97..571da05 100644 +--- a/Rules.mak ++++ b/Rules.mak +@@ -158,7 +158,7 @@ endif + comma:=, + space:= # + +-ifndef CROSS_COMPILE ++ifeq ($(CROSS_COMPILE),) + CROSS_COMPILE=$(call qstrip,$(CROSS_COMPILER_PREFIX)) + endif +
meta/recipes-core/uclibc/uclibc-git/fix_libdl.patch new file +58 -0
58 lines not on this page · raw message
meta/recipes-core/uclibc/uclibc-git/orign_path.patch deleted +0 -183
183 lines not on this page · raw message
meta/recipes-core/uclibc/uclibc-git/rtld_no.patch deleted +0 -216
216 lines not on this page · raw message
meta/recipes-core/uclibc/uclibc-git/sort-sections-option.patch new file +15 -0
@@ -0,0 +1,15 @@ +Index: git/Rules.mak +=================================================================== +--- git.orig/Rules.mak 2012-01-16 15:15:38.606224722 -0800 ++++ git/Rules.mak 2012-01-16 15:16:03.866226000 -0800 +@@ -361,8 +361,8 @@ + # 0 .text xxxxxxxx 00000000 00000000 xxxxxxxx 2**2 <===! + CPU_CFLAGS-y += $(CFLAG_-ffunction-sections) $(CFLAG_-fdata-sections) + CPU_LDFLAGS-y += $(CFLAG_-Wl--sort-common) +-$(eval $(call check-ld-var,--sort-section%alignment)) +- CPU_LDFLAGS-y += $(CFLAG_-Wl--sort-section%alignment) ++$(eval $(call check-ld-var,--sort-section=alignment)) ++ CPU_LDFLAGS-y += $(CFLAG_-Wl--sort-section=alignment) + + CPU_LDFLAGS-y+=-m32 + CPU_CFLAGS-y+=-m32
meta/recipes-core/uclibc/uclibc-git/uClibc.distro +2 -0
@@ -181,3 +181,5 @@ UCLIBC_HAS_FLOATS=y # needed by systemd UCLIBC_HAS_UTMPX=y +UCLIBC_LINUX_MODULE_26=y +UCLIBC_HAS_RESOLVER_SUPPORT=y
meta/recipes-core/uclibc/uclibc-git/uclibc_scheduler_update.patch deleted +0 -455
455 lines not on this page · raw message
meta/recipes-core/uclibc/uclibc.inc +1 -1
@@ -8,7 +8,7 @@ features, at the cost of ABI differences for different configurations. \ uClibc has been designed from the ground up to be a C library for \ embedded Linux. It is NOT compatible with binaries linked against glibc." -LICENSE = "LGPL" +LICENSE = "LGPLv2.1+" SECTION = "libs" LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=a6f89e2100d9b6cdffcea4f398e37343 \ file://COPYING.LIB.boilerplate;md5=aaddeadcddeb918297e0e4afc52ce46f \
meta/recipes-core/uclibc/uclibc_git.bb +8 -5
@@ -1,4 +1,5 @@ -SRCREV="f87898ca4a7d4b7171779c06ff1f4848efeee431" +SRCREV="c3e65564910151c3dc5e827945e3138287a3b901" +#SRCREV="74da7a88552ecf518e64642c90742fddca57be00" require uclibc.inc
@@ -11,7 +12,7 @@ PROVIDES += "virtual/${TARGET_PREFIX}libc-for-gcc" FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/uclibc-git' ], d)}" -SRC_URI = "git://uclibc.org/uClibc.git;branch=master;protocol=git \ +SRC_URI = "git://busybox.osuosl.org/uClibc.git;branch=master;protocol=git \ file://uClibc.machine \ file://uClibc.distro \ file://uclibc-arm-ftruncate64.patch \
@@ -22,9 +23,11 @@ SRC_URI = "git://uclibc.org/uClibc.git;branch=master;protocol=git \ file://argp-headers.patch \ file://remove_attribute_optimize_Os.patch \ file://compile-arm-fork-with-O2.patch \ - file://orign_path.patch \ - file://rtld_no.patch \ file://uclibc-execvpe.patch \ - file://uclibc_scheduler_update.patch \ + file://fix_libdl.patch \ + file://cross_compile_check.patch \ + file://sort-sections-option.patch \ " + + S = "${WORKDIR}/git"
Signature · 1 line
1.7.5.4
Re: [PATCH 2/2] uclibc: Upgrade to latest master
Quoted 12 lines · Khem Raj
Signed-off-by Khem Raj<[email protected]>--- .../uclibc/uclibc-git/cross_compile_check.patch | 13 + .../recipes-core/uclibc/uclibc-git/fix_libdl.patch | 58 +++ .../uclibc/uclibc-git/orign_path.patch | 183 -------- meta/recipes-core/uclibc/uclibc-git/rtld_no.patch | 216 --------- .../uclibc/uclibc-git/sort-sections-option.patch | 15 + meta/recipes-core/uclibc/uclibc-git/uClibc.distro | 2 + .../uclibc-git/uclibc_scheduler_update.patch | 455 -------------------- meta/recipes-core/uclibc/uclibc.inc | 2 +- meta/recipes-core/uclibc/uclibc_git.bb | 13 +- 9 files changed, 97 insertions(+), 860 deletions(-)
Quoted 7 lines
create mode 100644
meta/recipes-core/uclibc/uclibc-git/cross_compile_check.patchcreate mode 100644meta/recipes-core/uclibc/uclibc-git/fix_libdl.patchdelete mode 100644meta/recipes-core/uclibc/uclibc-git/orign_path.patchdelete mode 100644meta/recipes-core/uclibc/uclibc-git/rtld_no.patchcreate mode 100644meta/recipes-core/uclibc/uclibc-git/sort-sections-option.patchdelete mode 100644meta/recipes-core/uclibc/uclibc-git/uclibc_scheduler_update.patch
Khem,
These new patches don't have Upstream-Status or Signed-off-by tags.
Thanks
Sau!
Re: [PATCH 2/2] uclibc: Upgrade to latest master
Quoted 25 lines · Saul Wold
Quoted 14 lines · Khem Raj
Signed-off-by Khem Raj<[email protected]>---
.../uclibc/uclibc-git/cross_compile_check.patch | 13 +.../recipes-core/uclibc/uclibc-git/fix_libdl.patch| 58 +++.../uclibc/uclibc-git/orign_path.patch| 183 --------meta/recipes-core/uclibc/uclibc-git/rtld_no.patch | 216 --------- .../uclibc/uclibc-git/sort-sections-option.patch | 15 + meta/recipes-core/uclibc/uclibc-git/uClibc.distro | 2 +.../uclibc-git/uclibc_scheduler_update.patch | 455
--------------------
meta/recipes-core/uclibc/uclibc.inc | 2 +- meta/recipes-core/uclibc/uclibc_git.bb | 13 +-9 files changed, 97 insertions(+), 860 deletions(-)Quoted 10 lines
create mode 100644
meta/recipes-core/uclibc/uclibc-git/cross_compile_check.patchcreate mode 100644meta/recipes-core/uclibc/uclibc-git/fix_libdl.patchdelete mode 100644meta/recipes-core/uclibc/uclibc-git/orign_path.patchdelete mode 100644meta/recipes-core/uclibc/uclibc-git/rtld_no.patchcreate mode 100644meta/recipes-core/uclibc/uclibc-git/sort-sections-option.patchdelete mode 100644meta/recipes-core/uclibc/uclibc-git/uclibc_scheduler_update.patch
Quoted 3 lines
Khem,
These new patches don't have Upstream-Status or Signed-off-by tags.
Yeah. these should be all pushed upstream and signed-off-by me. :) but since this is git recipe I did not do it since soon it will become 0.9.33 release and thats when I planned to do it. I will add it anyway with next rev which should happen soonish.
-Khem
Saul Wold
AppliedQuoted 80 lines · Khem Raj
Examples do not compile correctly on latest uclibc
Signed-off-by Khem Raj<[email protected]>--- .../correct_rpl_gettimeofday_signature.patch | 57 ++++++++++++++++++++ meta/recipes-support/gnutls/gnutls_2.12.14.bb | 6 ++- 2 files changed, 61 insertions(+), 2 deletions(-)create mode 100644
meta/recipes-support/gnutls/gnutls-2.12.14/correct_rpl_gettimeofday_signature.patchmeta/recipes-support/gnutls/gnutls-2.12.14/correct_rpl_gettimeofday_signature.patch new file +57
-0@@ -0,0 +1,57 @@ +Currently we fail on uclibc like below + +| In file included from /home/kraj/work/angstrom/sources/openembedded-core/build/tmp-uclibc/sysroots/qemuarm/usr/include/sys/procfs.h:32:0, +| from /home/kraj/work/angstrom/sources/openembedded-core/build/tmp-uclibc/sysroots/qemuarm/usr/include/sys/ucontext.h:26, +| from /home/kraj/work/angstrom/sources/openembedded-core/build/tmp-uclibc/sysroots/qemuarm/usr/include/signal.h:392, +| from ../../gl/signal.h:52, +| from ../../gl/sys/select.h:58, +| from /home/kraj/work/angstrom/sources/openembedded-core/build/tmp-uclibc/sysroots/qemuarm/usr/include/sys/types.h:220, +| from ../../gl/sys/types.h:28, +| from ../../lib/includes/gnutls/gnutls.h:46, +| from ex-cxx.cpp:3: +| ../../gl/sys/time.h:396:66: error: conflicting declaration 'void* restrict' +| ../../gl/sys/time.h:396:50: error: 'restrict' has a previous declaration as 'timeval* restrict' +| make[4]: *** [ex-cxx.o] Error 1 +| make[4]: *** Waiting for unfinished jobs.... + + +GCC detects that we call 'restrict' as param name in function +signatures and complains since both params are called 'restrict' +therefore we use __restrict to denote the C99 keywork + +This only happens of uclibc since this code is not excercised with +eglibc otherwise we will have same issue there too + +Signed-off-by: Khem Raj<[email protected]> + +Upstream-Status: Pending + +Index: gnutls-2.12.14/gl/sys_time.in.h +=================================================================== +--- gnutls-2.12.14.orig/gl/sys_time.in.h 2012-01-15 10:54:39.517285351 -0800 ++++ gnutls-2.12.14/gl/sys_time.in.h 2012-01-15 10:59:23.773299108 -0800 +@@ -82,20 +82,20 @@ + # define gettimeofday rpl_gettimeofday + # endif + _GL_FUNCDECL_RPL (gettimeofday, int, +- (struct timeval *restrict, void *restrict) ++ (struct timeval *__restrict, void *__restrict) + _GL_ARG_NONNULL ((1))); + _GL_CXXALIAS_RPL (gettimeofday, int, +- (struct timeval *restrict, void *restrict)); ++ (struct timeval *__restrict, void *__restrict)); + # else + # if !@HAVE_GETTIMEOFDAY@ + _GL_FUNCDECL_SYS (gettimeofday, int, +- (struct timeval *restrict, void *restrict) ++ (struct timeval *__restrict, void *__restrict) + _GL_ARG_NONNULL ((1))); + # endif + /* Need to cast, because on glibc systems, by default, the second argument is + struct timezone *. */ + _GL_CXXALIAS_SYS_CAST (gettimeofday, int, +- (struct timeval *restrict, void *restrict)); ++ (struct timeval *__restrict, void *__restrict)); + # endif + _GL_CXXALIASWARN (gettimeofday); + # elif defined GNULIB_POSIXCHECKmeta/recipes-support/gnutls/gnutls_2.12.14.bb +0
-1@@ -1,9 +1,11 @@ require gnutls.inc -PR = "${INC_PR}.4"
meta/recipes-support/gnutls/gnutls_2.12.14.bb line 11
Quoted 10 lines
meta/recipes-support/gnutls/gnutls_2.12.14.bb +4
-1+PR = "${INC_PR}.5" SRC_URI += "file://gnutls-openssl.patch \ - file://configure-fix.patch" + file://correct_rpl_gettimeofday_signature.patch \ + file://configure-fix.patch \ + " python() { if not ((d.getVar("INCOMPATIBLE_LICENSE", True) or "").find("GPLv3") != -1):
Merged into OE-Core
Thanks
Sau!