From: Steve Baird Date: Wed, 7 Sep 2022 21:15:46 +0000 (-0700) Subject: [Ada] Improve CUDA host-side and device-side binder support X-Git-Tag: basepoints/gcc-14~4593 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bd548d67e7141c29d4a7b81ca893402bc2ef100a;p=thirdparty%2Fgcc.git [Ada] Improve CUDA host-side and device-side binder support On the host-side, the binder now generates CUDA_Execute pragmas to invoke initialization and finalization on the device-side. The front end's expansion of these pragmas includes references to entities declared in package CUDA.Internal. Generate a with-clause so that unit will be available. gcc/ada/ * bindgen.adb: When the binder is invoked for the host, generate a "with CUDA.Internal;" with clause. --- diff --git a/gcc/ada/bindgen.adb b/gcc/ada/bindgen.adb index 1b21230458ed..b2fa44d2dffd 100644 --- a/gcc/ada/bindgen.adb +++ b/gcc/ada/bindgen.adb @@ -2552,6 +2552,9 @@ package body Bindgen is if Enable_CUDA_Expansion then WBI ("with Interfaces.C;"); WBI ("with Interfaces.C.Strings;"); + + -- with of CUDA.Internal needed for CUDA_Execute pragma expansion + WBI ("with CUDA.Internal;"); end if; Resolve_Binder_Options (Elab_Order);