[Info-vax] cross tools and CLD scope
David Jones
osuvman50 at gmail.com
Mon Oct 18 12:51:02 EDT 2021
On Monday, October 18, 2021 at 12:10:04 PM UTC-4, Craig A. Berry wrote:
> That's all impressive and scary. Luckily editing .FIRST or the code
> that generates it to include the cross tools set-up got me as far as I
> can get with that mechanism. Then I was on to cases where code is
> generated that needs to be compiled and run natively to probe for
> features that will then be used to generate additional code that will
> need to be built with the cross tools. It's not going to be pretty.
My solution certainly isn't pretty:
!
! Ensure when in crossbuild mode that generate_options is still native. The
! IA64 image is still built in the [.X86_64] directory so we don't have to change
! references to $(ARD)generate_options.exe in other dependency rules.
! Macros:
! AR_MODE XBUILD or NATIVE
! ARD Sub-directory for architecture-specific targets (e.g. [.IA64]).
!
.if $(AR_MODE) .eq XBUILD
[-.X86_64]generate_options.exe : [.X86_64]generate_options.obj
link_image = f$trnlnm("IA64_LINK","LNM$PROCESS")
deassign IA64_LINK ! undo X86_TOOLS re-definition
link /exec=[-.X86_64]generate_options.exe [-.X86_64]generate_options.obj
define IA64_LINK 'link_image' ! restore X86_TOOL re-definition
[-.X86_64]generate_options.obj : generate_options.c
go_cc = f$extract(1,f$length(cc)-1,cc) ! Change XCC to CC
go_cc $(cflags)/pointer_size=short generate_options.c /object=[-.X86_64]generate_options.obj
.else
$(ARD)generate_options.exe : $(ARD)generate_options.obj
link /exec=$(ARD)generate_options.exe $(ARD)generate_options.obj
$(ARD)generate_options.obj : generate_options.c
cc $(cflags)/pointer_size=short generate_options.c /object=$(ARD)generate_options.obj
.endif
It would be even worse if I had to worry about 64-bit being an option.
More information about the Info-vax
mailing list