Skip to contentSkip to conversation

uclibc: remove PACKAGE_ARCH, fix compilation on i586

PATCH In review Phil Blundell 6 participants 13 messages Jun 3, 2011 – Jun 10, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 uclibc: remove PACKAGE_ARCH, fix compilation on i586

There is no good reason for uclibc to be machine specific. Remove local assignment to PACKAGE_ARCH so that it gets the default target architecture and bump PR for that change.

See http://lists.linuxtogo.org/pipermail/openembedded-core/2011-May/003064.html

Also replace a chunk of anonymous python with a COMPATIBLE_HOST declaration.

---
 .../uclibc/uclibc-git/epoll-asm-fix.patch          |   20 ++++++++++++++++++++
 meta/recipes-core/uclibc/uclibc.inc                |   12 +-----------
 meta/recipes-core/uclibc/uclibc_git.bb             |    5 ++---
 3 files changed, 23 insertions(+), 14 deletions(-)
 create mode 100644 meta/recipes-core/uclibc/uclibc-git/epoll-asm-fix.patch
meta/recipes-core/uclibc/uclibc-git/epoll-asm-fix.patch new file +20 -0
new file mode 100644
index 0000000..6129081
@@ -0,0 +1,20 @@
+diff --git a/libc/sysdeps/linux/common/epoll.c b/libc/sysdeps/linux/common/epoll.c
+index 85b0cfd..c034b2c 100644
+--- a/libc/sysdeps/linux/common/epoll.c
++++ b/libc/sysdeps/linux/common/epoll.c
+@@ -67,12 +67,13 @@ extern __typeof(epoll_pwait) __libc_epoll_pwait;
+ int __libc_epoll_pwait(int epfd, struct epoll_event *events, int maxevents,
+ 						int timeout, const sigset_t *set)
+ {
++	int nsig = _NSIG / 8;
+ 	if (SINGLE_THREAD_P)
+-		return INLINE_SYSCALL(epoll_pwait, 6, epfd, events, maxevents, timeout, set, _NSIG / 8);
++		return INLINE_SYSCALL(epoll_pwait, 6, epfd, events, maxevents, timeout, set, nsig);
+ # ifdef __UCLIBC_HAS_THREADS_NATIVE__
+ 	else {
+ 		int oldtype = LIBC_CANCEL_ASYNC ();
+-		int result = INLINE_SYSCALL(epoll_pwait, 6, epfd, events, maxevents, timeout, set, _NSIG / 8);
++		int result = INLINE_SYSCALL(epoll_pwait, 6, epfd, events, maxevents, timeout, set, nsig);
+ 		LIBC_CANCEL_RESET (oldtype);
+ 		return result;
+ 	}
meta/recipes-core/uclibc/uclibc.inc +1 -11
index c1bc422..a2c6ee5 100644
@@ -36,21 +36,11 @@ cp ${SYSROOT_DESTDIR}${libdir}/libc.so ${WORKDIR}/site_config_libc; \
 sed -i -e 's# ${base_libdir}# ${SYSROOT_DESTDIR}${base_libdir}#g' -e 's# ${libdir}# ${SYSROOT_DESTDIR}${libdir}#g' ${WORKDIR}/site_config_libc/libc.so; \
 "
 
-#
 # For now, we will skip building of a gcc package if it is a uclibc one
 # and our build is not a uclibc one, and we skip a glibc one if our build
 # is a uclibc build.
-#
-# See the note in gcc/gcc_3.4.0.oe
-#
+COMPATIBLE_HOST = ".*-uclibc.*"
 
-python __anonymous () {
-    import bb, re
-    uc_os = (re.match('.*uclibc*', bb.data.getVar('TARGET_OS', d, 1)) != None)
-    if not uc_os:
-        raise bb.parse.SkipPackage("incompatible with target %s" %
-                                   bb.data.getVar('TARGET_OS', d, 1))
-}
 PROVIDES += "virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc"
 DEPENDS = "virtual/${TARGET_PREFIX}binutils \
            virtual/${TARGET_PREFIX}gcc-intermediate \
meta/recipes-core/uclibc/uclibc_git.bb +2 -3
index eded2fb..33c6ec8 100644
@@ -2,11 +2,9 @@ SRCREV="71d63ed75648da9b0b71afabb9c60aaad792c55c"
 
 require uclibc.inc
 PV = "0.9.31+0.9.32rc3"
-PR = "${INC_PR}.2"
+PR = "${INC_PR}.3"
 PROVIDES += "virtual/${TARGET_PREFIX}libc-for-gcc"
 
-#recent versions uclibc require real kernel headers
-PACKAGE_ARCH = "${MACHINE_ARCH}"
 FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/uclibc-git' ], d)}"
 
 SRC_URI = "git://uclibc.org/uClibc.git;branch=master;protocol=git \
@@ -29,5 +27,6 @@ SRC_URI = "git://uclibc.org/uClibc.git;branch=master;protocol=git \
 	file://remove_attribute_optimize_Os.patch \
 	file://append_UCLIBC_EXTRA_CFLAGS.patch \
 	file://compile-arm-fork-with-O2.patch \
+	file://epoll-asm-fix.patch \
 	"
 S = "${WORKDIR}/git"
Signature · 1 line
1.7.2.5
Acked-by
#2 lore raw
Quoted 1 line · Phil Blundell

Ping?

Both changes are fine.

change from being machine specific is futuristic it will not work for all architectures that
uclibc supports but is sufficient for what we support/use in oe for now.

Quoted 22 lines

p.

Quoted 10 lines · Phil Blundell

There is no good reason for uclibc to be machine specific.  Remove local assignment to PACKAGE_ARCH so that it gets the default target architecture and bump PR for that change.

See http://lists.linuxtogo.org/pipermail/openembedded-core/2011-May/003064.html

Also replace a chunk of anonymous python with a COMPATIBLE_HOST declaration.

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

#3 lore raw

Op 7 jun 2011, om 19:43 heeft Khem Raj het volgende geschreven:

Quoted 8 lines · Phil Blundell
Quoted 1 line

Ping?

Both changes are fine.

change from being machine specific is futuristic it will not work for all architectures that
uclibc supports but is sufficient for what we support/use in oe for now.

If uclibc is *really* machine specific then everything that links against it should be machine specific as well. Since, as you say, the current configs are rather generic we should make that clear by making uclibc stop pretending to be machine specific.

regards,

Koen

#4 lore raw
Quoted 6 lines · Koen Kooi

Op 7 jun 2011, om 19:43 heeft Khem Raj het volgende geschreven:

Quoted 3 lines · Phil Blundell
Quoted 1 line

Ping?

Quoted 8 lines
Quoted 5 lines

Both changes are fine.

change from being machine specific is futuristic it will not work for all architectures that
uclibc supports but is sufficient for what we support/use in oe for now.

If uclibc is *really* machine specific then everything that links against it should be machine specific as well. Since, as you say, the current configs are rather generic we should make that clear by making uclibc stop pretending to be machine specific.

intention is to break that machine dependency if any. Since it used kconfig like kernel

many things like tune options and some workarounds creeped in, uclibc is intended to be made
clear of those and be machine independent thats why I am ok with this patch

Quoted 8 lines

regards,

Koen
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

#5 lore raw
In reply to Phil Blundell
Quoted 1 line · Phil Blundell

Ping?

I'm not against this move at all but before this patch merges we should really have a cleanup which removes the *.machine configuration files from the uclibc recipe directory along with all the machine specific overrides that are in use instead making them arch specific.

Any volunteers?

Cheers,

Richard

Quoted 20 lines

p.

Quoted 10 lines · Phil Blundell

There is no good reason for uclibc to be machine specific. Remove local assignment to PACKAGE_ARCH so that it gets the default target architecture and bump PR for that change.

See http://lists.linuxtogo.org/pipermail/openembedded-core/2011-May/003064.html

Also replace a chunk of anonymous python with a COMPATIBLE_HOST declaration.

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

#6 lore raw
Quoted 10 lines · Richard Purdie
Quoted 1 line · Phil Blundell

Ping?

I'm not against this move at all but before this patch merges we should really have a cleanup which removes the *.machine configuration files from the uclibc recipe directory along with all the machine specific overrides that are in use instead making them arch specific.

Any volunteers?

Yes thats in my todo list.

Quoted 33 lines

Cheers,

Richard

Quoted 12 lines

p.

Quoted 9 lines · Phil Blundell

There is no good reason for uclibc to be machine specific.  Remove local assignment to PACKAGE_ARCH so that it gets the default target architecture and bump PR for that change.

See http://lists.linuxtogo.org/pipermail/openembedded-core/2011-May/003064.html

Also replace a chunk of anonymous python with a COMPATIBLE_HOST declaration.

Quoted 8 lines
Quoted 1 line

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

#7 lore raw
In reply to Richard Purdie
Quoted 4 lines · Richard Purdie

I'm not against this move at all but before this patch merges we should really have a cleanup which removes the *.machine configuration files from the uclibc recipe directory along with all the machine specific overrides that are in use instead making them arch specific.

Okay, fair enough. I've resent the other, unrelated changes as separate patches and we can deal with PACKAGE_ARCH when the time is right.

p.

Acked-by on v1 1/1
#8 lore raw
In reply to Phil Blundell

Op 3 jun 2011, om 13:55 heeft Phil Blundell het volgende geschreven:

Quoted 10 lines

There is no good reason for uclibc to be machine specific. Remove local assignment to PACKAGE_ARCH so that it gets the default target architecture and bump PR for that change.

See http://lists.linuxtogo.org/pipermail/openembedded-core/2011-May/003064.html

Also replace a chunk of anonymous python with a COMPATIBLE_HOST declaration.

Not sure if we do this in the OE-core world, but:

#9 lore raw
In reply to Phil Blundell
Quoted 4 lines · Phil Blundell

There is no good reason for uclibc to be machine specific. Remove local assignment to PACKAGE_ARCH so that it gets the default target architecture and bump PR for that change.

Quoted 8 lines

See http://lists.linuxtogo.org/pipermail/openembedded-core/2011-May/003064.html

Also replace a chunk of anonymous python with a COMPATIBLE_HOST declaration.

---
  .../uclibc/uclibc-git/epoll-asm-fix.patch          |   20 ++++++++++++++++++++

This patch has not comments, Upstream-Status, or Sign-off-by.

Please add these so we have some history to this patch and can determine if it should be upstreamed.

Thanks
Sau!

Quoted 82 lines
  meta/recipes-core/uclibc/uclibc.inc                |   12 +-----------
  meta/recipes-core/uclibc/uclibc_git.bb             |    5 ++---
  3 files changed, 23 insertions(+), 14 deletions(-)

create mode 100644 meta/recipes-core/uclibc/uclibc-git/epoll-asm-fix.patch

meta/recipes-core/uclibc/uclibc-git/epoll-asm-fix.patch new file +20 -0
new file mode 100644
index 0000000..6129081
@@ -0,0 +1,20 @@
+diff --git a/libc/sysdeps/linux/common/epoll.c b/libc/sysdeps/linux/common/epoll.c
+index 85b0cfd..c034b2c 100644
+--- a/libc/sysdeps/linux/common/epoll.c
++++ b/libc/sysdeps/linux/common/epoll.c
+@@ -67,12 +67,13 @@ extern __typeof(epoll_pwait) __libc_epoll_pwait;
+ int __libc_epoll_pwait(int epfd, struct epoll_event *events, int maxevents,
+ 						int timeout, const sigset_t *set)
+ {
++	int nsig = _NSIG / 8;
+ 	if (SINGLE_THREAD_P)
+-		return INLINE_SYSCALL(epoll_pwait, 6, epfd, events, maxevents, timeout, set, _NSIG / 8);
++		return INLINE_SYSCALL(epoll_pwait, 6, epfd, events, maxevents, timeout, set, nsig);
+ # ifdef __UCLIBC_HAS_THREADS_NATIVE__
+ 	else {
+ 		int oldtype = LIBC_CANCEL_ASYNC ();
+-		int result = INLINE_SYSCALL(epoll_pwait, 6, epfd, events, maxevents, timeout, set, _NSIG / 8);
++		int result = INLINE_SYSCALL(epoll_pwait, 6, epfd, events, maxevents, timeout, set, nsig);
+ 		LIBC_CANCEL_RESET (oldtype);
+ 		return result;
+ 	}
meta/recipes-core/uclibc/uclibc.inc +1 -11
index c1bc422..a2c6ee5 100644
@@ -36,21 +36,11 @@ cp ${SYSROOT_DESTDIR}${libdir}/libc.so ${WORKDIR}/site_config_libc; \
  sed -i -e 's# ${base_libdir}# ${SYSROOT_DESTDIR}${base_libdir}#g' -e 's# ${libdir}# ${SYSROOT_DESTDIR}${libdir}#g' ${WORKDIR}/site_config_libc/libc.so; \
  "
 
-#
  # For now, we will skip building of a gcc package if it is a uclibc one
  # and our build is not a uclibc one, and we skip a glibc one if our build
  # is a uclibc build.
-#
-# See the note in gcc/gcc_3.4.0.oe
-#
+COMPATIBLE_HOST = ".*-uclibc.*"
 
-python __anonymous () {
-    import bb, re
-    uc_os = (re.match('.*uclibc*', bb.data.getVar('TARGET_OS', d, 1)) != None)
-    if not uc_os:
-        raise bb.parse.SkipPackage("incompatible with target %s" %
-                                   bb.data.getVar('TARGET_OS', d, 1))
-}
  PROVIDES += "virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc"
  DEPENDS = "virtual/${TARGET_PREFIX}binutils \
             virtual/${TARGET_PREFIX}gcc-intermediate \
meta/recipes-core/uclibc/uclibc_git.bb +2 -3
index eded2fb..33c6ec8 100644
@@ -2,11 +2,9 @@ SRCREV="71d63ed75648da9b0b71afabb9c60aaad792c55c"
 
  require uclibc.inc
  PV = "0.9.31+0.9.32rc3"
-PR = "${INC_PR}.2"
+PR = "${INC_PR}.3"
  PROVIDES += "virtual/${TARGET_PREFIX}libc-for-gcc"
 
-#recent versions uclibc require real kernel headers
-PACKAGE_ARCH = "${MACHINE_ARCH}"
  FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/uclibc-git' ], d)}"
 
  SRC_URI = "git://uclibc.org/uClibc.git;branch=master;protocol=git \
@@ -29,5 +27,6 @@ SRC_URI = "git://uclibc.org/uClibc.git;branch=master;protocol=git \
  	file://remove_attribute_optimize_Os.patch \
  	file://append_UCLIBC_EXTRA_CFLAGS.patch \
  	file://compile-arm-fork-with-O2.patch \
+	file://epoll-asm-fix.patch \
  	"
  S = "${WORKDIR}/git"
#10 lore raw
Quoted 4 lines · Saul Wold

This patch has not comments, Upstream-Status, or Sign-off-by.

Please add these so we have some history to this patch and can determine if it should be upstreamed.

Is there some documentation which describes how Upstream-Status is meant to be set?

Thanks

p.

#11 lore raw
Quoted 9 lines · Phil Blundell
Quoted 4 lines · Saul Wold

This patch has not comments, Upstream-Status, or Sign-off-by.

Please add these so we have some history to this patch and can determine if it should be upstreamed.

Is there some documentation which describes how Upstream-Status is meant to be set?

Mark Hatle has been working on the doc and a draft is out on the oe-dev alias, search for subject:

[oe] Commit and Patch message guidelines - fifth draft

I think he will be sending another draft this week, but the core info is there.

Sau!

Quoted 6 lines

Thanks

p.

#12 lore raw
In reply to Phil Blundell
Quoted 8 lines · Phil Blundell
Quoted 4 lines · Saul Wold

This patch has not comments, Upstream-Status, or Sign-off-by.

Please add these so we have some history to this patch and can determine if it should be upstreamed.

Is there some documentation which describes how Upstream-Status is meant to be set?

Blame me.. the submission guide info has been sent out in draft, and I'm working to get the final version done today.

Below is the chunk on the upstream status (from the last revision -- the fifth revision):

Patch Header Recommendations
----------------------------
In order to keep track of patches and ultimately reduce the number of patches that are required to be maintained, we need to track the status of the patches that are created. The following items are specific to patches applied by recipes.

In addition to the items mentioned above, we also want to track if it's appropriate to get this particular patch into the upstream project. Since we want to track this information, we need a consistent tag and set of status that can be searched.

While adding this tracking information to the patch headers is currently optional, it is highly recommended and some maintainers may require it. It is optional at this time so that it can be evaluated as to it's usefulness over time. Existing patches will be modified with the tag as they are modified.

As mentioned in the above, be sure to include any URL to bug tracking, mailing lists or other reference material pertaining to the patch. Then add a new tag "Upstream-Status:" which contains one of the following items:

Pending
- No determination has been made yet or not yet submitted to upstream

Submitted [where]
- Submitted to upstream, waiting approval
- Optionally include where it was submitted, such as the author, mailing list, etc.

Accepted
- Accepted in upstream, expect it to be removed at next update, include expected version info

Backport
- Backported from new upstream version, because we are at a fixed version, include upstream version info

Denied
- Not accepted by upstream, include reason in patch

Inappropriate [reason]
- The patch is not appropriate for upstream, include a brief reason on the same line enclosed with []
reason can be:
not author (You are not the author and do not intend to upstream this,
source must be listed in the comments)
native
licensing
configuration
enable feature
disable feature
bugfix (add bug URL here)
embedded specific
no upstream (the upstream is no longer available -- dead project) other (give details in comments)

The various "Inappropriate [reason]" status items are meant to indicate that the person reasonable for adding this patch to the system does not intend to upstream the patch for a specific reason. Unless otherwise noted, another person could submit this patch to the upstream, if they do the status should be changed to "Submitted [where]", and an additional signed-off-by: line added to the patch by the person claiming responsibility for upstreaming.

For example, if the patch has been submitted upstream:

rpm: Adjusted the foo setting in bar

[RPM Ticket #65] -- http://rpm5.org/cvs/tktview?tn=65,5

The foo setting in bar was decreased from X to X-50% in order to ensure we don't exhaust all system memory with foobar threads.

Upstream-Status: Submitted [[email protected]]

A future commit can change the value to "Accepted" or "Denied" as appropriate.