From patchwork Wed Apr 27 15:17:11 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandru Ardelean X-Patchwork-Id: 615710 X-Patchwork-Delegate: blogic@openwrt.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (caladan.dune.hu [78.24.191.180]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3qw3VD1drtz9t4Z for ; Thu, 28 Apr 2016 01:17:24 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=fKVFLKUz; dkim-atps=neutral Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 32A33B90C01; Wed, 27 Apr 2016 17:17:17 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP; Wed, 27 Apr 2016 17:17:17 +0200 (CEST) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id E74CDB90BF9 for ; Wed, 27 Apr 2016 17:17:15 +0200 (CEST) X-policyd-weight: using cached result; rate:hard: -7 Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Wed, 27 Apr 2016 17:17:15 +0200 (CEST) Received: by mail-wm0-f68.google.com with SMTP id e201so14113225wme.2 for ; Wed, 27 Apr 2016 08:17:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=rTDtHwkb4u+iAQJOCRGvG9xZowOdj1gziT7gVWOKqLw=; b=fKVFLKUzQe7X10qwMscFNOxO7Wd2F34uO4y9A6uD46RNP0buE6Deb16EeHSts8PhTA GjAp1M2t+Ao2HsF73KHhIOrKIHttXqZeMXPxK7ku5W8QFyM6O995RMyIpReIemc/MKGs oXbwYSFOc2QfjNr9vR7ET/Dpqb1HHp+v/4FFHmIj1qIVX7BlkSuzvSIP1qMo1gthu8W2 zoJ24zz89Q/ctzgqaCzSl6RA+CalqPJwSiI6meNTdLQhqbW8BGycU6t/sKT+DKasZ3PS bPvSuJohLkHpI3AYp/9BAsS4gZhukjiCmmNDGvbzaLoPkCh4J62nxzUnBADdVXtjeSEN wh+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=rTDtHwkb4u+iAQJOCRGvG9xZowOdj1gziT7gVWOKqLw=; b=VOoB7wG0KDsC0oXeJmW0m8LcWeVt/hzGcHY080RrqB+YiaCJwlA2uPRQzUNj6mZCiU MkiTn0UD6inVeyyu5hUVI+ZJ/M5MNZM910s9YYkgoMiphfZRzi096/ae2UOWh/IvQP8a twzKDbkUIeph93J8LZALle0fAPO8SZhQdQBZGNS0kA0K92QVG9F2DziJknWSLbhDQd17 qUI8XwlYOg/Oq19CDlt0dqUkdq8Vs3iIaVYnHoeZT+Fbf48ULDkIQAnC9qFH4vRay8XZ AzkpPJwmYEzqPqWjwvffDbRS/YqlXe48nZCo+W0lgA79agr5ivaoaU4xfNaTI5IT4wAu JIQQ== X-Gm-Message-State: AOPr4FVy5EuU92Tl7Z3cRTh7RwqXU8MhfLtk2Zex56hUK3CtJ6gf3iR6q3m/CH1mDpbAQQ== X-Received: by 10.194.11.97 with SMTP id p1mr9795882wjb.159.1461770235399; Wed, 27 Apr 2016 08:17:15 -0700 (PDT) Received: from localhost.localdomain ([5.2.198.78]) by smtp.gmail.com with ESMTPSA id r204sm29921241wmg.20.2016.04.27.08.17.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 27 Apr 2016 08:17:14 -0700 (PDT) From: Alexandru Ardelean To: openwrt-devel@lists.openwrt.org Date: Wed, 27 Apr 2016 18:17:11 +0300 Message-Id: <1461770231-31507-1-git-send-email-ardeleanalex@gmail.com> X-Mailer: git-send-email 2.8.1 Subject: [OpenWrt-Devel] [PATCH] strace: fix build on mpc85xx target X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" This is another issue with musl and kernel headers colliding. However this one cannot seem to be fixed with header guards as my last 2 patches for mpc85xx. Patch 1: http://patchwork.ozlabs.org/patch/614830/ Patch 2: http://patchwork.ozlabs.org/patch/615669/ It seems that doing a bit inclusion black-magic in the strace package fixes this. Adding header guards in musl seems a bit tricky, because strace requires some reg definitions from the kernel headers which are not in the musl headers. The ar71xx target seems to build fine with this change. It's the only I've manually tested (other than mpc85xx). Build failure is (from buildbot): =========================================================== process.Tpo -c -o strace-process.o `test -f 'process.c' || echo './'`process.c In file included from /store/buildbot/slave/mpc85xx/build/staging_dir/toolchain-powerpc_8540_gcc-5.3.0_musl-1.1.14/include/linux/ptrace.h:100:0, from ptrace.h:55, from process.c:46: /store/buildbot/slave/mpc85xx/build/staging_dir/toolchain-powerpc_8540_gcc-5.3.0_musl-1.1.14/include/asm/ptrace.h:31:8: error: redefinition of 'struct pt_regs' struct pt_regs { ^ In file included from /store/buildbot/slave/mpc85xx/build/staging_dir/toolchain-powerpc_8540_gcc-5.3.0_musl-1.1.14/include/sys/user.h:11:0, from regs.h:1, from process.c:45: /store/buildbot/slave/mpc85xx/build/staging_dir/toolchain-powerpc_8540_gcc-5.3.0_musl-1.1.14/include/bits/user.h:1:8: note: originally defined here struct pt_regs { ^ Makefile:3141: recipe for target 'strace-process.o' failed =========================================================== Signed-off-by: Alexandru Ardelean --- .../ocedo-001-workaround-pt_regs-collisions-ppc.patch | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 package/devel/strace/patches/ocedo-001-workaround-pt_regs-collisions-ppc.patch diff --git a/package/devel/strace/patches/ocedo-001-workaround-pt_regs-collisions-ppc.patch b/package/devel/strace/patches/ocedo-001-workaround-pt_regs-collisions-ppc.patch new file mode 100644 index 0000000..3a56003 --- /dev/null +++ b/package/devel/strace/patches/ocedo-001-workaround-pt_regs-collisions-ppc.patch @@ -0,0 +1,15 @@ +diff --git a/ptrace.h b/ptrace.h +index d8af976..f767378 100644 +--- a/ptrace.h ++++ b/ptrace.h +@@ -52,7 +52,10 @@ extern long ptrace(int, int, char *, long); + # define ptrace_peeksiginfo_args XXX_ptrace_peeksiginfo_args + #endif + ++#include ++#define __ASSEMBLY__ + #include ++#undef __ASSEMBLY__ + + #ifdef HAVE_STRUCT_IA64_FPREG + # undef ia64_fpreg