summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/conf/distro/include/distro_alias.inc1
-rw-r--r--meta/conf/layer.conf1
-rw-r--r--meta/recipes-kernel/oprofile/oprofile.inc65
-rw-r--r--meta/recipes-kernel/oprofile/oprofile/0001-Add-rmb-definition-for-NIOS2-architecture.patch30
-rw-r--r--meta/recipes-kernel/oprofile/oprofile/0001-Fix-FTBFS-problem-with-GCC-6.patch51
-rw-r--r--meta/recipes-kernel/oprofile/oprofile/acinclude.m4581
-rw-r--r--meta/recipes-kernel/oprofile/oprofile/automake-foreign.patch12
-rw-r--r--meta/recipes-kernel/oprofile/oprofile/musl.patch46
-rw-r--r--meta/recipes-kernel/oprofile/oprofile/oprofile-cross-compile-tests.patch98
-rw-r--r--meta/recipes-kernel/oprofile/oprofile/root-home-dir.patch44
-rw-r--r--meta/recipes-kernel/oprofile/oprofile/run-ptest19
-rw-r--r--meta/recipes-kernel/oprofile/oprofile_1.1.0.bb10
12 files changed, 0 insertions, 958 deletions
diff --git a/meta/conf/distro/include/distro_alias.inc b/meta/conf/distro/include/distro_alias.inc
index f7c8b4a6bd..3b0411c354 100644
--- a/meta/conf/distro/include/distro_alias.inc
+++ b/meta/conf/distro/include/distro_alias.inc
@@ -278,7 +278,6 @@ DISTRO_PN_ALIAS_pn-opkg-collateral = "OE-Core"
278DISTRO_PN_ALIAS_pn-opkg-keyrings = "OSPDT upstream=git://git.yoctoproject.org/opkg-utils" 278DISTRO_PN_ALIAS_pn-opkg-keyrings = "OSPDT upstream=git://git.yoctoproject.org/opkg-utils"
279DISTRO_PN_ALIAS_pn-opkg-nogpg = "OSPDT upstream=git://git.yoctoproject.org/opkg-utils" 279DISTRO_PN_ALIAS_pn-opkg-nogpg = "OSPDT upstream=git://git.yoctoproject.org/opkg-utils"
280DISTRO_PN_ALIAS_pn-opkg-utils = "OSPDT upstream=git://git.yoctoproject.org/opkg-utils" 280DISTRO_PN_ALIAS_pn-opkg-utils = "OSPDT upstream=git://git.yoctoproject.org/opkg-utils"
281DISTRO_PN_ALIAS_pn-oprofile = "Debian=oprofile Fedora=oprofile"
282DISTRO_PN_ALIAS_pn-os-release = "OE-Core" 281DISTRO_PN_ALIAS_pn-os-release = "OE-Core"
283DISTRO_PN_ALIAS_pn-packagegroup-base = "OE-Core" 282DISTRO_PN_ALIAS_pn-packagegroup-base = "OE-Core"
284DISTRO_PN_ALIAS_pn-packagegroup-core = "OE-Core" 283DISTRO_PN_ALIAS_pn-packagegroup-core = "OE-Core"
diff --git a/meta/conf/layer.conf b/meta/conf/layer.conf
index 6be2a57a70..034232474f 100644
--- a/meta/conf/layer.conf
+++ b/meta/conf/layer.conf
@@ -63,7 +63,6 @@ SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += " \
63 font-alias->font-util \ 63 font-alias->font-util \
64 weston-init->weston \ 64 weston-init->weston \
65 weston-init->kbd \ 65 weston-init->kbd \
66 oprofile->virtual/kernel \
67" 66"
68 67
69# We need to keep bitbake tools in PATH 68# We need to keep bitbake tools in PATH
diff --git a/meta/recipes-kernel/oprofile/oprofile.inc b/meta/recipes-kernel/oprofile/oprofile.inc
deleted file mode 100644
index 4b01654fa3..0000000000
--- a/meta/recipes-kernel/oprofile/oprofile.inc
+++ /dev/null
@@ -1,65 +0,0 @@
1SUMMARY = "System-Wide Profiler"
2DESCRIPTION = "OProfile is a system-wide profiler for Linux systems, capable \
3of profiling all running code at low overhead."
4HOMEPAGE = "http://oprofile.sourceforge.net/news/"
5BUGTRACKER = "http://sourceforge.net/tracker/?group_id=16191&atid=116191"
6
7LICENSE = "LGPLv2.1+ & GPLv2"
8LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
9 file://libopagent/opagent.h;beginline=5;endline=26;md5=4f16f72c7a493d8a4704aa18d03d15c6 \
10 "
11SECTION = "devel"
12
13DEPENDS = "popt binutils"
14RDEPENDS_${PN} = "binutils-symlinks"
15RRECOMMENDS_${PN} = "kernel-vmlinux"
16
17FILES_${PN} = "${bindir} ${libdir}/${BPN}/lib*${SOLIBS} ${datadir}/${BPN}"
18FILES_${PN}-dev += "${libdir}/${BPN}/lib*${SOLIBSDEV} ${libdir}/${BPN}/lib*.la"
19FILES_${PN}-staticdev += "${libdir}/${BPN}/lib*.a"
20
21SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz \
22 file://acinclude.m4 \
23 file://automake-foreign.patch \
24 file://oprofile-cross-compile-tests.patch \
25 file://run-ptest \
26 file://root-home-dir.patch \
27 file://0001-Add-rmb-definition-for-NIOS2-architecture.patch \
28 file://0001-Fix-FTBFS-problem-with-GCC-6.patch \
29"
30UPSTREAM_CHECK_REGEX = "oprofile-(?P<pver>\d+(\.\d+)+)/"
31UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/oprofile/files/oprofile/"
32
33SRC_URI_append_libc-musl = " file://musl.patch"
34
35inherit autotools pkgconfig ptest
36
37EXTRA_OECONF = "--with-kernel=${STAGING_DIR_HOST}${prefix} --without-x ac_cv_prog_XSLTPROC="
38do_configure () {
39 cp ${WORKDIR}/acinclude.m4 ${S}/
40 autotools_do_configure
41}
42
43EXTRA_OEMAKE = "SRCDIR=${PTEST_PATH}/libutil++/tests"
44do_compile_ptest() {
45 oe_runmake check
46}
47
48do_install_ptest() {
49 subdirs="libdb/tests libutil++/tests libregex/tests libutil/tests libop/tests libdb/tests "
50 for tooltest in ${subdirs}
51 do
52 find ${tooltest} -perm /u=x -type f| cpio -pvdu ${D}${PTEST_PATH}
53 done
54
55 # needed by some libop tests
56 cp -r events ${D}${PTEST_PATH}
57
58 # needed by libregex regex_test
59 cp libregex/stl.pat ${D}${PTEST_PATH}/libregex
60 cp libregex/tests/mangled-name ${D}${PTEST_PATH}/libregex/tests
61
62 # needed by litutil++ file_manip_tests
63 cp ${S}/libutil++/tests/file_manip_tests.cpp \
64 libutil++/tests/file_manip_tests.o ${D}${PTEST_PATH}/libutil++/tests
65}
diff --git a/meta/recipes-kernel/oprofile/oprofile/0001-Add-rmb-definition-for-NIOS2-architecture.patch b/meta/recipes-kernel/oprofile/oprofile/0001-Add-rmb-definition-for-NIOS2-architecture.patch
deleted file mode 100644
index ae8562a231..0000000000
--- a/meta/recipes-kernel/oprofile/oprofile/0001-Add-rmb-definition-for-NIOS2-architecture.patch
+++ /dev/null
@@ -1,30 +0,0 @@
1From 34b0d9b1a32fb404a30327a7ae8931c7c75583bf Mon Sep 17 00:00:00 2001
2From: Marek Vasut <marex@denx.de>
3Date: Tue, 9 Feb 2016 02:00:29 +0100
4Subject: [PATCH] Add rmb() definition for NIOS2 architecture
5
6Signed-off-by: Marek Vasut <marex@denx.de>
7Upstream-Status: Submitted [ http://marc.info/?l=oprofile-list&m=145501915931874&w=2 ]
8---
9 libperf_events/operf_utils.h | 5 +++++
10 1 file changed, 5 insertions(+)
11
12diff --git a/libperf_events/operf_utils.h b/libperf_events/operf_utils.h
13index 32954cc..8270e53 100644
14--- a/libperf_events/operf_utils.h
15+++ b/libperf_events/operf_utils.h
16@@ -178,6 +178,11 @@ void op_release_resources(void);
17 #define cpu_relax() asm volatile("" ::: "memory")
18 #endif
19
20+#ifdef __nios2__
21+#define rmb() asm volatile("" ::: "memory")
22+#define cpu_relax() asm volatile("" ::: "memory")
23+#endif
24+
25 #ifdef __tile__
26 #include <asm/unistd.h>
27 #define rmb() __insn_mf()
28--
292.7.0
30
diff --git a/meta/recipes-kernel/oprofile/oprofile/0001-Fix-FTBFS-problem-with-GCC-6.patch b/meta/recipes-kernel/oprofile/oprofile/0001-Fix-FTBFS-problem-with-GCC-6.patch
deleted file mode 100644
index d372fd527b..0000000000
--- a/meta/recipes-kernel/oprofile/oprofile/0001-Fix-FTBFS-problem-with-GCC-6.patch
+++ /dev/null
@@ -1,51 +0,0 @@
1From 39d4d46a0bd504ac708ffe72df87bf74cd12ad30 Mon Sep 17 00:00:00 2001
2From: William Cohen <wcohen@redhat.com>
3Date: Fri, 5 Feb 2016 17:30:19 -0500
4Subject: [PATCH] Fix FTBFS problem with GCC-6
5
6GCC-6 is pickier about some of the type conversions causing the Fedora
724 mass rebuild the build of oprofile failed with:
8
9make[3]: Entering directory '/builddir/build/BUILD/oprofile-1.1.0/libutil++'
10g++ -DHAVE_CONFIG_H -I. -I.. -I ../libutil -I ../libop -I ../libpp -W -Wall -fno-common -ftemplate-depth-50 -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -c -o op_bfd.o op_bfd.cpp
11op_bfd.cpp: In member function 'void op_bfd::get_symbol_range(symbol_index_t, long long unsigned int&, long long unsigned int&) const':
12op_bfd.cpp:538:47: error: cannot convert 'std::ostream {aka std::basic_ostream<char>}' to 'const bool' in initialization
13 bool const verbose = cverb << (vbfd & vlevel1);
14 ^
15op_bfd.cpp:546:7: error: in argument to unary !
16 if (!verbose)
17 ^~~~~~~
18
19Avoid the intermediate bool type to make GCC-6 happy.
20
21Signed-off-by: William Cohen <wcohen@redhat.com>
22---
23Upstream-Status: Backport
24
25 libutil++/op_bfd.cpp | 4 +---
26 1 file changed, 1 insertion(+), 3 deletions(-)
27
28diff --git a/libutil++/op_bfd.cpp b/libutil++/op_bfd.cpp
29index 389c920..f2eb42b 100644
30--- a/libutil++/op_bfd.cpp
31+++ b/libutil++/op_bfd.cpp
32@@ -535,15 +535,13 @@ void op_bfd::get_symbol_range(symbol_index_t sym_idx,
33 {
34 op_bfd_symbol const & sym = syms[sym_idx];
35
36- bool const verbose = cverb << (vbfd & vlevel1);
37-
38 if (anon_obj)
39 start = sym.vma();
40 else
41 start = sym.filepos();
42 end = start + sym.size();
43
44- if (!verbose)
45+ if (!(cverb << (vbfd & vlevel1)))
46 return;
47
48 io_state state(cverb << (vbfd & vlevel1));
49--
501.9.1
51
diff --git a/meta/recipes-kernel/oprofile/oprofile/acinclude.m4 b/meta/recipes-kernel/oprofile/oprofile/acinclude.m4
deleted file mode 100644
index 95ecd91b5e..0000000000
--- a/meta/recipes-kernel/oprofile/oprofile/acinclude.m4
+++ /dev/null
@@ -1,581 +0,0 @@
1dnl AX_KERNEL_OPTION(option, action-if-found, action-if-not-found)
2dnl see if autoconf.h defines the option
3AC_DEFUN([AX_KERNEL_OPTION], [
4SAVE_CFLAGS=$CFLAGS
5CFLAGS="-I$KINC -O2 -D__KERNEL__"
6AC_TRY_COMPILE( [#include <linux/config.h>],
7[
8#ifndef $1
9break_me_hard(\\\);
10#endif
11],[$2],[$3],)
12CFLAGS=$SAVE_CFLAGS
13])
14
15dnl Handle the 2.4 module inside module/
16AC_DEFUN([AX_CONFIG_MODULE],
17[
18if test ! -f $KINC/linux/autoconf.h; then
19 AC_MSG_ERROR([no suitably configured kernel include tree found])
20fi
21
22dnl --- Get Linux kernel version and compile parameters ---
23
24AC_SUBST(KVERS)
25AC_MSG_CHECKING([for kernel version])
26dnl it's like this to handle mandrake's fubar version.h - bug #471448
27eval KVERS=`gcc -I$KINC -E -dM $KINC/linux/version.h | grep -w UTS_RELEASE | awk '{print $[]3}'`
28AC_MSG_RESULT([$KVERS])
29case "$KVERS" in
302.2.*|2.4.*) ;;
31*) AC_MSG_ERROR([Unsupported kernel version])
32esac
33
34dnl Check for the minimal kernel version supported
35AC_MSG_CHECKING([kernel version])
36AX_KERNEL_VERSION(2, 2, 10, <=, AC_MSG_RESULT([ok]), AC_MSG_ERROR([check html documentation install section]))
37
38dnl linux/spinlock.h added at some point in past
39AC_MSG_CHECKING([for $KINC/linux/spinlock.h])
40if test -f $KINC/linux/spinlock.h; then
41 EXTRA_CFLAGS_MODULE="$EXTRA_CFLAGS_MODULE -DHAVE_LINUX_SPINLOCK_HEADER"
42 AC_MSG_RESULT([yes])
43else
44 AC_MSG_RESULT([no])
45fi
46
47AC_MSG_CHECKING([for rtc_lock])
48gcc -I$KINC -E $KINC/linux/mc146818rtc.h | grep rtc_lock >/dev/null
49if test "$?" -eq 0; then
50 EXTRA_CFLAGS_MODULE="$EXTRA_CFLAGS_MODULE -DRTC_LOCK"
51 AC_MSG_RESULT([yes])
52else
53 AC_MSG_RESULT([no])
54fi
55
56arch="unknown"
57AC_MSG_CHECKING(for x86-64 architecture)
58AX_KERNEL_OPTION(CONFIG_X86_64, x8664=1, x8664=0)
59AX_MSG_RESULT_YN($x8664)
60BUILD_HAMMER=no
61if test "$x8664" -eq 1; then
62 arch="x86"
63 BUILD_HAMMER=yes
64else
65 AC_MSG_CHECKING(for x86 architecture)
66 AX_KERNEL_OPTION(CONFIG_X86, x86=1, x86=0)
67 AX_KERNEL_OPTION(CONFIG_X86_WP_WORKS_OK, x86=1, x86=$x86)
68 AX_MSG_RESULT_YN($x86)
69 test "$x86" = 1 && arch="x86"
70
71 if test "$arch" = "unknown"; then
72 AC_MSG_CHECKING(for ia64 architecture)
73 AX_KERNEL_OPTION(CONFIG_IA64, ia64=1, ia64=0)
74 AX_MSG_RESULT_YN($ia64)
75 test "$ia64" = 1 && arch="ia64"
76 fi
77
78fi
79AC_SUBST(BUILD_HAMMER)
80
81test "$arch" = "unknown" && AC_MSG_ERROR(Unsupported architecture)
82
83dnl check to see if kernel verion appropriate for arch
84AC_MSG_CHECKING(arch/kernel version combination)
85case "$arch" in
86ia64)
87 AX_KERNEL_VERSION(2, 4, 18, <, AC_MSG_RESULT([ok]),
88 AC_MSG_ERROR([unsupported arch/kernel])) ;;
89*) AC_MSG_RESULT([ok])
90esac
91
92dnl for now we do not support PREEMPT patch
93AC_MSG_CHECKING([for preempt patch])
94AX_KERNEL_OPTION(CONFIG_PREEMPT,preempt=1,preempt=0)
95AX_MSG_RESULT_YN([$preempt])
96test "$preempt" = 0 || AC_MSG_ERROR([unsupported kernel configuration : CONFIG_PREEMPT])
97
98AC_SUBST(KINC)
99
100MODINSTALLDIR=/lib/modules/$KVERS
101
102OPROFILE_MODULE_ARCH=$arch
103AC_SUBST(OPROFILE_MODULE_ARCH)
104]
105)
106
107dnl AX_MSG_RESULT_YN(a)
108dnl results "yes" iff a==1, "no" else
109AC_DEFUN([AX_MSG_RESULT_YN], [x=no
110test "x$1" = "x1" && x=yes
111AC_MSG_RESULT($x)])
112
113dnl AX_MALLOC_ATTRIBUTE - see if gcc will take __attribute__((malloc))
114AC_DEFUN([AX_MALLOC_ATTRIBUTE],
115[
116AC_MSG_CHECKING([whether malloc attribute is understood])
117SAVE_CFLAGS=$CFLAGS
118CFLAGS="-Werror $CFLAGS"
119AC_TRY_COMPILE(,[
120void monkey() __attribute__((malloc));
121],AC_MSG_RESULT([yes]); AC_DEFINE(MALLOC_ATTRIBUTE_OK, 1, [whether malloc attribute is understood]), AC_MSG_RESULT([no]))
122CFLAGS=$SAVE_CFLAGS
123]
124)
125
126dnl builtin_expect is used in module we can't add that in config.h
127AC_DEFUN([AX_BUILTIN_EXPECT],
128[
129AC_MSG_CHECKING([whether __builtin_expect is understood])
130SAVE_CFLAGS=$CFLAGS
131CFLAGS="-Werror $CFLAGS"
132AC_TRY_LINK(,[
133int i;
134if (__builtin_expect(i, 0)) { }
135],
136AC_MSG_RESULT([yes]); EXTRA_CFLAGS_MODULE="$EXTRA_CFLAGS_MODULE -DEXPECT_OK",
137AC_MSG_RESULT([no]);)
138CFLAGS=$SAVE_CFLAGS
139]
140)
141
142dnl AX_EXTRA_DIRS - Let user specify extra dirs for include/libs
143AC_DEFUN([AX_EXTRA_DIRS],
144[
145AC_ARG_WITH(extra-includes,
146[ --with-extra-includes=DIR add extra include paths],
147 use_extra_includes="$withval",
148 use_extra_includes=NO
149)
150if test -n "$use_extra_includes" && \
151 test "$use_extra_includes" != "NO"; then
152 ac_save_ifs=$IFS
153 IFS=':'
154 for dir in $use_extra_includes; do
155 extra_includes="$extra_includes -I$dir"
156 done
157 IFS=$ac_save_ifs
158 CPPFLAGS="$CPPFLAGS $extra_includes"
159fi
160
161AC_ARG_WITH(extra-libs,
162[ --with-extra-libs=DIR add extra library paths],
163 use_extra_libs=$withval,
164 use_extra_libs=NO
165)
166if test -n "$use_extra_libs" && \
167 test "$use_extra_libs" != "NO"; then
168 ac_save_ifs=$IFS
169 IFS=':'
170 for dir in $use_extra_libs; do
171 extra_libraries="$extra_libraries -L$dir"
172 done
173 IFS=$ac_save_ifs
174 LDFLAGS="$LDFLAGS $extra_libraries"
175fi
176]
177)
178
179dnl AX_POPT_CONST - check popt prototype
180AC_DEFUN([AX_POPT_CONST],
181[
182AC_MSG_CHECKING([popt prototype])
183SAVE_CXXFLAGS=$CXXFLAGS
184CXXFLAGS="-Werror $CXXFLAGS"
185AC_TRY_COMPILE([#include <popt.h>],
186[
187int c; char **v;
188poptGetContext(0, c, v, 0, 0);
189],
190AC_MSG_RESULT([takes char **]);,
191AC_MSG_RESULT([takes const char **]); AC_DEFINE(CONST_POPT, 1, [whether popt prototype takes a const char **]))
192CXXFLAGS="$SAVE_CXXFLAGS"
193]
194)
195
196dnl AX_CHECK_SSTREAM - check if local sstream is needed to compile OK
197AC_DEFUN([AX_CHECK_SSTREAM],
198[
199AC_MSG_CHECKING([whether to use included sstream])
200AC_TRY_COMPILE([#include <sstream>], [],
201AC_MSG_RESULT([no]);,
202AC_MSG_RESULT([yes]); OP_CXXFLAGS="$OP_CXXFLAGS -I\${top_srcdir}/include")
203]
204)
205
206dnl AX_CHECK_TYPEDEF(typedef_name, type, action-if-true, action-if-false)
207dnl exec action-if-true if typedef_name is a typedef to type else exec
208dnl action-if-false
209dnl currently work only with type typedef'ed in stddef.h
210AC_DEFUN([AX_CHECK_TYPEDEF], [
211dnl AC_LANG_PUSH(C) not in autoconf 2.13
212AC_LANG_SAVE
213AC_LANG_C
214SAVE_CFLAGS=$CFLAGS
215CFLAGS="-Werror $CFLAGS"
216
217AC_TRY_COMPILE(
218 [
219 #include <stddef.h>
220 ],
221 [
222 typedef void (*fct1)($1);
223 typedef void (*fct2)($2);
224 fct1 f1 = 0;
225 fct2 f2 = 0;
226 if (f1 == f2) {}
227 ],
228[$3],[$4])
229
230CFLAGS=$SAVE_CFLAGS
231AC_LANG_RESTORE
232])
233
234
235dnl AX_TYPEDEFED_NAME(typedef_name, candidate_list, var_name)
236dnl set var_name to the typedef name of $1 which must be in canditate_list
237dnl else produce a fatal error
238AC_DEFUN([AX_TYPEDEFED_NAME], [
239 AC_MSG_CHECKING([type of $1])
240 for f in $2; do
241 AX_CHECK_TYPEDEF($1, $f, $3="$f", $3="")
242 if test -n "${$3}"; then
243 break
244 fi
245 done
246 if test -n "${$3}"; then
247 AC_MSG_RESULT([${$3}])
248 else
249 AC_MSG_ERROR([not found])
250 fi
251])
252
253dnl find a binary in the path
254AC_DEFUN([QT_FIND_PATH],
255[
256 AC_MSG_CHECKING([for $1])
257 AC_CACHE_VAL(qt_cv_path_$1,
258 [
259 qt_cv_path_$1="NONE"
260 if test -n "$$2"; then
261 qt_cv_path_$1="$$2";
262 else
263 dirs="$3"
264 qt_save_IFS=$IFS
265 IFS=':'
266 for dir in $PATH; do
267 dirs="$dirs $dir"
268 done
269 IFS=$qt_save_IFS
270
271 for dir in $dirs; do
272 if test -x "$dir/$1"; then
273 if test -n "$5"; then
274 evalstr="$dir/$1 $5 2>&1 "
275 if eval $evalstr; then
276 qt_cv_path_$1="$dir/$1"
277 break
278 fi
279 else
280 qt_cv_path_$1="$dir/$1"
281 break
282 fi
283 fi
284 done
285 fi
286 ])
287
288 if test -z "$qt_cv_path_$1" || test "$qt_cv_path_$1" = "NONE"; then
289 AC_MSG_RESULT(not found)
290 $4
291 else
292 AC_MSG_RESULT($qt_cv_path_$1)
293 $2=$qt_cv_path_$1
294 fi
295])
296
297dnl Find the uic compiler on the path or in qt_cv_dir
298AC_DEFUN([QT_FIND_UIC],
299[
300 QT_FIND_PATH(uic, ac_uic, $qt_cv_dir/bin)
301 if test -z "$ac_uic" -a "$FATAL" = 1; then
302 AC_MSG_ERROR([uic binary not found in \$PATH or $qt_cv_dir/bin !])
303 fi
304])
305
306dnl Find the right moc in path/qt_cv_dir
307AC_DEFUN([QT_FIND_MOC],
308[
309 QT_FIND_PATH(moc2, ac_moc2, $qt_cv_dir/bin)
310 QT_FIND_PATH(moc, ac_moc1, $qt_cv_dir/bin)
311
312 if test -n "$ac_moc1" -a -n "$ac_moc2"; then
313 dnl found both. Prefer Qt3's if it exists else moc2
314 $ac_moc1 -v 2>&1 | grep "Qt 3" >/dev/null
315 if test "$?" = 0; then
316 ac_moc=$ac_moc1;
317 else
318 ac_moc=$ac_moc2;
319 fi
320 else
321 if test -n "$ac_moc1"; then
322 ac_moc=$ac_moc1;
323 else
324 ac_moc=$ac_moc2;
325 fi
326 fi
327
328 if test -z "$ac_moc" -a "$FATAL" = 1; then
329 AC_MSG_ERROR([moc binary not found in \$PATH or $qt_cv_dir/bin !])
330 fi
331])
332
333dnl check a particular libname
334AC_DEFUN([QT_TRY_LINK],
335[
336 SAVE_LIBS="$LIBS"
337 LIBS="$LIBS $1"
338 AC_TRY_LINK([
339 #include <qglobal.h>
340 #include <qstring.h>
341 ],
342 [
343 QString s("mangle_failure");
344 #if (QT_VERSION < 221)
345 break_me_(\\\);
346 #endif
347 ],
348 qt_cv_libname=$1,
349 )
350 LIBS="$SAVE_LIBS"
351])
352
353dnl check we can do a compile
354AC_DEFUN([QT_CHECK_COMPILE],
355[
356 AC_MSG_CHECKING([for Qt library name])
357
358 AC_CACHE_VAL(qt_cv_libname,
359 [
360 AC_LANG_CPLUSPLUS
361 SAVE_CXXFLAGS=$CXXFLAGS
362 CXXFLAGS="$CXXFLAGS $QT_INCLUDES $QT_LDFLAGS"
363
364 for libname in -lqt-mt -lqt3 -lqt2 -lqt;
365 do
366 QT_TRY_LINK($libname)
367 if test -n "$qt_cv_libname"; then
368 break;
369 fi
370 done
371
372 CXXFLAGS=$SAVE_CXXFLAGS
373 ])
374
375 if test -z "$qt_cv_libname"; then
376 AC_MSG_RESULT([failed])
377 if test "$FATAL" = 1 ; then
378 AC_MSG_ERROR([Cannot compile a simple Qt executable. Check you have the right \$QTDIR !])
379 fi
380 else
381 AC_MSG_RESULT([$qt_cv_libname])
382 fi
383])
384
385dnl get Qt version we're using
386AC_DEFUN([QT_GET_VERSION],
387[
388 AC_CACHE_CHECK([Qt version],lyx_cv_qtversion,
389 [
390 AC_LANG_CPLUSPLUS
391 SAVE_CPPFLAGS=$CPPFLAGS
392 CPPFLAGS="$CPPFLAGS $QT_INCLUDES"
393
394 cat > conftest.$ac_ext <<EOF
395#line __oline__ "configure"
396#include "confdefs.h"
397#include <qglobal.h>
398"%%%"QT_VERSION_STR"%%%"
399EOF
400 lyx_cv_qtversion=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | \
401 grep '^"%%%"' 2>/dev/null | \
402 sed -e 's/"%%%"//g' -e 's/"//g'`
403 rm -f conftest.$ac_ext
404 CPPFLAGS=$SAVE_CPPFLAGS
405 ])
406
407 QT_VERSION=$lyx_cv_qtversion
408 AC_SUBST(QT_VERSION)
409])
410
411dnl start here
412AC_DEFUN([QT_DO_IT_ALL],
413[
414 dnl Please leave this alone. I use this file in
415 dnl oprofile.
416 FATAL=0
417
418 AC_ARG_WITH(qt-dir, [ --with-qt-dir where the root of Qt is installed ],
419 [ qt_cv_dir=`eval echo "$withval"/` ])
420
421 AC_ARG_WITH(qt-includes, [ --with-qt-includes where the Qt includes are. ],
422 [ qt_cv_includes=`eval echo "$withval"` ])
423
424 AC_ARG_WITH(qt-libraries, [ --with-qt-libraries where the Qt library is installed.],
425 [ qt_cv_libraries=`eval echo "$withval"` ])
426
427 dnl pay attention to $QTDIR unless overridden
428 if test -z "$qt_cv_dir"; then
429 qt_cv_dir=$QTDIR
430 fi
431
432 dnl derive inc/lib if needed
433 if test -n "$qt_cv_dir"; then
434 if test -z "$qt_cv_includes"; then
435 qt_cv_includes=$qt_cv_dir/include
436 fi
437 if test -z "$qt_cv_libraries"; then
438 qt_cv_libraries=$qt_cv_dir/lib
439 fi
440 fi
441
442 dnl flags for compilation
443 QT_INCLUDES=
444 QT_LDFLAGS=
445 if test -n "$qt_cv_includes"; then
446 QT_INCLUDES="-I$qt_cv_includes"
447 fi
448 if test -n "$qt_cv_libraries"; then
449 QT_LDFLAGS="-L$qt_cv_libraries"
450 fi
451 AC_SUBST(QT_INCLUDES)
452 AC_SUBST(QT_LDFLAGS)
453
454 QT_FIND_MOC
455 MOC=$ac_moc
456 AC_SUBST(MOC)
457 QT_FIND_UIC
458 UIC=$ac_uic
459 AC_SUBST(UIC)
460
461 QT_CHECK_COMPILE
462
463 QT_LIB=$qt_cv_libname;
464 AC_SUBST(QT_LIB)
465
466 if test -n "$qt_cv_libname"; then
467 QT_GET_VERSION
468 fi
469])
470
471dnl AX_CXXFLAGS_OPTIONS(var-name, option)
472dnl add option to var-name if $CXX support it.
473AC_DEFUN([AX_CHECK_PRECOMPILED_HEADER], [
474AC_MSG_CHECKING([whether ${CXX} support precompiled header])
475AC_LANG_SAVE
476AC_LANG_CPLUSPLUS
477SAVE_CXXFLAGS=$CXXFLAGS
478dnl we consider than if -Winvalid-pch is accepted pch will works ...
479CXXFLAGS=-Winvalid-pch
480dnl but we don't want -Winvalid-pch else compilation will fail due -Werror and
481dnl the fact than some pch will be invalid for the given compilation option
482AC_TRY_COMPILE(,[;],AC_MSG_RESULT([yes]); $1="${$1} -include bits/stdc++.h", AC_MSG_RESULT([no]))
483CXXFLAGS=$SAVE_CXXFLAGS
484AC_LANG_RESTORE
485])
486
487dnl AX_CHECK_DOCBOOK
488AC_DEFUN([AX_CHECK_DOCBOOK], [
489# It's just rude to go over the net to build
490XSLTPROC_FLAGS=--nonet
491DOCBOOK_ROOT=
492if test ! -f /etc/xml/catalog; then
493 for i in /usr/share/sgml/docbook/stylesheet/xsl/nwalsh /usr/share/sgml/docbook/xsl-stylesheets/;
494 do
495 if test -d "$i"; then
496 DOCBOOK_ROOT=$i
497 fi
498 done
499
500 # Last resort - try net
501 if test -z "$DOCBOOK_ROOT"; then
502 XSLTPROC_FLAGS=
503 fi
504else
505 XML_CATALOG=/etc/xml/catalog
506 CAT_ENTRY_START='<!--'
507 CAT_ENTRY_END='-->'
508fi
509
510AC_CHECK_PROG(XSLTPROC,xsltproc,xsltproc,)
511XSLTPROC_WORKS=no
512if test -n "$XSLTPROC"; then
513 AC_MSG_CHECKING([whether xsltproc works])
514
515 if test -n "$XML_CATALOG"; then
516 DB_FILE="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"
517 else
518 DB_FILE="$DOCBOOK_ROOT/docbook.xsl"
519 fi
520
521 $XSLTPROC $XSLTPROC_FLAGS $DB_FILE >/dev/null 2>&1 << END
522<?xml version="1.0" encoding='ISO-8859-1'?>
523<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
524<book id="test">
525</book>
526END
527 if test "$?" = 0; then
528 XSLTPROC_WORKS=yes
529 fi
530 AC_MSG_RESULT($XSLTPROC_WORKS)
531fi
532AM_CONDITIONAL(have_xsltproc, test "$XSLTPROC_WORKS" = "yes")
533
534AC_SUBST(XML_CATALOG)
535AC_SUBST(XSLTPROC_FLAGS)
536AC_SUBST(DOCBOOK_ROOT)
537AC_SUBST(CAT_ENTRY_START)
538AC_SUBST(CAT_ENTRY_END)
539])
540
541dnl AX_CFLAGS_OPTIONS(var-name, option)
542dnl add option to var-name if $CC support it.
543AC_DEFUN([AX_CFLAGS_OPTION], [
544AC_MSG_CHECKING([whether ${CC} $2 is understood])
545AC_LANG_SAVE
546AC_LANG_C
547SAVE_CFLAGS=$CFLAGS
548CFLAGS=$2
549AC_TRY_COMPILE(,[;],AC_MSG_RESULT([yes]); $1="${$1} $2",AC_MSG_RESULT([no]))
550CFLAGS=$SAVE_CFLAGS
551AC_LANG_RESTORE
552])
553
554
555dnl AX_CXXFLAGS_OPTIONS(var-name, option)
556dnl add option to var-name if $CXX support it.
557AC_DEFUN([AX_CXXFLAGS_OPTION], [
558AC_MSG_CHECKING([whether ${CXX} $2 is understood])
559AC_LANG_SAVE
560AC_LANG_CPLUSPLUS
561SAVE_CXXFLAGS=$CXXFLAGS
562CXXFLAGS=$2
563AC_TRY_COMPILE(,[;],AC_MSG_RESULT([yes]); $1="${$1} $2",AC_MSG_RESULT([no]))
564CXXFLAGS=$SAVE_CXXFLAGS
565AC_LANG_RESTORE
566])
567
568dnl AX_COPY_IF_CHANGE(source, dest)
569dnl copy source to dest if they don't compare equally or if dest doesn't exist
570AC_DEFUN([AX_COPY_IF_CHANGE], [
571if test -r $2; then
572 if cmp $1 $2 > /dev/null; then
573 echo $2 is unchanged
574 else
575 cp -f $1 $2
576 fi
577else
578 cp -f $1 $2
579fi
580])
581
diff --git a/meta/recipes-kernel/oprofile/oprofile/automake-foreign.patch b/meta/recipes-kernel/oprofile/oprofile/automake-foreign.patch
deleted file mode 100644
index b9bb6c5779..0000000000
--- a/meta/recipes-kernel/oprofile/oprofile/automake-foreign.patch
+++ /dev/null
@@ -1,12 +0,0 @@
1oprofile doesn't want GNU-levels of automake strictness so tell it to be "foreign".
2
3Upstream-Status: Pending
4Signed-off-by: Ross Burton <ross.burton@intel.com>
5
6diff --git a/configure.ac b/configure.ac
7index 5740585..cf6c316 100644
8--- a/configure.ac
9+++ b/configure.ac
10@@ -16 +16 @@ AC_CONFIG_SRCDIR([libop/op_config.h])
11-AM_INIT_AUTOMAKE
12+AM_INIT_AUTOMAKE([foreign])
diff --git a/meta/recipes-kernel/oprofile/oprofile/musl.patch b/meta/recipes-kernel/oprofile/oprofile/musl.patch
deleted file mode 100644
index 51db408454..0000000000
--- a/meta/recipes-kernel/oprofile/oprofile/musl.patch
+++ /dev/null
@@ -1,46 +0,0 @@
1Fix glibc-isms so that oprofile builds with musl.
2
3Patch taken from openwrt (https://github.com/openwrt-mirror/openwrt/blob/master/package/devel/oprofile/patches/100-musl.patch)
4
5Upstream-Status: Pending
6Signed-off-by: Ross Burton <ross.burton@intel.com>
7
8--- a/pe_profiling/operf.cpp
9+++ b/pe_profiling/operf.cpp
10@@ -857,11 +857,14 @@ static int __delete_old_previous_sample_
11 int tflag __attribute__((unused)),
12 struct FTW *ftwbuf __attribute__((unused)))
13 {
14+ int err;
15+
16 if (remove(fpath)) {
17+ err = errno;
18 perror("sample data removal error");
19- return FTW_STOP;
20+ return err;
21 } else {
22- return FTW_CONTINUE;
23+ return 0;
24 }
25 }
26
27@@ -896,7 +899,7 @@ static void convert_sample_data(void)
28 return;
29
30 if (!operf_options::append) {
31- int flags = FTW_DEPTH | FTW_ACTIONRETVAL;
32+ int flags = FTW_DEPTH;
33 errno = 0;
34 if (nftw(previous_sampledir.c_str(), __delete_old_previous_sample_data, 32, flags) !=0 &&
35 errno != ENOENT) {
36--- a/libop/op_events.c
37+++ b/libop/op_events.c
38@@ -83,7 +83,7 @@ static int parse_hex(char const * str)
39 static u64 parse_long_hex(char const * str)
40 {
41 u64 value;
42- if (sscanf(str, "%Lx", &value) != 1)
43+ if (sscanf(str, "0x%llx", &value) != 1)
44 parse_error("expected long hexadecimal value");
45
46 fflush(stderr);
diff --git a/meta/recipes-kernel/oprofile/oprofile/oprofile-cross-compile-tests.patch b/meta/recipes-kernel/oprofile/oprofile/oprofile-cross-compile-tests.patch
deleted file mode 100644
index aefa9548e1..0000000000
--- a/meta/recipes-kernel/oprofile/oprofile/oprofile-cross-compile-tests.patch
+++ /dev/null
@@ -1,98 +0,0 @@
1Prevent running check tests on host if cross compiling
2
3This patch enables running the 'make check' tests on the target
4in a cross-compiled environment. If not cross-compiling, then 'make
5 check' builds and executes the tests; no change from this patch.
6In a cross-compiling environment, the make variable CROSS_COMPILE is
7set which bypasses assiging tests to the makekfile variable TESTS.
8Since TESTS is empty, the 'make check' process never tries to run the
9tests on the hosts. On the target, the tests must be run manually.
10
11Also, in the libutil++ tests, a makefile variable SRCDIR is passed into
12the compilation phase, pointing to the runtime location of the test
13'file-manip-tests'. The mechanism used for a host test, based on
14'topdir' doesn't work. Instead, if CROSS_COMPILE is set, the
15makefile takes the path of SRCDIR from the build environment and not
16from an expression based on the host path 'topdir'.
17
18Upstream-Status: Pending
19
20Signed-off-by: Dave Lerner <dave.lerner@windriver.com>
21
22diff --git a/configure.ac b/configure.ac
23index 41ece64..ce5a16f 100644
24--- a/configure.ac
25+++ b/configure.ac
26@@ -392,6 +392,7 @@ AC_ARG_ENABLE(account-check,
27 enable_account_check=$enableval, enable_account_check=yes)
28
29 AM_CONDITIONAL(CHECK_ACCOUNT, test "x$enable_account_check" = "xyes")
30+AM_CONDITIONAL(CROSS_COMPILE, test "x$cross_compiling" = "xyes")
31
32 AC_SUBST(OP_CFLAGS)
33 AC_SUBST(OP_CXXFLAGS)
34diff --git a/libdb/tests/Makefile.am b/libdb/tests/Makefile.am
35index 8a69003..d820090 100644
36--- a/libdb/tests/Makefile.am
37+++ b/libdb/tests/Makefile.am
38@@ -13,4 +13,6 @@ check_PROGRAMS = db_test
39 db_test_SOURCES = db_test.c
40 db_test_LDADD = ../libodb.a ../../libutil/libutil.a
41
42+if ! CROSS_COMPILE
43 TESTS = ${check_PROGRAMS}
44+endif
45diff --git a/libop/tests/Makefile.am b/libop/tests/Makefile.am
46index 8a79eb5..6d417c4 100644
47--- a/libop/tests/Makefile.am
48+++ b/libop/tests/Makefile.am
49@@ -33,4 +33,6 @@ load_events_files_tests_LDADD = ${COMMON_LIBS}
50 mangle_tests_SOURCES = mangle_tests.c
51 mangle_tests_LDADD = ${COMMON_LIBS}
52
53+if ! CROSS_COMPILE
54 TESTS = ${check_PROGRAMS} utf8_checker.sh
55+endif
56diff --git a/libregex/tests/Makefile.am b/libregex/tests/Makefile.am
57index 6f19838..1d176f9 100644
58--- a/libregex/tests/Makefile.am
59+++ b/libregex/tests/Makefile.am
60@@ -18,4 +18,6 @@ java_test_LDADD = \
61
62 EXTRA_DIST = mangled-name.in
63
64+if ! CROSS_COMPILE
65 TESTS = ${check_PROGRAMS}
66+endif
67diff --git a/libutil++/tests/Makefile.am b/libutil++/tests/Makefile.am
68index 51af031..a01ea2d 100644
69--- a/libutil++/tests/Makefile.am
70+++ b/libutil++/tests/Makefile.am
71@@ -1,7 +1,9 @@
72
73 REALPATH= readlink -f
74
75+if ! CROSS_COMPILE
76 SRCDIR := $(shell $(REALPATH) $(topdir)/libutil++/tests/ )
77+endif
78
79 AM_CPPFLAGS = \
80 -I ${top_srcdir}/libutil++ -D SRCDIR="\"$(SRCDIR)/\"" @OP_CPPFLAGS@
81@@ -46,4 +48,6 @@ cached_value_tests_LDADD = ${COMMON_LIBS}
82 utility_tests_SOURCES = utility_tests.cpp
83 utility_tests_LDADD = ${COMMON_LIBS}
84
85+if ! CROSS_COMPILE
86 TESTS = ${check_PROGRAMS}
87+endif
88diff --git a/libutil/tests/Makefile.am b/libutil/tests/Makefile.am
89index dfcd6ec..e8831b5 100644
90--- a/libutil/tests/Makefile.am
91+++ b/libutil/tests/Makefile.am
92@@ -12,4 +12,6 @@ file_tests_LDADD = ../libutil.a
93 string_tests_SOURCES = string_tests.c
94 string_tests_LDADD = ../libutil.a
95
96+if ! CROSS_COMPILE
97 TESTS = ${check_PROGRAMS}
98+endif
diff --git a/meta/recipes-kernel/oprofile/oprofile/root-home-dir.patch b/meta/recipes-kernel/oprofile/oprofile/root-home-dir.patch
deleted file mode 100644
index 3eaf6a794a..0000000000
--- a/meta/recipes-kernel/oprofile/oprofile/root-home-dir.patch
+++ /dev/null
@@ -1,44 +0,0 @@
1oprofile: Determine the root home directory dynamically
2
3This commit detects the root home directory dynamically with changes to
4the oprofile gui app source.
5
6The commit replaces an earlier fix that detected and adjusted a
7'non-standard' root home directory at build time. The advantage of this
8patch is that the oprofile tools are adjusted to the current run-time
9path to ~root, not the build time path.
10
11Upstream-Status: Inappropriate [OE specific]
12
13Signed-off-by: Dave Lerner <dave.lerner@windriver.com>
14
15Index: oprofile-1.0.0/doc/oprofile.html
16===================================================================
17--- oprofile-1.0.0.orig/doc/oprofile.html 2014-11-03 17:55:31.511034857 +0000
18+++ oprofile-1.0.0/doc/oprofile.html 2014-11-03 17:57:26.415037988 +0000
19@@ -1563,8 +1563,8 @@
20 <span class="emphasis"><em>must</em></span> stop it in a controlled manner in order to process
21 the profile data it has collected. Use <code class="code">kill -SIGINT &lt;operf-PID&gt;</code>
22 for this purpose. It is recommended that when running <span class="command"><strong>operf</strong></span>
23- with this option, your current working directory should be <code class="filename">/root</code> or a subdirectory
24- of <code class="filename">/root</code> to avoid storing sample data files in locations accessible by regular users.
25+ with this option, your current working directory should be <code class="filename">~root</code> or a subdirectory
26+ of <code class="filename">~root</code> to avoid storing sample data files in locations accessible by regular users.
27 </p>
28 </dd>
29 <dt>
30Index: oprofile-1.0.0/doc/oprofile.xml
31===================================================================
32--- oprofile-1.0.0.orig/doc/oprofile.xml 2014-11-03 17:55:31.515034857 +0000
33+++ oprofile-1.0.0/doc/oprofile.xml 2014-11-03 17:58:03.719039005 +0000
34@@ -654,8 +654,8 @@
35 <emphasis>must</emphasis> stop it in a controlled manner in order to process
36 the profile data it has collected. Use <code>kill -SIGINT &lt;operf-PID&gt;</code>
37 for this purpose. It is recommended that when running <command>operf</command>
38- with this option, your current working directory should be <filename>/root</filename> or a subdirectory
39- of <filename>/root</filename> to avoid storing sample data files in locations accessible by regular users.
40+ with this option, your current working directory should be <filename>~root</filename> or a subdirectory
41+ of <filename>~root</filename> to avoid storing sample data files in locations accessible by regular users.
42 </para></listitem>
43 </varlistentry>
44 <varlistentry>
diff --git a/meta/recipes-kernel/oprofile/oprofile/run-ptest b/meta/recipes-kernel/oprofile/oprofile/run-ptest
deleted file mode 100644
index 4814be652a..0000000000
--- a/meta/recipes-kernel/oprofile/oprofile/run-ptest
+++ /dev/null
@@ -1,19 +0,0 @@
1#!/bin/sh
2
3saved_dir=$PWD
4for dir in */tests ; do
5 cd $dir
6 for atest in * ; do
7 if [ \( -x $atest \) -a \( -f $atest \) ] ; then
8 ./$atest > ${atest}.stdout 2> ${atest}.stderr
9 if [ $? = 0 ] ; then
10 echo "PASS: $dir $atest"
11 rm ${atest}.stdout ${atest}.stderr
12 else
13 echo "FAIL: ${dir}/${atest}"
14 fi
15 fi
16 done
17 cd $saved_dir
18done
19
diff --git a/meta/recipes-kernel/oprofile/oprofile_1.1.0.bb b/meta/recipes-kernel/oprofile/oprofile_1.1.0.bb
deleted file mode 100644
index 92a94ad0d4..0000000000
--- a/meta/recipes-kernel/oprofile/oprofile_1.1.0.bb
+++ /dev/null
@@ -1,10 +0,0 @@
1require oprofile.inc
2
3DEPENDS += "virtual/kernel"
4DEPENDS_append_powerpc64 = " libpfm4"
5
6SRC_URI[md5sum] = "248c4c069f9476f427fa7195563f9867"
7SRC_URI[sha256sum] = "cf759a6de1a6033d5dfc93bda129a9f2e128aecc4238cc657feb0801d1b0366c"
8
9S = "${WORKDIR}/oprofile-${PV}"
10