Skip to contentSkip to conversation

package/valgrind: hide comment when arch is not supported

PATCH New Yann E. MORIN 3 participants 4 messages Aug 10, 2017 – Sep 5, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/valgrind: hide comment when arch is not supported

Currently, the comment that "valgrind needs shared libs" is not hidden when the architecture dependencies are not met, which can confuse some users (as recently seen on IRC).

Fix that by introducing the traditional _ARCH_SUPPORTS option, and have the comment and the symbol depend on that.

Cc Brandon Maier <[email protected]>
Cc J?r?me Pouiller <[email protected]>
Cc Peter Seiderer <[email protected]>
Cc Thomas Petazzoni <[email protected]>
Cc Vicente Olivert Riera <[email protected]>

---
Note: Cc-ing the people that have touched valgrind in the past 12 months-or-so...

---
 package/valgrind/Config.in | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)
package/valgrind/Config.in +10 -5
index 40e219d95a..919bd1afb5 100644
@@ -1,14 +1,19 @@
 comment "valgrind needs a toolchain w/ dynamic library"
+	depends on BR2_PACKAGE_VALGRIND_ARCH_SUPPORTS
 	depends on BR2_STATIC_LIBS
 
+config BR2_PACKAGE_VALGRIND_ARCH_SUPPORTS
+	bool
+	default y if BR2_ARM_CPU_ARMV7A
+	default y if BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el
+	default y if BR2_i386 || BR2_x86_64
+	default y if BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le
+	depends on !BR2_MIPS_SOFT_FLOAT
+
 config BR2_PACKAGE_VALGRIND
 	bool "valgrind"
-	depends on BR2_ARM_CPU_ARMV7A || BR2_i386 || \
-		   BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el || \
-		   BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le || \
-		   BR2_x86_64
+	depends on BR2_PACKAGE_VALGRIND_ARCH_SUPPORTS
 	depends on !BR2_STATIC_LIBS
-	depends on !BR2_MIPS_SOFT_FLOAT
 	help
 	  Tool for debugging and profiling Linux programs.
 
Signature · 1 line
2.11.0
#1 lore raw

PATCH 1/1 package/valgrind: hide comment when arch is not supported

Quoted 7 lines · Yann E. MORIN

Currently, the comment that "valgrind needs shared libs" is not hidden when the architecture dependencies are not met, which can confuse some users (as recently seen on IRC).

Fix that by introducing the traditional _ARCH_SUPPORTS option, and have the comment and the symbol depend on that.

Quoted 6 lines
Cc Brandon Maier <[email protected]>
Cc J?r?me Pouiller <[email protected]>
Cc Peter Seiderer <[email protected]>
Cc Thomas Petazzoni <[email protected]>
Cc Vicente Olivert Riera <[email protected]>

with one small nit:

Quoted 13 lines

---
Note: Cc-ing the people that have touched valgrind in the past 12 months-or-so...

---
 package/valgrind/Config.in | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)
package/valgrind/Config.in +0 -0
index 40e219d95a..919bd1afb5 100644

package/valgrind/Config.in line 5

Quoted 5 lines
package/valgrind/Config.in +2 -0
@@ -1,14 +1,19 @@
 comment "valgrind needs a toolchain w/ dynamic library"
+	depends on BR2_PACKAGE_VALGRIND_ARCH_SUPPORTS
 	depends on BR2_STATIC_LIBS
 
+config BR2_PACKAGE_VALGRIND_ARCH_SUPPORTS

_ARCH_SUPPORTS is always the first thing in the file, even if the comment comes
before the main symbol (cfr. e.g. package/canfestival/Config.in, package/erlang/Config.in)

Regards,
Arnout

Quoted 20 lines
package/valgrind/Config.in +8 -5
+	bool
+	default y if BR2_ARM_CPU_ARMV7A
+	default y if BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el
+	default y if BR2_i386 || BR2_x86_64
+	default y if BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le
+	depends on !BR2_MIPS_SOFT_FLOAT
+
 config BR2_PACKAGE_VALGRIND
 	bool "valgrind"
-	depends on BR2_ARM_CPU_ARMV7A || BR2_i386 || \
-		   BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el || \
-		   BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le || \
-		   BR2_x86_64
+	depends on BR2_PACKAGE_VALGRIND_ARCH_SUPPORTS
 	depends on !BR2_STATIC_LIBS
-	depends on !BR2_MIPS_SOFT_FLOAT
 	help
 	  Tool for debugging and profiling Linux programs.
 
Signature · 6 lines
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:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#2 lore raw

PATCH 1/1 package/valgrind: hide comment when arch is not supported

In reply to Yann E. MORIN
Quoted 7 lines · Yann E. MORIN

Currently, the comment that "valgrind needs shared libs" is not hidden when the architecture dependencies are not met, which can confuse some users (as recently seen on IRC).

Fix that by introducing the traditional _ARCH_SUPPORTS option, and have the comment and the symbol depend on that.

Quoted 6 lines
Cc Brandon Maier <[email protected]>
Cc J?r?me Pouiller <[email protected]>
Cc Peter Seiderer <[email protected]>
Cc Thomas Petazzoni <[email protected]>
Cc Vicente Olivert Riera <[email protected]>

Applied to master after moving the _ARCH_SUPPORTS to the top of the file and
adding Pedro's Rev-by and Tested-by, thanks.

Regards,
Arnout

Signature · 6 lines
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:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#3 lore raw

PATCH 1/1 package/valgrind: hide comment when arch is not supported

In reply to Yann E. MORIN
Quoted 16 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Yann" == Yann E MORIN <[email protected]> writes:

Currently, the comment that "valgrind needs shared libs" is not hidden when the architecture dependencies are not met, which can confuse some users (as recently seen on IRC).

Fix that by introducing the traditional _ARCH_SUPPORTS option, and have the comment and the symbol depend on that.

Cc Brandon Maier <[email protected]>
Cc J?r?me Pouiller <[email protected]>
Cc Peter Seiderer <[email protected]>
Cc Thomas Petazzoni <[email protected]>
Cc Vicente Olivert Riera <[email protected]>
Quoted 3 lines

---
Note: Cc-ing the people that have touched valgrind in the past 12 months-or-so...

Committed to 2017.02.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard