Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 0 of 3] Fix oprofile build on powerpc
@ 2013-03-12 18:10 Thomas De Schampheleire
  2013-03-12 18:10 ` [Buildroot] [PATCH 1 of 3] libpfm4: new package Thomas De Schampheleire
                   ` (3 more replies)
  0 siblings, 4 replies; 16+ messages in thread
From: Thomas De Schampheleire @ 2013-03-12 18:10 UTC (permalink / raw)
  To: buildroot


Hi,

Since the upstep of oprofile to 0.9.8, the powerpc build was broken.
This series fixes this problem.

As the last patch indicates, this is compile tested on x86 and powerpc,
but not runtime-tested.

Best regards,
Thomas

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH 1 of 3] libpfm4: new package
  2013-03-12 18:10 [Buildroot] [PATCH 0 of 3] Fix oprofile build on powerpc Thomas De Schampheleire
@ 2013-03-12 18:10 ` Thomas De Schampheleire
  2013-03-18 21:16   ` Peter Korsgaard
  2013-03-12 18:10 ` [Buildroot] [PATCH 2 of 3] oprofile: upstep 0.9.7 patches to 0.9.8 Thomas De Schampheleire
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 16+ messages in thread
From: Thomas De Schampheleire @ 2013-03-12 18:10 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>

---
 package/Config.in          |   1 +
 package/libpfm4/Config.in  |   7 +++++++
 package/libpfm4/libpfm4.mk |  27 +++++++++++++++++++++++++++
 3 files changed, 35 insertions(+), 0 deletions(-)

diff --git a/package/Config.in b/package/Config.in
--- a/package/Config.in
+++ b/package/Config.in
@@ -556,6 +556,7 @@ source "package/gsl/Config.in"
 source "package/libglib2/Config.in"
 source "package/libical/Config.in"
 source "package/libnspr/Config.in"
+source "package/libpfm4/Config.in"
 source "package/libsigc/Config.in"
 source "package/libtasn1/Config.in"
 source "package/libtpl/Config.in"
diff --git a/package/libpfm4/Config.in b/package/libpfm4/Config.in
new file mode 100644
--- /dev/null
+++ b/package/libpfm4/Config.in
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_LIBPFM4
+	bool "libpfm4"
+	help
+	  A helper library to help encode Performance Events to use with
+	  Operating system kernels performance monitoring interfaces.
+
+	  http://perfmon2.sourceforge.net/
diff --git a/package/libpfm4/libpfm4.mk b/package/libpfm4/libpfm4.mk
new file mode 100644
--- /dev/null
+++ b/package/libpfm4/libpfm4.mk
@@ -0,0 +1,27 @@
+#############################################################
+#
+# libpfm4
+#
+#############################################################
+LIBPFM4_VERSION = 4.3.0
+LIBPFM4_SOURCE = libpfm-$(LIBPFM4_VERSION).tar.gz
+LIBPFM4_SITE = http://downloads.sourceforge.net/project/perfmon2/libpfm4
+LIBPFM4_LICENSE = libpfm4 license
+LIBPFM4_LICENSE_FILES = COPYING
+LIBPFM4_INSTALL_STAGING = YES
+
+LIBPFM4_FLAGS = SYS=Linux ARCH=$(BR2_ARCH) CC="$(TARGET_CC)" LDCONFIG=true
+
+define LIBPFM4_BUILD_CMDS
+	$(MAKE) -C $(@D) $(LIBPFM4_FLAGS)
+endef
+
+define LIBPFM4_INSTALL_STAGING_CMDS
+	make -C $(@D) $(LIBPFM4_FLAGS) PREFIX=$(STAGING_DIR)/usr install
+endef
+
+define LIBPFM4_INSTALL_TARGET_CMDS
+	make -C $(@D) $(LIBPFM4_FLAGS) PREFIX=$(TARGET_DIR)/usr install
+endef
+
+$(eval $(generic-package))

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH 2 of 3] oprofile: upstep 0.9.7 patches to 0.9.8
  2013-03-12 18:10 [Buildroot] [PATCH 0 of 3] Fix oprofile build on powerpc Thomas De Schampheleire
  2013-03-12 18:10 ` [Buildroot] [PATCH 1 of 3] libpfm4: new package Thomas De Schampheleire
@ 2013-03-12 18:10 ` Thomas De Schampheleire
  2013-03-13  7:24   ` Thomas Petazzoni
  2013-03-18 21:20   ` Peter Korsgaard
  2013-03-12 18:10 ` [Buildroot] [PATCH 3 of 3] oprofile 0.9.8: fix compilation on powerpc Thomas De Schampheleire
  2013-03-13  7:28 ` [Buildroot] [PATCH 0 of 3] Fix oprofile build " Thomas Petazzoni
  3 siblings, 2 replies; 16+ messages in thread
From: Thomas De Schampheleire @ 2013-03-12 18:10 UTC (permalink / raw)
  To: buildroot

The patches to oprofile 0.9.7 seem still relevant for 0.9.8, but for some
reason they were not upstepped.

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>

---
 package/oprofile/oprofile-0.9.7-001-avr32-enable-lookup_dcookie.patch |  0
 package/oprofile/oprofile-0.9.7-002-no-query-modules.patch            |  0
 2 files changed, 0 insertions(+), 0 deletions(-)

diff --git a/package/oprofile/oprofile-0.9.7-001-avr32-enable-lookup_dcookie.patch b/package/oprofile/oprofile-0.9.8-001-avr32-enable-lookup_dcookie.patch
rename from package/oprofile/oprofile-0.9.7-001-avr32-enable-lookup_dcookie.patch
rename to package/oprofile/oprofile-0.9.8-001-avr32-enable-lookup_dcookie.patch
diff --git a/package/oprofile/oprofile-0.9.7-002-no-query-modules.patch b/package/oprofile/oprofile-0.9.8-002-no-query-modules.patch
rename from package/oprofile/oprofile-0.9.7-002-no-query-modules.patch
rename to package/oprofile/oprofile-0.9.8-002-no-query-modules.patch

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH 3 of 3] oprofile 0.9.8: fix compilation on powerpc
  2013-03-12 18:10 [Buildroot] [PATCH 0 of 3] Fix oprofile build on powerpc Thomas De Schampheleire
  2013-03-12 18:10 ` [Buildroot] [PATCH 1 of 3] libpfm4: new package Thomas De Schampheleire
  2013-03-12 18:10 ` [Buildroot] [PATCH 2 of 3] oprofile: upstep 0.9.7 patches to 0.9.8 Thomas De Schampheleire
@ 2013-03-12 18:10 ` Thomas De Schampheleire
  2013-03-12 20:20   ` Reuben Dowle
  2013-03-13  7:28 ` [Buildroot] [PATCH 0 of 3] Fix oprofile build " Thomas Petazzoni
  3 siblings, 1 reply; 16+ messages in thread
From: Thomas De Schampheleire @ 2013-03-12 18:10 UTC (permalink / raw)
  To: buildroot

The oprofile build was broken on powerpc since version 0.9.8.
This was detected in several autobuilds, like
http://autobuild.buildroot.net/results/6f6c02d18495907d50fcdfc6003ac20d493c55fe/

The problem can be fixed by adding libpfm4 into the build and making a few
changes in the configure script. Because the configure script is changed,
we additionally need to prevent autoreconfiguring (which fails).
At the same time, I fixed the removed  --with-kernel-support configure
option.

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>

---
 package/oprofile/Config.in                        |   1 +
 package/oprofile/oprofile-0.9.8-003-powerpc.patch |  27 +++++++++++++++++++++++++++
 package/oprofile/oprofile.mk                      |  16 ++++++++++++++--
 3 files changed, 42 insertions(+), 2 deletions(-)

Note: this is compile-tested on x86 and powerpc, but I was not able to test
it on target.

diff --git a/package/oprofile/Config.in b/package/oprofile/Config.in
--- a/package/oprofile/Config.in
+++ b/package/oprofile/Config.in
@@ -2,6 +2,7 @@ config BR2_PACKAGE_OPROFILE
 	bool "oprofile"
 	select BR2_PACKAGE_POPT
 	select BR2_PACKAGE_BINUTILS
+	select BR2_PACKAGE_LIBPFM4 if BR2_powerpc
 	depends on BR2_INSTALL_LIBSTDCPP
 	depends on !BR2_aarch64 # binutils
 	help
diff --git a/package/oprofile/oprofile-0.9.8-003-powerpc.patch b/package/oprofile/oprofile-0.9.8-003-powerpc.patch
new file mode 100644
--- /dev/null
+++ b/package/oprofile/oprofile-0.9.8-003-powerpc.patch
@@ -0,0 +1,27 @@
+
+Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
+
+diff --git a/configure.ac b/configure.ac
+--- a/configure.ac
++++ b/configure.ac
+@@ -104,7 +104,7 @@ AC_DEFINE_UNQUOTED(HAVE_PERF_EVENTS, $HA
+ if test "$HAVE_PERF_EVENTS" = "1"; then
+ 	PFM_LIB=
+ 	arch="`uname -m`"
+-	if test "$arch" = "ppc64"; then
++	if test "$arch" = "ppc64" || test "$arch" = "ppc"; then
+ 		AC_CHECK_HEADER(perfmon/pfmlib.h,,[AC_MSG_ERROR([pfmlib.h not found; usually provided in papi devel package])])
+ 		AC_CHECK_LIB(pfm,pfm_get_event_name, HAVE_LIBPFM3='1'; HAVE_LIBPFM='1', [
+ 			AC_CHECK_LIB(pfm,pfm_get_os_event_encoding, HAVE_LIBPFM3='0'; HAVE_LIBPFM='1',
+diff --git a/configure b/configure
+--- a/configure
++++ b/configure
+@@ -16985,7 +16985,7 @@ cat >>confdefs.h <<_ACEOF
+ if test "$HAVE_PERF_EVENTS" = "1"; then
+ 	PFM_LIB=
+ 	arch="`uname -m`"
+-	if test "$arch" = "ppc64"; then
++	if test "$arch" = "ppc64" || test "$arch" = "ppc"; then
+ 		if test "${ac_cv_header_perfmon_pfmlib_h+set}" = set; then
+   { $as_echo "$as_me:$LINENO: checking for perfmon/pfmlib.h" >&5
+ $as_echo_n "checking for perfmon/pfmlib.h... " >&6; }
diff --git a/package/oprofile/oprofile.mk b/package/oprofile/oprofile.mk
--- a/package/oprofile/oprofile.mk
+++ b/package/oprofile/oprofile.mk
@@ -8,7 +8,7 @@ OPROFILE_VERSION = 0.9.8
 OPROFILE_SITE = http://downloads.sourceforge.net/project/oprofile/oprofile/oprofile-$(OPROFILE_VERSION)
 OPROFILE_LICENSE = GPLv2+
 OPROFILE_LICENSE_FILES = COPYING
-OPROFILE_CONF_OPT = --localstatedir=/var --with-kernel-support
+OPROFILE_CONF_OPT = --localstatedir=/var --with-kernel=$(SYSROOT_DIR)
 OPROFILE_BINARIES = utils/ophelp pp/opannotate pp/oparchive pp/opgprof
 OPROFILE_BINARIES += pp/opreport opjitconv/opjitconv daemon/oprofiled
 OPROFILE_BINARIES += utils/op-check-perfevents pe_profiling/operf libabi/opimport
@@ -29,7 +29,19 @@ ifeq ($(OPROFILE_ARCH),)
 OPROFILE_ARCH = $(BR2_ARCH)
 endif
 
-OPROFILE_DEPENDENCIES = popt binutils
+OPROFILE_DEPENDENCIES = popt binutils libpfm4
+
+define OPROFILE_PREVENT_AUTOMAKE
+	# Prevent automake from running.
+	(cd $(@D); touch -c config* aclocal.m4 Makefile*);
+endef
+
+define OPROFILE_FIX_CROSS_UNAME
+	$(SED) 's/`uname -m`/$(OPROFILE_ARCH)/' $(@D)/configure
+endef
+
+OPROFILE_POST_PATCH_HOOKS += OPROFILE_PREVENT_AUTOMAKE
+OPROFILE_POST_PATCH_HOOKS += OPROFILE_FIX_CROSS_UNAME
 
 define OPROFILE_INSTALL_TARGET_CMDS
 	$(INSTALL) -d -m 755 $(TARGET_DIR)/usr/bin

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH 3 of 3] oprofile 0.9.8: fix compilation on powerpc
  2013-03-12 18:10 ` [Buildroot] [PATCH 3 of 3] oprofile 0.9.8: fix compilation on powerpc Thomas De Schampheleire
@ 2013-03-12 20:20   ` Reuben Dowle
  2013-03-13 16:14     ` Thomas De Schampheleire
  0 siblings, 1 reply; 16+ messages in thread
From: Reuben Dowle @ 2013-03-12 20:20 UTC (permalink / raw)
  To: buildroot

This series of patches fixes my build error I got when updating to latest buildroot sources on Friday. Fixing this was going to be my first task this Monday. Thanks!

I will check everything is working on my target later today. One possible minor change below:

> diff --git a/package/oprofile/oprofile.mk
> b/package/oprofile/oprofile.mk
> --- a/package/oprofile/oprofile.mk
> +++ b/package/oprofile/oprofile.mk
> @@ -8,7 +8,7 @@ OPROFILE_VERSION = 0.9.8
>  OPROFILE_SITE =
> http://downloads.sourceforge.net/project/oprofile/oprofile/oprofile-
> $(OPROFILE_VERSION)
>  OPROFILE_LICENSE = GPLv2+
>  OPROFILE_LICENSE_FILES = COPYING
> -OPROFILE_CONF_OPT = --localstatedir=/var --with-kernel-support
> +OPROFILE_CONF_OPT = --localstatedir=/var --with-kernel=$(SYSROOT_DIR)
>  OPROFILE_BINARIES = utils/ophelp pp/opannotate pp/oparchive pp/opgprof
>  OPROFILE_BINARIES += pp/opreport opjitconv/opjitconv daemon/oprofiled
>  OPROFILE_BINARIES += utils/op-check-perfevents pe_profiling/operf
> libabi/opimport
> @@ -29,7 +29,19 @@ ifeq ($(OPROFILE_ARCH),)
>  OPROFILE_ARCH = $(BR2_ARCH)
>  endif
>
> -OPROFILE_DEPENDENCIES = popt binutils
> +OPROFILE_DEPENDENCIES = popt binutils libpfm4

I think this dependency is only needed for powerpc. So something like:

OPROFILE_DEPENDENCIES = popt binutils
ifeq ($(BR2_powerpc),y)
OPROFILE_DEPENDENCIES += libpfm4
Endif

Might be better?

> +
> +define OPROFILE_PREVENT_AUTOMAKE
> +     # Prevent automake from running.
> +     (cd $(@D); touch -c config* aclocal.m4 Makefile*);
> +endef
> +
> +define OPROFILE_FIX_CROSS_UNAME
> +     $(SED) 's/`uname -m`/$(OPROFILE_ARCH)/' $(@D)/configure
> +endef
> +
> +OPROFILE_POST_PATCH_HOOKS += OPROFILE_PREVENT_AUTOMAKE
> +OPROFILE_POST_PATCH_HOOKS += OPROFILE_FIX_CROSS_UNAME
>
>  define OPROFILE_INSTALL_TARGET_CMDS
>       $(INSTALL) -d -m 755 $(TARGET_DIR)/usr/bin
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
The information in this email communication (inclusive of attachments) is confidential to 4RF Limited and the intended recipient(s). If you are not the intended recipient(s), please note that any use, disclosure, distribution or copying of this information or any part thereof is strictly prohibited and that the author accepts no liability for the consequences of any action taken on the basis of the information provided. If you have received this email in error, please notify the sender immediately by return email and then delete all instances of this email from your system. 4RF Limited will not accept responsibility for any consequences associated with the use of this email (including, but not limited to, damages sustained as a result of any viruses and/or any action or lack of action taken in reliance on it).

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH 2 of 3] oprofile: upstep 0.9.7 patches to 0.9.8
  2013-03-12 18:10 ` [Buildroot] [PATCH 2 of 3] oprofile: upstep 0.9.7 patches to 0.9.8 Thomas De Schampheleire
@ 2013-03-13  7:24   ` Thomas Petazzoni
  2013-03-13  8:27     ` Thomas De Schampheleire
  2013-03-18 21:20   ` Peter Korsgaard
  1 sibling, 1 reply; 16+ messages in thread
From: Thomas Petazzoni @ 2013-03-13  7:24 UTC (permalink / raw)
  To: buildroot

Dear Thomas De Schampheleire,

On Tue, 12 Mar 2013 19:10:55 +0100, Thomas De Schampheleire wrote:

> rename from package/oprofile/oprofile-0.9.7-002-no-query-modules.patch
> rename to package/oprofile/oprofile-0.9.8-002-no-query-modules.patch

We no longer want the version number in patch file names, for precisely
the reason why you're doing this patch in the first place :-)

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH 0 of 3] Fix oprofile build on powerpc
  2013-03-12 18:10 [Buildroot] [PATCH 0 of 3] Fix oprofile build on powerpc Thomas De Schampheleire
                   ` (2 preceding siblings ...)
  2013-03-12 18:10 ` [Buildroot] [PATCH 3 of 3] oprofile 0.9.8: fix compilation on powerpc Thomas De Schampheleire
@ 2013-03-13  7:28 ` Thomas Petazzoni
  2013-03-13  8:38   ` Thomas De Schampheleire
  3 siblings, 1 reply; 16+ messages in thread
From: Thomas Petazzoni @ 2013-03-13  7:28 UTC (permalink / raw)
  To: buildroot

Dear Thomas De Schampheleire,

On Tue, 12 Mar 2013 19:10:53 +0100, Thomas De Schampheleire wrote:

> Since the upstep of oprofile to 0.9.8, the powerpc build was broken.
> This series fixes this problem.
> 
> As the last patch indicates, this is compile tested on x86 and powerpc,
> but not runtime-tested.

I think those patches are good, but when I started working on this
issue, I also discovered that oprofile looks at /usr/include/linux by
default to find out whether perf is supported or not in the kernel.
Which obviously doesn't make sense in cross-compilation.

I've just pushed at
http://git.free-electrons.com/users/thomas-petazzoni/buildroot/commit/?h=oprofile-ppc-fix&id=dda400c3f798ba49b1b638f927b3089a9df24105
the work I started some time ago, which was unfinished. Note that I
don't ask you to also fix those issues, I just thought it would be good
mentioning these other potential problems.

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH 2 of 3] oprofile: upstep 0.9.7 patches to 0.9.8
  2013-03-13  7:24   ` Thomas Petazzoni
@ 2013-03-13  8:27     ` Thomas De Schampheleire
  2013-03-13 20:12       ` Arnout Vandecappelle
  0 siblings, 1 reply; 16+ messages in thread
From: Thomas De Schampheleire @ 2013-03-13  8:27 UTC (permalink / raw)
  To: buildroot

Hi Thomas,

On Wed, Mar 13, 2013 at 8:24 AM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Dear Thomas De Schampheleire,
>
> On Tue, 12 Mar 2013 19:10:55 +0100, Thomas De Schampheleire wrote:
>
>> rename from package/oprofile/oprofile-0.9.7-002-no-query-modules.patch
>> rename to package/oprofile/oprofile-0.9.8-002-no-query-modules.patch
>
> We no longer want the version number in patch file names, for precisely
> the reason why you're doing this patch in the first place :-)

Are we already making these changes, or are we waiting for someone to
fix the central patching code according to the new rules first?

Best regards,
Thomas

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH 0 of 3] Fix oprofile build on powerpc
  2013-03-13  7:28 ` [Buildroot] [PATCH 0 of 3] Fix oprofile build " Thomas Petazzoni
@ 2013-03-13  8:38   ` Thomas De Schampheleire
  2013-03-15 10:15     ` Thomas Petazzoni
  0 siblings, 1 reply; 16+ messages in thread
From: Thomas De Schampheleire @ 2013-03-13  8:38 UTC (permalink / raw)
  To: buildroot

Hi Thomas,

On Wed, Mar 13, 2013 at 8:28 AM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Dear Thomas De Schampheleire,
>
> On Tue, 12 Mar 2013 19:10:53 +0100, Thomas De Schampheleire wrote:
>
>> Since the upstep of oprofile to 0.9.8, the powerpc build was broken.
>> This series fixes this problem.
>>
>> As the last patch indicates, this is compile tested on x86 and powerpc,
>> but not runtime-tested.
>
> I think those patches are good, but when I started working on this
> issue, I also discovered that oprofile looks at /usr/include/linux by
> default to find out whether perf is supported or not in the kernel.
> Which obviously doesn't make sense in cross-compilation.
>
> I've just pushed at
> http://git.free-electrons.com/users/thomas-petazzoni/buildroot/commit/?h=oprofile-ppc-fix&id=dda400c3f798ba49b1b638f927b3089a9df24105
> the work I started some time ago, which was unfinished. Note that I
> don't ask you to also fix those issues, I just thought it would be good
> mentioning these other potential problems.

I haven't yet looked at your patches in detail, but I did also notice
the check on perf_event.h in /usr/src/linux. However, this should have
been fixed with the --with-kernel=$(SYSROOT_DIR).
However, I just now notice that SYSROOT_DIR does not exist here, and I
need to find a better solution. I will investigate that aspect
further.

Ideally we'd indeed merge your work together with these patches. Do
you recall what was still missing or not working with your patches?

Thanks,
Thomas

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH 3 of 3] oprofile 0.9.8: fix compilation on powerpc
  2013-03-12 20:20   ` Reuben Dowle
@ 2013-03-13 16:14     ` Thomas De Schampheleire
  2013-03-13 20:18       ` Arnout Vandecappelle
  0 siblings, 1 reply; 16+ messages in thread
From: Thomas De Schampheleire @ 2013-03-13 16:14 UTC (permalink / raw)
  To: buildroot

Hi Reuben,

On Tue, Mar 12, 2013 at 9:20 PM, Reuben Dowle <reuben.dowle@4rf.com> wrote:
> This series of patches fixes my build error I got when updating to latest buildroot sources on Friday. Fixing this was going to be my first task this Monday. Thanks!
>
> I will check everything is working on my target later today. One possible minor change below:

Thanks for your feedback.
I noticed there is still a problem with one of the patches, but I'm
already looking forward to your runtime test.
See below...

>
>> diff --git a/package/oprofile/oprofile.mk
>> b/package/oprofile/oprofile.mk
>> --- a/package/oprofile/oprofile.mk
>> +++ b/package/oprofile/oprofile.mk
>> @@ -8,7 +8,7 @@ OPROFILE_VERSION = 0.9.8
>>  OPROFILE_SITE =
>> http://downloads.sourceforge.net/project/oprofile/oprofile/oprofile-
>> $(OPROFILE_VERSION)
>>  OPROFILE_LICENSE = GPLv2+
>>  OPROFILE_LICENSE_FILES = COPYING
>> -OPROFILE_CONF_OPT = --localstatedir=/var --with-kernel-support
>> +OPROFILE_CONF_OPT = --localstatedir=/var --with-kernel=$(SYSROOT_DIR)
>>  OPROFILE_BINARIES = utils/ophelp pp/opannotate pp/oparchive pp/opgprof
>>  OPROFILE_BINARIES += pp/opreport opjitconv/opjitconv daemon/oprofiled
>>  OPROFILE_BINARIES += utils/op-check-perfevents pe_profiling/operf
>> libabi/opimport
>> @@ -29,7 +29,19 @@ ifeq ($(OPROFILE_ARCH),)
>>  OPROFILE_ARCH = $(BR2_ARCH)
>>  endif
>>
>> -OPROFILE_DEPENDENCIES = popt binutils
>> +OPROFILE_DEPENDENCIES = popt binutils libpfm4
>
> I think this dependency is only needed for powerpc. So something like:
>
> OPROFILE_DEPENDENCIES = popt binutils
> ifeq ($(BR2_powerpc),y)
> OPROFILE_DEPENDENCIES += libpfm4
> Endif
>
> Might be better?

As far as I understand, these dependencies are only used for
build-time ordering. This means that libfm4, *if selected in the
config* will be built before oprofile. However, if libpfm4 is not
selected, and you're not on powerpc, you can still build oprofile.
The only benefit from the suggested code above, I think, is that on
non-powerpc targets the unnecessary ordering of oprofile / libpfm4 is
not enforced, but I think this will hardly give an impact on build
time.

Best regards,
Thomas

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH 2 of 3] oprofile: upstep 0.9.7 patches to 0.9.8
  2013-03-13  8:27     ` Thomas De Schampheleire
@ 2013-03-13 20:12       ` Arnout Vandecappelle
  2013-03-14  7:49         ` Thomas Petazzoni
  0 siblings, 1 reply; 16+ messages in thread
From: Arnout Vandecappelle @ 2013-03-13 20:12 UTC (permalink / raw)
  To: buildroot

On 03/13/13 09:27, Thomas De Schampheleire wrote:
> Hi Thomas,
>
> On Wed, Mar 13, 2013 at 8:24 AM, Thomas Petazzoni
> <thomas.petazzoni@free-electrons.com> wrote:
>> Dear Thomas De Schampheleire,
>>
>> On Tue, 12 Mar 2013 19:10:55 +0100, Thomas De Schampheleire wrote:
>>
>>> rename from package/oprofile/oprofile-0.9.7-002-no-query-modules.patch
>>> rename to package/oprofile/oprofile-0.9.8-002-no-query-modules.patch
>>
>> We no longer want the version number in patch file names, for precisely
>> the reason why you're doing this patch in the first place :-)
>
> Are we already making these changes, or are we waiting for someone to
> fix the central patching code according to the new rules first?

  There is nothing to be fixed in the central patching code (at least not 
for this use case). Remove the version number.

  Regards,
  Arnout


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH 3 of 3] oprofile 0.9.8: fix compilation on powerpc
  2013-03-13 16:14     ` Thomas De Schampheleire
@ 2013-03-13 20:18       ` Arnout Vandecappelle
  0 siblings, 0 replies; 16+ messages in thread
From: Arnout Vandecappelle @ 2013-03-13 20:18 UTC (permalink / raw)
  To: buildroot

On 03/13/13 17:14, Thomas De Schampheleire wrote:
> Hi Reuben,
>
> On Tue, Mar 12, 2013 at 9:20 PM, Reuben Dowle <reuben.dowle@4rf.com> wrote:
[snip]
>>> -OPROFILE_DEPENDENCIES = popt binutils
>>> +OPROFILE_DEPENDENCIES = popt binutils libpfm4
>>
>> I think this dependency is only needed for powerpc. So something like:
>>
>> OPROFILE_DEPENDENCIES = popt binutils
>> ifeq ($(BR2_powerpc),y)
>> OPROFILE_DEPENDENCIES += libpfm4
>> Endif
>>
>> Might be better?
>
> As far as I understand, these dependencies are only used for
> build-time ordering. This means that libfm4, *if selected in the
> config* will be built before oprofile.

  Nope. If libpfm4 is a dependency, it will be built even if you haven't 
configured it. So libpfm4 will be built unnecessarily.

  Regards,
  Arnout

> However, if libpfm4 is not
> selected, and you're not on powerpc, you can still build oprofile.
> The only benefit from the suggested code above, I think, is that on
> non-powerpc targets the unnecessary ordering of oprofile / libpfm4 is
> not enforced, but I think this will hardly give an impact on build
> time.
>
> Best regards,
> Thomas
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
>


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH 2 of 3] oprofile: upstep 0.9.7 patches to 0.9.8
  2013-03-13 20:12       ` Arnout Vandecappelle
@ 2013-03-14  7:49         ` Thomas Petazzoni
  0 siblings, 0 replies; 16+ messages in thread
From: Thomas Petazzoni @ 2013-03-14  7:49 UTC (permalink / raw)
  To: buildroot

Arnout, Thomas,

On Wed, 13 Mar 2013 21:12:06 +0100, Arnout Vandecappelle wrote:

> > Are we already making these changes, or are we waiting for someone to
> > fix the central patching code according to the new rules first?
> 
>   There is nothing to be fixed in the central patching code (at least not 
> for this use case). Remove the version number.

Just to expand on Arnout answer: even though we haven't yet removed the
support for versioned patches in the infrastructure, we have already
been converting all the new packages, and many packages we were
touching, to unversioned names. This will make it easier to change the
package infrastructure later.

Best regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH 0 of 3] Fix oprofile build on powerpc
  2013-03-13  8:38   ` Thomas De Schampheleire
@ 2013-03-15 10:15     ` Thomas Petazzoni
  0 siblings, 0 replies; 16+ messages in thread
From: Thomas Petazzoni @ 2013-03-15 10:15 UTC (permalink / raw)
  To: buildroot

Dear Thomas De Schampheleire,

On Wed, 13 Mar 2013 09:38:38 +0100, Thomas De Schampheleire wrote:

> I haven't yet looked at your patches in detail, but I did also notice
> the check on perf_event.h in /usr/src/linux. However, this should have
> been fixed with the --with-kernel=$(SYSROOT_DIR).
> However, I just now notice that SYSROOT_DIR does not exist here, and I
> need to find a better solution. I will investigate that aspect
> further.
> 
> Ideally we'd indeed merge your work together with these patches. Do
> you recall what was still missing or not working with your patches?

No, I unfortunately don't remember. But maybe we should get your
patches merged first, they were submitted first, and they look good,
and they solve some of the problems. So just let's get your patches
merged, and we'll fix/improve later on. It doesn't make sense to
"block" your patches just because I did some other related work that I
never submitted.

Best regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH 1 of 3] libpfm4: new package
  2013-03-12 18:10 ` [Buildroot] [PATCH 1 of 3] libpfm4: new package Thomas De Schampheleire
@ 2013-03-18 21:16   ` Peter Korsgaard
  0 siblings, 0 replies; 16+ messages in thread
From: Peter Korsgaard @ 2013-03-18 21:16 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas De Schampheleire <patrickdepinguin+buildroot@gmail.com> writes:

 Thomas> Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>

 Thomas> +++ b/package/libpfm4/libpfm4.mk
 Thomas> @@ -0,0 +1,27 @@
 Thomas> +#############################################################
 Thomas> +#
 Thomas> +# libpfm4
 Thomas> +#
 Thomas> +#############################################################
 Thomas> +LIBPFM4_VERSION = 4.3.0
 Thomas> +LIBPFM4_SOURCE = libpfm-$(LIBPFM4_VERSION).tar.gz
 Thomas> +LIBPFM4_SITE = http://downloads.sourceforge.net/project/perfmon2/libpfm4

We normally have an empty line after the file header.

Committed with that fixed, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH 2 of 3] oprofile: upstep 0.9.7 patches to 0.9.8
  2013-03-12 18:10 ` [Buildroot] [PATCH 2 of 3] oprofile: upstep 0.9.7 patches to 0.9.8 Thomas De Schampheleire
  2013-03-13  7:24   ` Thomas Petazzoni
@ 2013-03-18 21:20   ` Peter Korsgaard
  1 sibling, 0 replies; 16+ messages in thread
From: Peter Korsgaard @ 2013-03-18 21:20 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas De Schampheleire <patrickdepinguin+buildroot@gmail.com> writes:

 Thomas> The patches to oprofile 0.9.7 seem still relevant for 0.9.8,
 Thomas> but for some reason they were not upstepped.

Committed with the version number dropped from the file names, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2013-03-18 21:20 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-12 18:10 [Buildroot] [PATCH 0 of 3] Fix oprofile build on powerpc Thomas De Schampheleire
2013-03-12 18:10 ` [Buildroot] [PATCH 1 of 3] libpfm4: new package Thomas De Schampheleire
2013-03-18 21:16   ` Peter Korsgaard
2013-03-12 18:10 ` [Buildroot] [PATCH 2 of 3] oprofile: upstep 0.9.7 patches to 0.9.8 Thomas De Schampheleire
2013-03-13  7:24   ` Thomas Petazzoni
2013-03-13  8:27     ` Thomas De Schampheleire
2013-03-13 20:12       ` Arnout Vandecappelle
2013-03-14  7:49         ` Thomas Petazzoni
2013-03-18 21:20   ` Peter Korsgaard
2013-03-12 18:10 ` [Buildroot] [PATCH 3 of 3] oprofile 0.9.8: fix compilation on powerpc Thomas De Schampheleire
2013-03-12 20:20   ` Reuben Dowle
2013-03-13 16:14     ` Thomas De Schampheleire
2013-03-13 20:18       ` Arnout Vandecappelle
2013-03-13  7:28 ` [Buildroot] [PATCH 0 of 3] Fix oprofile build " Thomas Petazzoni
2013-03-13  8:38   ` Thomas De Schampheleire
2013-03-15 10:15     ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox