From patchwork Sat Sep 28 23:16:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 174665 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp5357542ill; Sat, 28 Sep 2019 16:17:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqwOQKip4Oto1I2l0BUTy545NN+84YMjJvL0f3+kpvBJhGM9g8JSsxptCHWF2SJAB1mPG/B5 X-Received: by 2002:a17:90a:b302:: with SMTP id d2mr17700005pjr.3.1569712639087; Sat, 28 Sep 2019 16:17:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569712639; cv=none; d=google.com; s=arc-20160816; b=jIkjagbzjTJPz1vKko5y9Zi3Rq7kyh5NOqFhqNmyCkJGvLbfxBpt6s3j4rnrJDTo2D 8+VOSRagGmR6acfeFalJFEJ2nESOFClNtaCH2BTAcWHqRF2NgbS8H5wemYvz4I9xEtu+ oD7UPiIen0CtYN4YcR/YG0to13osjefy88N3zmqxrW5NAhYjb+rTowkYkf8hQzp3/eDQ pMxKc5WQIYUWjfGJlFqSPb6rFmDNg2jbdMdMcwMQwDpNtlUxqWAT+iBIXoeXBHkKwGSw 2bsv+vcKWjPRiwC5b7hx2Jw7SDzht1wAhs6IB+z453z0/L8ftTwjRkTwHnRRXws0cA3I DFSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:delivered-to; bh=135HYGIOOG5PZeDt7U1ZxsPGivhzo7Wp4Gsbs5/INGQ=; b=VOJrJzHVt6EOeD9uSxnA+NBDrE6U6UCsc6vsbWHcmZI2uPzp1ltbwsx2FrE5H0BNzU PLztYQMUdGHUsFMnI2hcXUeGhIL9GtsXsXY56xr3ndRVhSEok/dkQl0Gd/ROmLniKEeH Bd4Ww9TGganDaR9OMe/oJJFtPszqcGcrxIwr4xpucw2hMsvNUxYh9Ne+LIRxgxD29wUo VIUWwvIiRjdK0PqkuJgGBa2xrbMlAgLEN6R3f1H6Kd1ead+n39RiDwz9q8kJPDPNHK+K 0s13ZSYV4hpWMW3AOtTErmuUX8TQLHHpB+lxSbQALfYjjxuwYc5YfW6XxKZYZKKlJUpC hPKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=ceZbeNSz; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id c4si9811263pgw.113.2019.09.28.16.17.18; Sat, 28 Sep 2019 16:17:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=ceZbeNSz; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from ec2-34-214-78-129.us-west-2.compute.amazonaws.com (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 3B5CD7F318; Sat, 28 Sep 2019 23:17:16 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-pf1-f178.google.com (mail-pf1-f178.google.com [209.85.210.178]) by mail.openembedded.org (Postfix) with ESMTP id 06FAC7F304 for ; Sat, 28 Sep 2019 23:16:35 +0000 (UTC) Received: by mail-pf1-f178.google.com with SMTP id y5so3481320pfo.4 for ; Sat, 28 Sep 2019 16:16:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=VsPmnR9rJRoYIzrueOkAGwqPr/1p5Dqqs8hhihqHU5M=; b=ceZbeNSzdChUYGK7bMQpXQK+ns0rFUiKEAP3pRI3qZnuc849UOzad8wXXO0ni3fRz2 xn06ShoIoxbITh2bW8tlMI2MeahntMBzg+ru2p9JMGZP43yNbec2KAG/yST0eJJMAI9g SXXt2lwdicFnKPQTV/newM8YHz8f9JqwVQ8zAGgrBnx4u1OeqdH0afrz1MW3ijXt78tu 1vTKi8ByGCFutohsKt0ayZ/NcEb/E41HicvbANuFqjf65yRoRNWiAGqYa1u1L1pDRubE Sk0aaPpvxQOJzOoiQJtGn/WQzWJ5pR9uwWpBN8Ati0cPBEop951pSYS7XxrO2LCoO8SH OVlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=VsPmnR9rJRoYIzrueOkAGwqPr/1p5Dqqs8hhihqHU5M=; b=d3XZUe3G8fKofviYUqhB4Agi0qepFt1UBcJp2BaBHW+46EV55c+sgPPluVSyEED2eq EiYaIaeaGtBrmoLnV7aJp8AdtC46NWUkOffHlh9aoRMXtTZa4vvepLH28i+KlLW4+UGU I/K+fZkIweLPl43He5Rr3GrpzqDhh0caIhGU410FlEU0Z1yPtzlfSpdzQwSqNuimj+TD l0mjVYdMqba5QEsbwmp+FcDFnKC0ceIYsUvZS7CAFPry4mwLEHoECcUj07ms+p7wwq5Y lY5Lp0QKsZEhtnCl2DL8UDvsZGH9ey4xLa5kSIoV2iyDjTxKdI+O0IUeZ3FYDT3Zv/79 LJxQ== X-Gm-Message-State: APjAAAUSAl/VxaLwYRcSkexYw4oPseQxLIMPFlDX34nNujNgDhQCjor6 qYLVX355dKBcYaRYMvLHim2Ju6JwzSo= X-Received: by 2002:a62:cb:: with SMTP id 194mr13664413pfa.130.1569712596517; Sat, 28 Sep 2019 16:16:36 -0700 (PDT) Received: from apollo.hsd1.ca.comcast.net (c-73-71-176-3.hsd1.ca.comcast.net. [73.71.176.3]) by smtp.gmail.com with ESMTPSA id 31sm9690507pgr.55.2019.09.28.16.16.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 Sep 2019 16:16:36 -0700 (PDT) From: Khem Raj To: openembedded-core@lists.openembedded.org Date: Sat, 28 Sep 2019 16:16:17 -0700 Message-Id: <20190928231617.3553801-2-raj.khem@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190928231617.3553801-1-raj.khem@gmail.com> References: <20190928231617.3553801-1-raj.khem@gmail.com> MIME-Version: 1.0 Subject: [OE-core] [PATCH 2/2] musl: Fix __riscv_mc* containers to match glibc X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org Fixes packages like gdb compile Signed-off-by: Khem Raj --- ...-for-riscv-floating-point-state-to-_.patch | 67 +++++++++++++++++++ meta/recipes-core/musl/musl_git.bb | 1 + 2 files changed, 68 insertions(+) create mode 100644 meta/recipes-core/musl/musl/0001-Change-container-for-riscv-floating-point-state-to-_.patch -- 2.23.0 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/recipes-core/musl/musl/0001-Change-container-for-riscv-floating-point-state-to-_.patch b/meta/recipes-core/musl/musl/0001-Change-container-for-riscv-floating-point-state-to-_.patch new file mode 100644 index 0000000000..a9abb18726 --- /dev/null +++ b/meta/recipes-core/musl/musl/0001-Change-container-for-riscv-floating-point-state-to-_.patch @@ -0,0 +1,67 @@ +From 52a37610650e7366a398dd07393d3902d2f3faa3 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 28 Sep 2019 12:19:57 -0700 +Subject: [PATCH] Change container for riscv floating-point state to __riscv_mc_fp_state + +Match the struct elements with glibc +glibc also uses __riscv_mc prefix, some packages like gdb uses that + +Upstream-Status: Submitted [https://www.openwall.com/lists/musl/2019/09/28/1] +Signed-off-by: Khem Raj +--- + arch/riscv64/bits/signal.h | 18 +++++++++--------- + arch/riscv64/bits/user.h | 2 +- + 2 files changed, 10 insertions(+), 10 deletions(-) + +diff --git a/arch/riscv64/bits/signal.h b/arch/riscv64/bits/signal.h +index 76d7ad80..aba7ab00 100644 +--- a/arch/riscv64/bits/signal.h ++++ b/arch/riscv64/bits/signal.h +@@ -13,25 +13,25 @@ typedef unsigned long greg_t; + typedef unsigned long gregset_t[32]; + + struct __riscv_mc_f_ext_state { +- unsigned int f[32]; +- unsigned int fcsr; ++ unsigned int __f[32]; ++ unsigned int __fcsr; + }; + + struct __riscv_mc_d_ext_state { +- unsigned long long f[32]; +- unsigned int fcsr; ++ unsigned long long __f[32]; ++ unsigned int __fcsr; + }; + + struct __riscv_mc_q_ext_state { +- unsigned long long f[64] __attribute__((aligned(16))); +- unsigned int fcsr; ++ unsigned long long __f[64] __attribute__((aligned(16))); ++ unsigned int __fcsr; + unsigned int reserved[3]; + }; + + union __riscv_mc_fp_state { +- struct __riscv_mc_f_ext_state f; +- struct __riscv_mc_d_ext_state d; +- struct __riscv_mc_q_ext_state q; ++ struct __riscv_mc_f_ext_state __f; ++ struct __riscv_mc_d_ext_state __d; ++ struct __riscv_mc_q_ext_state __q; + }; + + typedef union __riscv_mc_fp_state fpregset_t; +diff --git a/arch/riscv64/bits/user.h b/arch/riscv64/bits/user.h +index d2e383b2..9918a2fe 100644 +--- a/arch/riscv64/bits/user.h ++++ b/arch/riscv64/bits/user.h +@@ -5,4 +5,4 @@ struct user_fpregs_struct { + + #define ELF_NGREG 32 + typedef unsigned long elf_greg_t, elf_gregset_t[ELF_NGREG]; +-typedef struct user_fpregs_struct elf_fpregset_t; ++typedef union __riscv_mc_fp_state elf_fpregset_t; +-- +2.23.0 + diff --git a/meta/recipes-core/musl/musl_git.bb b/meta/recipes-core/musl/musl_git.bb index 335d53d42f..13fd17353d 100644 --- a/meta/recipes-core/musl/musl_git.bb +++ b/meta/recipes-core/musl/musl_git.bb @@ -16,6 +16,7 @@ SRC_URI = "git://git.musl-libc.org/musl \ file://0001-Make-dynamic-linker-a-relative-symlink-to-libc.patch \ file://0002-ldso-Use-syslibdir-and-libdir-as-default-pathes-to-l.patch \ file://0001-correct-the-operand-specifiers-in-the-riscv64-CAS-ro.patch \ + file://0001-Change-container-for-riscv-floating-point-state-to-_.patch \ " S = "${WORKDIR}/git"