Bug#1008134: uftrace: Build fail with experimental armhf

2022-03-24 Thread paul cannon
On Wed, Mar 23, 2022 at 10:36:46AM +0900, Nobuhiro Iwamatsu wrote:
> Build fails with experimental armhf. 
> 
> https://buildd.debian.org/status/fetch.php?pkg=uftrace=armhf=0.11-3=1647358997=0
> 
> I attached a patch what revice this issue.
> Please check and apply it.

This is great. Thank you, I'll apply it to the 0.11-4 release I'm
working on, and I'll pass it upstream.

Paul



Bug#1008134: uftrace: Build fail with experimental armhf

2022-03-22 Thread Nobuhiro Iwamatsu
Source: uftrace
Version: 0.11-3
Severity: important

Dear Maintainer,

Build fails with experimental armhf. 

https://buildd.debian.org/status/fetch.php?pkg=uftrace=armhf=0.11-3=1647358997=0

I attached a patch what revice this issue.
Please check and apply it.

Best regards,
Nobuhiro

-- System Information:
Debian Release: bookworm/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: armhf, arm64, i386

Kernel: Linux 5.16.0-5-amd64 (SMP w/16 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, 
TAINT_UNSIGNED_MODULE
Locale: LANG=ja_JP.UTF-8, LC_CTYPE=ja_JP.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
>From 96787cd3bce4a28532ebb53df3d70ddbda23a303 Mon Sep 17 00:00:00 2001
From: Nobuhiro Iwamatsu 
Date: Wed, 23 Mar 2022 10:12:00 +0900
Subject: [PATCH] Fix build on armhf

Fix compilation errors by ARM VFP assembler.
The contents of the error are as follows:
  
https://buildd.debian.org/status/fetch.php?pkg=uftrace=armhf=0.11-3=1647358997=0

  ```
gcc -D_GNU_SOURCE -ffile-prefix-map=/<>=. -Wdate-time
-D_FORTIFY_SOURCE=2 -iquote /<> -iquote /<> \
-iquote /<>/arch/arm -Wdeclaration-after-statement -W
-Wall -Wno-unused-parameter -Wno-missing-field-initializers -O2 -g \
-DDEBUG_MODE=0 -DHAVE_CXA_DEMANGLE -DHAVE_LIBPYTHON3 \
-I/usr/include/python3.9  -DLIBPYTHON_VERSION=3.9 -DHAVE_PERF_CLOCKID \
-DHAVE_PERF_CTXSW -DHAVE_ARM_HARDFP -DHAVE_LIBNCURSES -D_DEFAULT_SOURCE 
\
-D_XOPEN_SOURCE=600  -DHAVE_LIBELF -DHAVE_LIBDW -DHAVE_LIBCAPSTONE \
-I/usr/include/capstone-fPIC -fvisibility=hidden \
-fno-omit-frame-pointer -c -o /<>/arch/arm/mcount.op \
/<>/arch/arm/mcount.S
/<>/arch/arm/mcount.S: Assembler messages:
/<>/arch/arm/mcount.S:100: Error: selected processor does not 
support `vpush {d0-d1}' in ARM mode
/<>/arch/arm/mcount.S:106: Error: selected processor does not 
support `vpop {d0-d1}' in ARM mode
make[2]: *** [Makefile:25: /<>/arch/arm/mcount.op] Error 1
make[1]: *** [Makefile:275: /<>/arch/arm/mcount-entry.op] Error 2
```

Signed-off-by: Nobuhiro Iwamatsu 
---
 arch/arm/mcount.S  | 2 ++
 arch/arm/plthook.S | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/arch/arm/mcount.S b/arch/arm/mcount.S
index 703f6f2..62a5c0d 100644
--- a/arch/arm/mcount.S
+++ b/arch/arm/mcount.S
@@ -97,12 +97,14 @@ ENTRY(mcount_return)
push{r0-r3, lr, pc}  /* ensure 8-byte alignment */
mov r0, sp
 #ifdef HAVE_ARM_HARDFP
+   .fpu vfpv2
vpush   {d0-d1}
 #endif
 
bl  mcount_exit
 
 #if HAVE_ARM_HARDFP
+   .fpu vfpv2
vpop{d0-d1}
 #endif
/* update return address (pc) in the stack */
diff --git a/arch/arm/plthook.S b/arch/arm/plthook.S
index bcfdb1d..599301d 100644
--- a/arch/arm/plthook.S
+++ b/arch/arm/plthook.S
@@ -57,12 +57,14 @@ ENTRY(plthook_return)
push {r0-r3, lr, pc}  /* ensure 8-byte alignment */
mov r0, sp
 #ifdef HAVE_ARM_HARDFP
+   .fpu vfpv2
vpush {d0-d1}
 #endif
 
bl plthook_exit
 
 #ifdef HAVE_ARM_HARDFP
+   .fpu vfpv2
vpop {d0-d1}
 #endif
/* update return address (pc) in the stack */
-- 
2.35.1