From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50040.outbound.protection.outlook.com [40.107.5.40]) by sourceware.org (Postfix) with ESMTPS id 3651F385141E for ; Wed, 9 Sep 2020 08:18:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 3651F385141E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=Andrea.Corallo@arm.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jQy1jbPoGbiVOLWkhfpoPj/Sw3dQ3oIH7ysKpu25MJ8=; b=qxKhMjpeHhcUU1g58/QpYuXsrz3DKX4VG77mVQgOex+VZZ/+Wl0yiFloOKlu1yR9+niMCbtpsU6lCVXK5H8bnRTHkuBnLNxyhJ+J9Rck2NvYZ5GoAl8cdiIa3JdhVlvBaMR2uEaQolfQHJ2ZjaF6Vdkgeytsm9jzxzlv3YIrrJ8= Received: from DB8P191CA0001.EURP191.PROD.OUTLOOK.COM (2603:10a6:10:130::11) by AM6PR08MB4983.eurprd08.prod.outlook.com (2603:10a6:20b:e4::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3348.17; Wed, 9 Sep 2020 08:18:50 +0000 Received: from DB5EUR03FT053.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:130:cafe::33) by DB8P191CA0001.outlook.office365.com (2603:10a6:10:130::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3348.17 via Frontend Transport; Wed, 9 Sep 2020 08:18:50 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; gcc.gnu.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;gcc.gnu.org; dmarc=bestguesspass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DB5EUR03FT053.mail.protection.outlook.com (10.152.21.119) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3370.16 via Frontend Transport; Wed, 9 Sep 2020 08:18:49 +0000 Received: ("Tessian outbound 7fc8f57bdedc:v64"); Wed, 09 Sep 2020 08:18:49 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: ea69d8565ddb41d6 X-CR-MTA-TID: 64aa7808 Received: from e67bcd7a562a.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id A0261B76-F5D3-48FA-8FFB-B5A20789870C.1; Wed, 09 Sep 2020 08:18:44 +0000 Received: from EUR04-DB3-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id e67bcd7a562a.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 09 Sep 2020 08:18:44 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AS+sYAxn+Ro4DwoXUr1PNJmn2yuFG92cIOBw+oxm3tzeGTCtzmj4G3LuTf5cw5EKXW0HvKVnJqYI1Q3aL7oylaeTnfbt1OPif/WuGeR7W5hg9PBJaylaTfcfllp9Vm6jwIUvCIp95ysTFh1uyEkcvyGZ++6zEzTk012KX08CDerbKPB2KWhummDRkQ9lZraMJlrKXZqWzND6UPEWiAQevzy1u/kVIbtBTT9e6jwHG36Li8YJzpkXN65etmg58ACghmWF8lbzhNlk0YfF3vZhzRUSniIDSnaX7KbabiIaq3vA7lxJx/Mg0wLbI03/HZfF0DDJ+XDLOFMd3a2cZ83ehw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jQy1jbPoGbiVOLWkhfpoPj/Sw3dQ3oIH7ysKpu25MJ8=; b=a8idy8Lbygqv+8rflNWAXIXx9zumqXowvvXzbOQ9POjt353PBM0mi8sZLnHJoKpcn9k13XCLELAaLpgShiT3kcL9CtDKArsQdfrv+3dCOqHOHM0Gy3GAQs92yqXkPWfgmd2vbOwZ96CTC+OkHBF/RVm98XWBMotx4F4wLSAQiLgT6VMr2sVoWQ2Uc638K5/5r71vLzud57oPMMiAfEK0xZy6EnxEZO7fSKiq9/CPUZXnNPN6zSUy3LWVH7Yklqa1MaqaB1epPCFy81Z6wsyJhEVRPDBbRm3n8qUHF8PrrSldwy7RPRF1paaD9bGckE4u+NPNwV5SMY3D9MgdxCSexA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jQy1jbPoGbiVOLWkhfpoPj/Sw3dQ3oIH7ysKpu25MJ8=; b=qxKhMjpeHhcUU1g58/QpYuXsrz3DKX4VG77mVQgOex+VZZ/+Wl0yiFloOKlu1yR9+niMCbtpsU6lCVXK5H8bnRTHkuBnLNxyhJ+J9Rck2NvYZ5GoAl8cdiIa3JdhVlvBaMR2uEaQolfQHJ2ZjaF6Vdkgeytsm9jzxzlv3YIrrJ8= Authentication-Results-Original: gcc.gnu.org; dkim=none (message not signed) header.d=none;gcc.gnu.org; dmarc=none action=none header.from=arm.com; Received: from AM6PR08MB4900.eurprd08.prod.outlook.com (2603:10a6:20b:cc::10) by AM6PR08MB3269.eurprd08.prod.outlook.com (2603:10a6:209:49::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3348.15; Wed, 9 Sep 2020 08:18:43 +0000 Received: from AM6PR08MB4900.eurprd08.prod.outlook.com ([fe80::d070:f136:4090:9ed3]) by AM6PR08MB4900.eurprd08.prod.outlook.com ([fe80::d070:f136:4090:9ed3%5]) with mapi id 15.20.3348.019; Wed, 9 Sep 2020 08:18:43 +0000 From: Andrea Corallo To: Daurnimator Cc: David Malcolm , jit@gcc.gnu.org Subject: Re: libgccjit questions References: Date: Wed, 09 Sep 2020 10:18:41 +0200 In-Reply-To: (Daurnimator's message of "Wed, 9 Sep 2020 12:50:42 +1000") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Content-Type: text/plain X-ClientProxiedBy: LO2P265CA0241.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:8a::13) To AM6PR08MB4900.eurprd08.prod.outlook.com (2603:10a6:20b:cc::10) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from e124257 (217.140.106.37) by LO2P265CA0241.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:8a::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3370.16 via Frontend Transport; Wed, 9 Sep 2020 08:18:42 +0000 X-Originating-IP: [217.140.106.37] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: acff5fc4-f5a8-4b29-c369-08d85498fb34 X-MS-TrafficTypeDiagnostic: AM6PR08MB3269:|AM6PR08MB4983: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true Content-Transfer-Encoding: quoted-printable NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:10000;OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: NZ2BTU/6Cjne7vwaY/mQ/6xdLeoq+/ks1PeYCBIyyINdGfr7xLYuFlBaAHXli5Zxi3KnEPHETR3FguiNvFinQc0a7OebAgoo/KTW67U0nsoKGahjuAD5HMYN5WKfU7f3Kb2u0gZhaWaamaNqFHkDJYY1qdUr69F5a38PRphqJvlSyeoxDU6rMDLig6GM33syKQawWY7N+BRnd9lvALQOE5d18uNZ9GL9TD8yL9m4ZZ7YUT2xgGUHB3mC7SKrllHomn5T5UheWZ4pgqhh5ykggLrH0dwb9Pb+UHlYS9lrpLJzJ6sCs5U4jyAYmrN29itiMn2ffCeQ8y1CJSlYuuImn9yRkqpb+xLzj6jlHhmlnMVR6U6sS4slKlAV6Q/FnCpSmjOn7Lcn/S1yBeFIVHTODg== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM6PR08MB4900.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(376002)(39860400002)(396003)(346002)(366004)(136003)(66946007)(86362001)(3480700007)(6496006)(7116003)(16526019)(52116002)(4326008)(26005)(478600001)(186003)(5660300002)(2906002)(44832011)(6916009)(36756003)(66556008)(66476007)(6486002)(316002)(8676002)(956004)(83380400001)(8936002)(966005)(2616005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: xaZnvH2QH5BBsc6eBZhVZ3nWTN7MS3E/Gt3qxhKd23r0UT1xZQi/SkaMNxJq6U5lZ0C6tpp7eEb5Bb2dh/rJ5CscrWq6mBoWme9p7y+mYk8ml9bTM4W/6VHi8kol3enrsMnhRMmxGpBYwAuKGFOv9BgpN9j31Y2oSm/mPxFifPOMck7beExTdl3M4Z1b5oCWlfhHL3UIiROtn2L7QhX6fWActeZv58QL4a+lnstJ1gGRKGpxHVzO8oq8iugLuLTWeafA1iWtcOEGsjnEOKS2GCmVZ3/LXq6dX86SVeDRum0/dmwsysqLj2P0U8whYg1ncPZSgnVv9KO4j3twlB+9wgoXDhKRsF8WamOBmVqkE0+yOyzamH4SkQQn4tNQchj3H51spdkfW+SW3xWu3iha0BZlheYsR9GUFnFFjQC1fN87a41rTgGDG8g4B8XNblikkBoj3y4W1BFVsS0Dunq2OMZE2wBzdMC2TRDnVA3pxmg7DtxB2RXdivRFM4S6vpr+3MPFVOjPRv9Gs1bwKaJryTQCTDbgsC6Uy+UEUT82AKfA+2N1AYak0jQeSP7pJSCIgzfqQolHFLsrEoLncOoQMZXgJtSATo0rUM9DTgSMb3W5XF1ilD6KOIxmmL+eim6DXPWMjS+Tz9Jsc7pdOwZl0g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB3269 Original-Authentication-Results: gcc.gnu.org; dkim=none (message not signed) header.d=none;gcc.gnu.org; dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT053.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: d5172b9f-ec9d-4d69-b10d-08d85498f72c X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: t+cCN3n+QjJajZanTK2Yvtyt9iiEpoVw3LogJ5UyihbuDPDP9+WdBoVqqe+S0spGI1+dalRDHl2zq3pzukmqtrwU6iG9Qz71FL/trGXVlcjMf1Q8ChnY5jBzxlywQjcw5T87L/5dkmm5Rue9BocYzIHsRQX68VWlJJs8la38iSX82ddRLCwKaN8JoIe3nyfR+UpVEJPrIMTc5YlhlSCgGRN4hm/8ppdYF5nvNzxn5JzjP6rYpIGzSH7sfBXiNa4FJTmiu68fht44wMbNRM2+pMQSAUVA7nTzJtcVRNR8Nc36lyw2mLiW6tzuXCm8mAFSXDytV2/hFiEBBF2Zmo3gqjP5G7sujnBo6gEoq13g3ZSIcacTOLpYKPrGgbtFcwlVo7bYqnJlNt/y5rZa0xico300oc9haSPoe16SF4tbXdvIv9aiRNfLC/7CE9hfktnldTsZMUj3CbGaF9OymPlu8Q== X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(4636009)(39860400002)(376002)(136003)(346002)(396003)(46966005)(336012)(6862004)(83380400001)(82740400003)(44832011)(356005)(2616005)(81166007)(47076004)(4326008)(956004)(86362001)(70206006)(316002)(70586007)(3480700007)(478600001)(6486002)(82310400003)(6496006)(966005)(2906002)(5660300002)(26005)(8936002)(7116003)(16526019)(186003)(36756003)(8676002); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Sep 2020 08:18:49.9156 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: acff5fc4-f5a8-4b29-c369-08d85498fb34 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: DB5EUR03FT053.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB4983 X-Spam-Status: No, score=-9.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, KAM_SHORT, MSGID_FROM_MTA_HEADER, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: jit@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Jit mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Sep 2020 08:18:57 -0000 Daurnimator writes: > Hi, Hi! > I'm looking into using libgccjit as an ahead-of-time compiler to write > a backend for zig (https://ziglang.org/) > I've got a few questions I hope you can answer: > > What became of cross-compilation? I saw it mentioned as a possible > roadmap item in > https://gcc.gnu.org/legacy-ml/jit/2015-q3/msg00086.html) AFAIK cross compilation is not supported and nothing is going on in that sense. I believe this is in line with the idea of libgccjit being mainly intended for making jitters. > How can I support inline assembly? I believe you cannot use inline assembly as we have no specific support for that and asm and __asm__ are not builtin functions so they can't be used with gcc_jit_context_get_builtin_function. > Would it be reasonable to add an API that allows extracting sections > without writing out to a file and reading it back in? The elf file is always produced because the assembler is invoked as a child process, so as of today this cannot happen in memory. > Alteratively, would it be possible to get a pointer and length to e.g. > an ELF in memory? > > Should distros be packaging libgccjit? > I noticed that e.g. ArchLinux is not. Possibly because it is > documented as "experimental"; possibly because it requires building > gcc with --enable-host-shared ? Most distros are already packing libgccjit, even if the quality of the package may vary. > What is the license situation with libgccjit; is it GPL? LGPL? what > does this mean for code that uses libgccjit? AFAIU libgccjit is part of GCC and this is released under the GNU General Public License. > Thanks, > Daurnimator Bests Andrea IMPORTANT NOTICE: The contents of this email and any attachments are confid= ential and may also be privileged. If you are not the intended recipient, p= lease notify the sender immediately and do not disclose the contents to any= other person, use it for any purpose, or store or copy the information in = any medium. Thank you.