From 44fe7bd86bf7fc305d7eca3ba778b6d7f663a6b5 Mon Sep 17 00:00:00 2001 From: Martin Storsjo Date: Fri, 3 May 2019 07:43:23 +0000 Subject: Avoid duplicate function aliases on MinGW after SVN r359835 On MinGW, the same alias mechanism as for ELF, using __attribute__((__alias__())), is used. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@359865 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/builtins/comparedf2.c | 5 +++-- lib/builtins/comparesf2.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'lib') diff --git a/lib/builtins/comparedf2.c b/lib/builtins/comparedf2.c index 9f059785a..58290d87d 100644 --- a/lib/builtins/comparedf2.c +++ b/lib/builtins/comparedf2.c @@ -141,8 +141,9 @@ COMPILER_RT_ALIAS(__unorddf2, __aeabi_dcmpun) #endif #endif -#if defined(_WIN32) -// The alias mechanism doesn't work on Windows, so emit wrapper functions. +#if defined(_WIN32) && !defined(__MINGW32__) +// The alias mechanism doesn't work on Windows except for MinGW, so emit +// wrapper functions. int __eqdf2(fp_t a, fp_t b) { return __ledf2(a, b); } int __ltdf2(fp_t a, fp_t b) { return __ledf2(a, b); } int __nedf2(fp_t a, fp_t b) { return __ledf2(a, b); } diff --git a/lib/builtins/comparesf2.c b/lib/builtins/comparesf2.c index edf40d6d1..1cb99e468 100644 --- a/lib/builtins/comparesf2.c +++ b/lib/builtins/comparesf2.c @@ -141,8 +141,9 @@ COMPILER_RT_ALIAS(__unordsf2, __aeabi_fcmpun) #endif #endif -#if defined(_WIN32) -// The alias mechanism doesn't work on Windows, so emit wrapper functions. +#if defined(_WIN32) && !defined(__MINGW32__) +// The alias mechanism doesn't work on Windows except for MinGW, so emit +// wrapper functions. int __eqsf2(fp_t a, fp_t b) { return __lesf2(a, b); } int __ltsf2(fp_t a, fp_t b) { return __lesf2(a, b); } int __nesf2(fp_t a, fp_t b) { return __lesf2(a, b); } -- cgit v1.2.1