[m-rev.] for review: work towards supporting 64-bit Windows with MSVC

Julien Fischer jfischer at opturion.com
Sun Jun 25 16:17:47 AEST 2023


On Sun, 25 Jun 2023, Peter Wang wrote:

>> diff --git a/Mmake.common.in b/Mmake.common.in
>> index 848b376..dc162be 100644
>> --- a/Mmake.common.in
>> +++ b/Mmake.common.in
>> @@ -185,6 +185,10 @@ BOEHM_CFLAGS_FOR_THREADS = @BOEHM_CFLAGS_FOR_THREADS@ \
>>   	@ENABLE_BOEHM_THREAD_LOCAL_ALLOC@ \
>>   	@ENABLE_BOEHM_PARALLEL_MARK@
>>
>> +# The CPU type to pass via the "cpu" argument of boehm_gc/NT_MAKEFILE.
>> +# (This is only relevant when using MSVC.)
>> +BOEHM_WINDOWS_CPU_TYPE = @BOEHM_WINDOWS_CPU_TYPE@
>> +
>
> Or BOEHM_MSVC_CPU_TYPE? Doesn't matter.
>
>> @@ -544,8 +549,14 @@ convert_c_compiler_type_with_version(CC_Str, C_CompilerType) :-
>>           convert_gcc_version(Major, Minor, Patch, C_CompilerType)
>>       else if Tokens = ["clang", Major, Minor, Patch] then
>>           convert_clang_version(Major, Minor, Patch, C_CompilerType)
>> -    else if Tokens = ["msvc", Version] then
>> -        convert_msvc_version(Version, C_CompilerType)
>> +    else if Tokens = ["msvc", "x64", Version] then
>> +        convert_msvc_x64_version(Version, C_CompilerType)
>> +    else if
>> +        ( Tokens = ["msvc", Version]
>> +        ; Tokens = ["msvc", "x86", Version]
>> +        )
>> +    then
>> +        convert_msvc_x86_version(Version, C_CompilerType)
>
> Put x86 first, same order as the predicates.

Done.

...

>> diff --git a/configure.ac b/configure.ac
>> index c4d16e7..a01e997 100644
>> --- a/configure.ac
>> +++ b/configure.ac
>> @@ -183,6 +183,17 @@ esac
>>
>>   #-----------------------------------------------------------------------------#
>>
>> +# Work out what CPU type we need to pass to boehm_gc/NT_MAKEFILE.
>> +
>> +case "$mercury_cv_cc_type" in
>> +    msvc_64) BOEHM_WINDOWS_CPU_TYPE="x64" ;;
>
> Missing an x.

Fixed.

>> +    *) BOEHM_WINDOWS_CPU_TYPE="x86" ;;
>> +esac
>> +
>> +AC_SUBST([BOEHM_WINDOWS_CPU_TYPE])
>> +
>> +#-----------------------------------------------------------------------------#
>> +
>>   AC_CANONICAL_HOST
>>   FULLARCH="$host"
>>   AC_SUBST(FULLARCH)
>
> The rest seems fine.

Thanks for that.

Julien.


More information about the reviews mailing list