[OpenWrt-Devel] [PATCH] valgrind: enable LTO and refresh patches

Hauke Mehrtens hauke at hauke-m.de
Sat Nov 24 18:24:43 EST 2018


On 11/24/18 3:00 AM, Syrone Wong wrote:
> Signed-off-by: Syrone Wong <wong.syrone at gmail.com>
> ---
>  package/devel/valgrind/Makefile                                 | 1 +
>  package/devel/valgrind/patches/100-fix_configure_check.patch    | 2 +-
>  package/devel/valgrind/patches/130-fix_arm_arch_detection.patch | 2 +-
>  3 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/package/devel/valgrind/Makefile b/package/devel/valgrind/Makefile
> index d3844c2388..a670ba51b5 100644
> --- a/package/devel/valgrind/Makefile
> +++ b/package/devel/valgrind/Makefile
> @@ -105,6 +105,7 @@ CONFIGURE_ARGS += \
>  	--disable-valgrindtk \
>  	--without-included-gettext \
>  	--with-pagesize=4 \
> +	--enable-lto
>  
>  define Package/valgrind/install	
>  	$(INSTALL_DIR) $(1)/usr/bin
> diff --git a/package/devel/valgrind/patches/100-fix_configure_check.patch b/package/devel/valgrind/patches/100-fix_configure_check.patch
> index 6ba5fdf1d7..270181ae37 100644
> --- a/package/devel/valgrind/patches/100-fix_configure_check.patch
> +++ b/package/devel/valgrind/patches/100-fix_configure_check.patch
> @@ -1,6 +1,6 @@
>  --- a/configure.ac
>  +++ b/configure.ac
> -@@ -323,7 +323,7 @@ case "${host_os}" in
> +@@ -341,7 +341,7 @@ case "${host_os}" in
>           # Ok, this is linux. Check the kernel version
>           AC_MSG_CHECKING([for the kernel version])
>   
> diff --git a/package/devel/valgrind/patches/130-fix_arm_arch_detection.patch b/package/devel/valgrind/patches/130-fix_arm_arch_detection.patch
> index c8d203390c..26291f777b 100644
> --- a/package/devel/valgrind/patches/130-fix_arm_arch_detection.patch
> +++ b/package/devel/valgrind/patches/130-fix_arm_arch_detection.patch
> @@ -6,7 +6,7 @@ Last-Update: 2013-11-30
>  
>  --- a/configure.ac
>  +++ b/configure.ac
> -@@ -234,7 +234,7 @@ case "${host_cpu}" in
> +@@ -252,7 +252,7 @@ case "${host_cpu}" in
>           ARCH_MAX="s390x"
>           ;;
>   
> 
Hi,

This does not compile for me on MIPS BE 24Kc (lantiq target), see this
error message:

make[7]: Entering directory
'/home/hauke/openwrt/lede/build_dir/target-mips_24kc_musl/valgrind-3.14.0/memcheck'
../coregrind/link_tool_exe_linux 0x58000000 mips-openwrt-linux-musl-gcc
 -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves
-fno-plt -fhonour-copts -Wno-error=unused-but-set-variable
-Wno-error=unused-result -msoft-float
-iremap/home/hauke/openwrt/lede/build_dir/target-mips_24kc_musl/valgrind-3.14.0:valgrind-3.14.0
-Wformat -Werror=format-security -D_FORTIFY_SOURCE=1 -Wl,-z,now
-Wl,-z,relro
-L/home/hauke/openwrt/lede/staging_dir/target-mips_24kc_musl/usr/lib
-L/home/hauke/openwrt/lede/staging_dir/target-mips_24kc_musl/lib
-L/home/hauke/openwrt/lede/staging_dir/toolchain-mips_24kc_gcc-7.3.0_musl/usr/lib
-L/home/hauke/openwrt/lede/staging_dir/toolchain-mips_24kc_gcc-7.3.0_musl/lib
-znow -zrelro  -o memcheck-mips32-linux -flto -flto-partition=one
-fuse-linker-plugin -mips32 -mabi=32 -O2 -finline-functions -g -Wall
-Wmissing-prototypes -Wshadow -Wpointer-arith -Wstrict-prototypes
-Wmissing-declarations -Wcast-align -Wcast-qual -Wwrite-strings
-Wempty-body -Wformat -Wformat-security -Wignored-qualifiers
-Wmissing-parameter-type -Wlogical-op -Wold-style-declaration
-fno-stack-protector -fno-strict-aliasing -fno-builtin  -O2 -static
-nodefaultlibs -nostartfiles -u __start -mips32 -mabi=32
memcheck_mips32_linux-mc_leakcheck.o
memcheck_mips32_linux-mc_malloc_wrappers.o
memcheck_mips32_linux-mc_main.o memcheck_mips32_linux-mc_main_asm.o
memcheck_mips32_linux-mc_translate.o memcheck_mips32_linux-mc_machine.o
memcheck_mips32_linux-mc_errors.o
../coregrind/libcoregrind-mips32-linux.a ../VEX/libvex-mips32-linux.a -lgcc
{standard input}: Assembler messages:
{standard input}:91297: Error: `fp=64' used with a 32-bit fpu
{standard input}:91320: Error: `fp=64' used with a 32-bit fpu
{standard input}:91341: Error: `fp=64' used with a 32-bit fpu
{standard input}:91362: Error: `fp=64' used with a 32-bit fpu
{standard input}:91383: Error: `fp=64' used with a 32-bit fpu
{standard input}:91404: Error: `fp=64' used with a 32-bit fpu
{standard input}:91425: Error: `fp=64' used with a 32-bit fpu
{standard input}:91446: Error: `fp=64' used with a 32-bit fpu
{standard input}:91467: Error: `fp=64' used with a 32-bit fpu
....

This is probably related to MIP16 being activated, I know that valgrind
does not support debugging MIPS16, but it is building with that.

Hauke

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20181125/d6cf0fa8/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list