Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 Aug 2023 10:42:08 GMT
From:      Piotr Kubaj <pkubaj@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: f9f98dc284d7 - main - misc/py-pyqir: fix build on ARM / POWER
Message-ID:  <202308031042.373Ag8Bg058506@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by pkubaj:

URL: https://cgit.FreeBSD.org/ports/commit/?id=f9f98dc284d75f25b00ebf9037b141f5528c348e

commit f9f98dc284d75f25b00ebf9037b141f5528c348e
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2023-08-03 10:39:55 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2023-08-03 10:39:55 +0000

    misc/py-pyqir: fix build on ARM / POWER
    
    char on ARM / POWER is unsigned.
---
 misc/py-pyqir/files/patch-qirlib_src_qis.rs | 32 +++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/misc/py-pyqir/files/patch-qirlib_src_qis.rs b/misc/py-pyqir/files/patch-qirlib_src_qis.rs
new file mode 100644
index 000000000000..32c481398423
--- /dev/null
+++ b/misc/py-pyqir/files/patch-qirlib_src_qis.rs
@@ -0,0 +1,32 @@
+--- qirlib/src/qis.rs.orig	2023-07-30 20:03:41 UTC
++++ qirlib/src/qis.rs
+@@ -1,6 +1,8 @@
+ // Copyright (c) Microsoft Corporation.
+ // Licensed under the MIT License.
+ 
++use std::os::raw::c_char;
++
+ use crate::{
+     builder::{build_if, try_build_if},
+     types,
+@@ -194,7 +196,7 @@ unsafe fn mz(module: LLVMModuleRef) -> LLVMValueRef {
+ 
+     let function = declare_qis(module, "mz", Functor::Body, ty);
+     let attr_name = "writeonly";
+-    let kind_id = LLVMGetEnumAttributeKindForName(attr_name.as_ptr().cast::<i8>(), attr_name.len());
++    let kind_id = LLVMGetEnumAttributeKindForName(attr_name.as_ptr().cast::<c_char>(), attr_name.len());
+     let attr = LLVMCreateEnumAttribute(context, kind_id, 0);
+     let result_param_index = 2; // indices are 1 based.
+     LLVMAddAttributeAtIndex(function, result_param_index, attr);
+@@ -208,9 +210,9 @@ unsafe fn add_irreversible_attr(context: LLVMContextRe
+     let irreversable = "irreversible";
+     let irreversable_attr = LLVMCreateStringAttribute(
+         context,
+-        irreversable.as_ptr().cast::<i8>(),
++        irreversable.as_ptr().cast::<c_char>(),
+         irreversable.len() as u32,
+-        "".as_ptr().cast::<i8>(),
++        "".as_ptr().cast::<c_char>(),
+         0,
+     );
+     LLVMAddAttributeAtIndex(function, LLVMAttributeFunctionIndex, irreversable_attr);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202308031042.373Ag8Bg058506>