[12/25] libcpu: Use "#define FCT_mod$64r_m FCT_mod$r_m" is enough and can be recognized by clang-cl on windows in i386_data.h

Message ID 20221020182603.815-13-luoyonggang@gmail.com
State Committed
Headers
Series Patches for building with mingw/gcc msvc/clang-cl |

Commit Message

Yonggang Luo Oct. 20, 2022, 6:25 p.m. UTC
  Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
---
 libcpu/i386_data.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Mark Wielaard Dec. 12, 2022, 12:58 p.m. UTC | #1
Hi,

On Fri, 2022-10-21 at 02:25 +0800, Yonggang Luo via Elfutils-devel
wrote:
> Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
> ---
>  libcpu/i386_data.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libcpu/i386_data.h b/libcpu/i386_data.h
> index 06356b8a..fe3c4ae1 100644
> --- a/libcpu/i386_data.h
> +++ b/libcpu/i386_data.h
> @@ -1153,7 +1153,7 @@ FCT_mod$64r_m (struct output_data *d)
>    return general_mod$r_m (d);
>  }
>  #else
> -static typeof (FCT_mod$r_m) FCT_mod$64r_m __attribute__ ((alias
> ("FCT_mod$r_m")));
> +#define FCT_mod$64r_m FCT_mod$r_m
>  #endif

Thanks, this indeed looks simpler.
Added a ChangeLog entry and pushed as:

commit dab89fba0e84c948fb270e541d1d1313afd2c2c3 (HEAD -> master)
Author: Yonggang Luo <luoyonggang@gmail.com>
Date:   Fri Oct 21 02:25:51 2022 +0800

    libcpu: Use "#define FCT_mod$64r_m FCT_mod$r_m" in i386_data.h
    
    This is enough and can be recognized by clang-cl on windows
    
    Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>

Cheers,

Mark
  

Patch

diff --git a/libcpu/i386_data.h b/libcpu/i386_data.h
index 06356b8a..fe3c4ae1 100644
--- a/libcpu/i386_data.h
+++ b/libcpu/i386_data.h
@@ -1153,7 +1153,7 @@  FCT_mod$64r_m (struct output_data *d)
   return general_mod$r_m (d);
 }
 #else
-static typeof (FCT_mod$r_m) FCT_mod$64r_m __attribute__ ((alias ("FCT_mod$r_m")));
+#define FCT_mod$64r_m FCT_mod$r_m
 #endif