* [PATCH 0/4] A few misc patch
@ 2013-07-15 20:10 Mark Hatle
2013-07-15 20:10 ` [PATCH 1/4] sanity.bbclass: Update gcc sanity check Mark Hatle
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Mark Hatle @ 2013-07-15 20:10 UTC (permalink / raw)
To: openembedded-core
The following is a small set of patches create in the last week or so when
upreving to the latest oe-core.
The sanity.bbclass may be the final fix for Yocto Project bug 4845.
Mark Hatle (4):
sanity.bbclass: Update gcc sanity check
terminal.bbclass: Fix BB_RUNFMT processing
busybox: fix ip reference in simple.script
dbus-ptest: Disable python module check
meta/classes/sanity.bbclass | 42 +++++++++++++++-------
meta/classes/terminal.bbclass | 4 ++-
meta/recipes-core/busybox/files/simple.script | 2 +-
.../dbus/dbus-1.6.8/python-config.patch | 25 +++++++++++++
meta/recipes-core/dbus/dbus-ptest_1.6.10.bb | 1 +
5 files changed, 59 insertions(+), 15 deletions(-)
create mode 100644 meta/recipes-core/dbus/dbus-1.6.8/python-config.patch
--
1.8.3
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/4] sanity.bbclass: Update gcc sanity check
2013-07-15 20:10 [PATCH 0/4] A few misc patch Mark Hatle
@ 2013-07-15 20:10 ` Mark Hatle
2013-07-15 20:10 ` [PATCH 2/4] terminal.bbclass: Fix BB_RUNFMT processing Mark Hatle
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: Mark Hatle @ 2013-07-15 20:10 UTC (permalink / raw)
To: openembedded-core
The gcc sanity check should be checking for the atomic function directly
instead of using the gcc macro. Older versions of gcc do not have the macro
defined, but do support the atomic operations. (glib-2.0 checks for both
the macro and the function, as long as one is available it will successfully
compile.)
Update the check to try both -mcpu=native and -mcpu=BUILD_ARCH. Tell the user
which version worked properly.
[YOCTO #4845]
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
---
meta/classes/sanity.bbclass | 42 +++++++++++++++++++++++++++++-------------
1 file changed, 29 insertions(+), 13 deletions(-)
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index b190eb2..a505a5d 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -280,31 +280,42 @@ def check_sanity_validmachine(sanity_data):
# Checks if necessary to add option march to host gcc
def check_gcc_march(sanity_data):
- result = False
+ result = True
+ message = ""
# Check if -march not in BUILD_CFLAGS
if sanity_data.getVar("BUILD_CFLAGS",True).find("-march") < 0:
+ result = False
# Construct a test file
f = open("gcc_test.c", "w")
- f.write("int main (){ __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4; return 0;}\n")
+ f.write("int main (){ volatile int atomic = 2; __sync_bool_compare_and_swap (&atomic, 2, 3); return 0; }\n")
f.close()
# Check if GCC could work without march
- status,result = oe.utils.getstatusoutput("${BUILD_PREFIX}gcc gcc_test.c -o gcc_test")
- if status != 0:
- # Check if GCC could work with march
- status,result = oe.utils.getstatusoutput("${BUILD_PREFIX}gcc -march=native gcc_test.c -o gcc_test")
- if status != 0:
- result = True
- else:
- result = False
+ if not result:
+ status,res = oe.utils.getstatusoutput("${BUILD_PREFIX}gcc gcc_test.c -o gcc_test")
+ if status == 0:
+ result = True;
+
+ if not result:
+ status,res = oe.utils.getstatusoutput("${BUILD_PREFIX}gcc -march=native gcc_test.c -o gcc_test")
+ if status == 0:
+ message = "BUILD_CFLAGS_append = \" -march=native\""
+ result = True;
+
+ if not result:
+ build_arch = sanity_data.getVar('BUILD_ARCH', True)
+ status,res = oe.utils.getstatusoutput("${BUILD_PREFIX}gcc -march=%s gcc_test.c -o gcc_test" % build_arch)
+ if status == 0:
+ message = "BUILD_CFLAGS_append = \" -march=%s\"" % build_arch
+ result = True;
os.remove("gcc_test.c")
if os.path.exists("gcc_test"):
os.remove("gcc_test")
- return result
+ return (result, message)
# Unpatched versions of make 3.82 are known to be broken. See GNU Savannah Bug 30612.
# Use a modified reproducer from http://savannah.gnu.org/bugs/?30612 to validate.
@@ -506,9 +517,14 @@ def check_sanity_version_change(status, d):
if not check_app_exists("qemu-arm", d):
status.addresult("qemu-native was in ASSUME_PROVIDED but the QEMU binaries (qemu-arm) can't be found in PATH")
- if check_gcc_march(d):
+ (result, message) = check_gcc_march(d)
+ if result and message:
status.addresult("Your gcc version is older than 4.5, please add the following param to local.conf\n \
- BUILD_CFLAGS_append = \" -march=native\"\n")
+ %s\n" % message)
+ if not result:
+ status.addresult("Your gcc version is older then 4.5 or is not working properly. Please verify you can build")
+ status.addresult(" and link something that uses atomic operations, such as: \n")
+ status.addresult(" __sync_bool_compare_and_swap (&atomic, 2, 3);\n")
# Check that TMPDIR isn't on a filesystem with limited filename length (eg. eCryptFS)
tmpdir = d.getVar('TMPDIR', True)
--
1.8.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/4] terminal.bbclass: Fix BB_RUNFMT processing
2013-07-15 20:10 [PATCH 0/4] A few misc patch Mark Hatle
2013-07-15 20:10 ` [PATCH 1/4] sanity.bbclass: Update gcc sanity check Mark Hatle
@ 2013-07-15 20:10 ` Mark Hatle
2013-07-15 20:10 ` [PATCH 3/4] busybox: fix ip reference in simple.script Mark Hatle
2013-07-15 20:10 ` [PATCH 4/4] dbus-ptest: Disable python module check Mark Hatle
3 siblings, 0 replies; 7+ messages in thread
From: Mark Hatle @ 2013-07-15 20:10 UTC (permalink / raw)
To: openembedded-core
BB_RUNFMT can include task and taskfunc, as well as func and pid. Add the
two missing items toe the runfmt processing.
Also BB_RUNFMT can include arbitrary directory structure.
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
---
meta/classes/terminal.bbclass | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/meta/classes/terminal.bbclass b/meta/classes/terminal.bbclass
index ae338e9..591b4ac 100644
--- a/meta/classes/terminal.bbclass
+++ b/meta/classes/terminal.bbclass
@@ -18,8 +18,10 @@ def emit_terminal_func(command, envdata, d):
envdata.setVarFlag(cmd_func, 'func', 1)
runfmt = d.getVar('BB_RUNFMT', True) or "run.{func}.{pid}"
- runfile = runfmt.format(func=cmd_func, pid=os.getpid())
+ runfile = runfmt.format(func=cmd_func, task=cmd_func, taskfunc=cmd_func, pid=os.getpid())
runfile = os.path.join(d.getVar('T', True), runfile)
+ bb.mkdirhier(os.path.dirname(runfile))
+
with open(runfile, 'w') as script:
script.write('#!/bin/sh -e\n')
bb.data.emit_func(cmd_func, script, envdata)
--
1.8.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/4] busybox: fix ip reference in simple.script
2013-07-15 20:10 [PATCH 0/4] A few misc patch Mark Hatle
2013-07-15 20:10 ` [PATCH 1/4] sanity.bbclass: Update gcc sanity check Mark Hatle
2013-07-15 20:10 ` [PATCH 2/4] terminal.bbclass: Fix BB_RUNFMT processing Mark Hatle
@ 2013-07-15 20:10 ` Mark Hatle
2013-07-15 20:10 ` [PATCH 4/4] dbus-ptest: Disable python module check Mark Hatle
3 siblings, 0 replies; 7+ messages in thread
From: Mark Hatle @ 2013-07-15 20:10 UTC (permalink / raw)
To: openembedded-core
The ip is being installed into /sbin as of the latest busybox.
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
---
meta/recipes-core/busybox/files/simple.script | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/recipes-core/busybox/files/simple.script b/meta/recipes-core/busybox/files/simple.script
index 6973985..78ac424 100644
--- a/meta/recipes-core/busybox/files/simple.script
+++ b/meta/recipes-core/busybox/files/simple.script
@@ -15,7 +15,7 @@ root_is_nfs() {
}
have_bin_ip=0
-if [ -x /bin/ip ]; then
+if [ -x /sbin/ip ]; then
have_bin_ip=1
fi
--
1.8.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 4/4] dbus-ptest: Disable python module check
2013-07-15 20:10 [PATCH 0/4] A few misc patch Mark Hatle
` (2 preceding siblings ...)
2013-07-15 20:10 ` [PATCH 3/4] busybox: fix ip reference in simple.script Mark Hatle
@ 2013-07-15 20:10 ` Mark Hatle
2013-07-15 23:48 ` Saul Wold
3 siblings, 1 reply; 7+ messages in thread
From: Mark Hatle @ 2013-07-15 20:10 UTC (permalink / raw)
To: openembedded-core
Disable the python module check, as the host python modules are
not needed for generating the target tests.
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
---
.../dbus/dbus-1.6.8/python-config.patch | 25 ++++++++++++++++++++++
meta/recipes-core/dbus/dbus-ptest_1.6.10.bb | 1 +
2 files changed, 26 insertions(+)
create mode 100644 meta/recipes-core/dbus/dbus-1.6.8/python-config.patch
diff --git a/meta/recipes-core/dbus/dbus-1.6.8/python-config.patch b/meta/recipes-core/dbus/dbus-1.6.8/python-config.patch
new file mode 100644
index 0000000..2944002
--- /dev/null
+++ b/meta/recipes-core/dbus/dbus-1.6.8/python-config.patch
@@ -0,0 +1,25 @@
+When building the dbus-ptest package, we have to enable python. However
+checking if the host-system python has the necessary library isn't useful.
+
+Disable the python module check for cross compiling.
+
+Upstream-Status: Inappropriate [oe specific]
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+--- dbus-1.6.8/configure.ac.orig 2013-07-11 14:15:58.834554799 -0500
++++ dbus-1.6.8/configure.ac 2013-07-11 14:14:40.969554848 -0500
+@@ -257,13 +257,6 @@
+ # full test coverage is required, Python is a hard dependency
+ AC_MSG_NOTICE([Full test coverage (--enable-tests=yes) requires Python, dbus-python, pygobject])
+ AM_PATH_PYTHON([2.6])
+- AC_MSG_CHECKING([for Python modules for full test coverage])
+- if "$PYTHON" -c "import dbus, gobject, dbus.mainloop.glib"; then
+- AC_MSG_RESULT([yes])
+- else
+- AC_MSG_RESULT([no])
+- AC_MSG_ERROR([cannot import dbus, gobject, dbus.mainloop.glib Python modules])
+- fi
+ else
+ # --enable-tests not given: do not abort if Python is missing
+ AM_PATH_PYTHON([2.6], [], [:])
diff --git a/meta/recipes-core/dbus/dbus-ptest_1.6.10.bb b/meta/recipes-core/dbus/dbus-ptest_1.6.10.bb
index 6c0f404..a8e82ef 100644
--- a/meta/recipes-core/dbus/dbus-ptest_1.6.10.bb
+++ b/meta/recipes-core/dbus/dbus-ptest_1.6.10.bb
@@ -14,6 +14,7 @@ SRC_URI = "http://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \
file://ptest.patch \
file://dbus-1.init \
file://run-ptest \
+ file://python-config.patch \
"
SRC_URI[md5sum] = "de4970c20629aeb958a12132415b3630"
--
1.8.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 4/4] dbus-ptest: Disable python module check
2013-07-15 20:10 ` [PATCH 4/4] dbus-ptest: Disable python module check Mark Hatle
@ 2013-07-15 23:48 ` Saul Wold
2013-07-16 0:23 ` Mark Hatle
0 siblings, 1 reply; 7+ messages in thread
From: Saul Wold @ 2013-07-15 23:48 UTC (permalink / raw)
To: Mark Hatle; +Cc: openembedded-core
On 07/15/2013 01:10 PM, Mark Hatle wrote:
> Disable the python module check, as the host python modules are
> not needed for generating the target tests.
>
> Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
> ---
> .../dbus/dbus-1.6.8/python-config.patch | 25 ++++++++++++++++++++++
> meta/recipes-core/dbus/dbus-ptest_1.6.10.bb | 1 +
You have a patch in the dbus-1.6.8 directory for a version 1.6.10, patch
not found!
Sau!
> 2 files changed, 26 insertions(+)
> create mode 100644 meta/recipes-core/dbus/dbus-1.6.8/python-config.patch
>
> diff --git a/meta/recipes-core/dbus/dbus-1.6.8/python-config.patch b/meta/recipes-core/dbus/dbus-1.6.8/python-config.patch
> new file mode 100644
> index 0000000..2944002
> --- /dev/null
> +++ b/meta/recipes-core/dbus/dbus-1.6.8/python-config.patch
> @@ -0,0 +1,25 @@
> +When building the dbus-ptest package, we have to enable python. However
> +checking if the host-system python has the necessary library isn't useful.
> +
> +Disable the python module check for cross compiling.
> +
> +Upstream-Status: Inappropriate [oe specific]
> +
> +Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
> +
> +--- dbus-1.6.8/configure.ac.orig 2013-07-11 14:15:58.834554799 -0500
> ++++ dbus-1.6.8/configure.ac 2013-07-11 14:14:40.969554848 -0500
> +@@ -257,13 +257,6 @@
> + # full test coverage is required, Python is a hard dependency
> + AC_MSG_NOTICE([Full test coverage (--enable-tests=yes) requires Python, dbus-python, pygobject])
> + AM_PATH_PYTHON([2.6])
> +- AC_MSG_CHECKING([for Python modules for full test coverage])
> +- if "$PYTHON" -c "import dbus, gobject, dbus.mainloop.glib"; then
> +- AC_MSG_RESULT([yes])
> +- else
> +- AC_MSG_RESULT([no])
> +- AC_MSG_ERROR([cannot import dbus, gobject, dbus.mainloop.glib Python modules])
> +- fi
> + else
> + # --enable-tests not given: do not abort if Python is missing
> + AM_PATH_PYTHON([2.6], [], [:])
> diff --git a/meta/recipes-core/dbus/dbus-ptest_1.6.10.bb b/meta/recipes-core/dbus/dbus-ptest_1.6.10.bb
> index 6c0f404..a8e82ef 100644
> --- a/meta/recipes-core/dbus/dbus-ptest_1.6.10.bb
> +++ b/meta/recipes-core/dbus/dbus-ptest_1.6.10.bb
> @@ -14,6 +14,7 @@ SRC_URI = "http://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \
> file://ptest.patch \
> file://dbus-1.init \
> file://run-ptest \
> + file://python-config.patch \
> "
>
> SRC_URI[md5sum] = "de4970c20629aeb958a12132415b3630"
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 4/4] dbus-ptest: Disable python module check
2013-07-15 23:48 ` Saul Wold
@ 2013-07-16 0:23 ` Mark Hatle
0 siblings, 0 replies; 7+ messages in thread
From: Mark Hatle @ 2013-07-16 0:23 UTC (permalink / raw)
To: Saul Wold; +Cc: openembedded-core
On 7/15/13 6:48 PM, Saul Wold wrote:
> On 07/15/2013 01:10 PM, Mark Hatle wrote:
>> Disable the python module check, as the host python modules are
>> not needed for generating the target tests.
>>
>> Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
>> ---
>> .../dbus/dbus-1.6.8/python-config.patch | 25 ++++++++++++++++++++++
>> meta/recipes-core/dbus/dbus-ptest_1.6.10.bb | 1 +
> You have a patch in the dbus-1.6.8 directory for a version 1.6.10, patch
> not found!
Sorry this was the version before I merged.. whoops.. v2 on it's way.
(And yes, I did actually verify v2 works!)
--MArk
> Sau!
>
>> 2 files changed, 26 insertions(+)
>> create mode 100644 meta/recipes-core/dbus/dbus-1.6.8/python-config.patch
>>
>> diff --git a/meta/recipes-core/dbus/dbus-1.6.8/python-config.patch b/meta/recipes-core/dbus/dbus-1.6.8/python-config.patch
>> new file mode 100644
>> index 0000000..2944002
>> --- /dev/null
>> +++ b/meta/recipes-core/dbus/dbus-1.6.8/python-config.patch
>> @@ -0,0 +1,25 @@
>> +When building the dbus-ptest package, we have to enable python. However
>> +checking if the host-system python has the necessary library isn't useful.
>> +
>> +Disable the python module check for cross compiling.
>> +
>> +Upstream-Status: Inappropriate [oe specific]
>> +
>> +Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
>> +
>> +--- dbus-1.6.8/configure.ac.orig 2013-07-11 14:15:58.834554799 -0500
>> ++++ dbus-1.6.8/configure.ac 2013-07-11 14:14:40.969554848 -0500
>> +@@ -257,13 +257,6 @@
>> + # full test coverage is required, Python is a hard dependency
>> + AC_MSG_NOTICE([Full test coverage (--enable-tests=yes) requires Python, dbus-python, pygobject])
>> + AM_PATH_PYTHON([2.6])
>> +- AC_MSG_CHECKING([for Python modules for full test coverage])
>> +- if "$PYTHON" -c "import dbus, gobject, dbus.mainloop.glib"; then
>> +- AC_MSG_RESULT([yes])
>> +- else
>> +- AC_MSG_RESULT([no])
>> +- AC_MSG_ERROR([cannot import dbus, gobject, dbus.mainloop.glib Python modules])
>> +- fi
>> + else
>> + # --enable-tests not given: do not abort if Python is missing
>> + AM_PATH_PYTHON([2.6], [], [:])
>> diff --git a/meta/recipes-core/dbus/dbus-ptest_1.6.10.bb b/meta/recipes-core/dbus/dbus-ptest_1.6.10.bb
>> index 6c0f404..a8e82ef 100644
>> --- a/meta/recipes-core/dbus/dbus-ptest_1.6.10.bb
>> +++ b/meta/recipes-core/dbus/dbus-ptest_1.6.10.bb
>> @@ -14,6 +14,7 @@ SRC_URI = "http://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \
>> file://ptest.patch \
>> file://dbus-1.init \
>> file://run-ptest \
>> + file://python-config.patch \
>> "
>>
>> SRC_URI[md5sum] = "de4970c20629aeb958a12132415b3630"
>>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-07-16 0:23 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-15 20:10 [PATCH 0/4] A few misc patch Mark Hatle
2013-07-15 20:10 ` [PATCH 1/4] sanity.bbclass: Update gcc sanity check Mark Hatle
2013-07-15 20:10 ` [PATCH 2/4] terminal.bbclass: Fix BB_RUNFMT processing Mark Hatle
2013-07-15 20:10 ` [PATCH 3/4] busybox: fix ip reference in simple.script Mark Hatle
2013-07-15 20:10 ` [PATCH 4/4] dbus-ptest: Disable python module check Mark Hatle
2013-07-15 23:48 ` Saul Wold
2013-07-16 0:23 ` Mark Hatle
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox