Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libc/arch/aarch64/softfloat fix multiple definition of _...



details:   https://anonhg.NetBSD.org/src/rev/036a32a15aa9
branches:  trunk
changeset: 365291:036a32a15aa9
user:      ryo <ryo%NetBSD.org@localhost>
date:      Sat Aug 11 10:06:40 2018 +0000

description:
fix multiple definition of __{ge,lt,gt,le,eq,ne,unordt}tf2 in libc and libgcc.
this fixes the ATF call_once_static, call_once2_static, cxxruntime_static, static_destructor_static.

diffstat:

 lib/libc/arch/aarch64/softfloat/qp.c |  40 ++++++++++++++++++++++-------------
 1 files changed, 25 insertions(+), 15 deletions(-)

diffs (104 lines):

diff -r a7050ae2a7e7 -r 036a32a15aa9 lib/libc/arch/aarch64/softfloat/qp.c
--- a/lib/libc/arch/aarch64/softfloat/qp.c      Sat Aug 11 04:46:17 2018 +0000
+++ b/lib/libc/arch/aarch64/softfloat/qp.c      Sat Aug 11 10:06:40 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: qp.c,v 1.1 2014/08/10 05:47:37 matt Exp $ */
+/* $NetBSD: qp.c,v 1.2 2018/08/11 10:06:40 ryo Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -47,13 +47,13 @@
 long double __negtf2(long double);
 long double __subtf3(long double, long double);
 
-int __getf2(long double, long double);
-int __lttf2(long double, long double);
-int __gttf2(long double, long double);
-int __letf2(long double, long double);
-int __eqtf2(long double, long double);
-int __netf2(long double, long double);
-int __unordtf2(long double, long double);
+int __libc_getf2(long double, long double);
+int __libc_lttf2(long double, long double);
+int __libc_gttf2(long double, long double);
+int __libc_letf2(long double, long double);
+int __libc_eqtf2(long double, long double);
+int __libc_netf2(long double, long double);
+int __libc_unordtf2(long double, long double);
 
 double __trunctfdf2(long double);
 float __trunctfsf2(long double);
@@ -182,8 +182,18 @@
 }
 #endif
 
+#ifdef __weak_alias
+__weak_alias(__eqtf2, __libc_eqtf2)
+__weak_alias(__getf2, __libc_getf2)
+__weak_alias(__gttf2, __libc_gttf2)
+__weak_alias(__letf2, __libc_letf2)
+__weak_alias(__lttf2, __libc_lttf2)
+__weak_alias(__netf2, __libc_netf2)
+__weak_alias(__unordtf2, __libc_unordtf2)
+#endif
+
 int
-__eqtf2(long double ld_a, long double ld_b)
+__libc_eqtf2(long double ld_a, long double ld_b)
 {
        const union sf_ieee_ldbl_u a = { .ldblu_ld = ld_a };
        const union sf_ieee_ldbl_u b = { .ldblu_ld = ld_b };
@@ -192,7 +202,7 @@
 }
 
 int
-__getf2(long double ld_a, long double ld_b)
+__libc_getf2(long double ld_a, long double ld_b)
 {
        const union sf_ieee_ldbl_u a = { .ldblu_ld = ld_a };
        const union sf_ieee_ldbl_u b = { .ldblu_ld = ld_b };
@@ -201,7 +211,7 @@
 }
 
 int
-__gttf2(long double ld_a, long double ld_b)
+__libc_gttf2(long double ld_a, long double ld_b)
 {
        const union sf_ieee_ldbl_u a = { .ldblu_ld = ld_a };
        const union sf_ieee_ldbl_u b = { .ldblu_ld = ld_b };
@@ -210,7 +220,7 @@
 }
 
 int
-__letf2(long double ld_a, long double ld_b)
+__libc_letf2(long double ld_a, long double ld_b)
 {
        const union sf_ieee_ldbl_u a = { .ldblu_ld = ld_a };
        const union sf_ieee_ldbl_u b = { .ldblu_ld = ld_b };
@@ -219,7 +229,7 @@
 }
 
 int
-__lttf2(long double ld_a, long double ld_b)
+__libc_lttf2(long double ld_a, long double ld_b)
 {
        const union sf_ieee_ldbl_u a = { .ldblu_ld = ld_a };
        const union sf_ieee_ldbl_u b = { .ldblu_ld = ld_b };
@@ -228,7 +238,7 @@
 }
 
 int
-__netf2(long double ld_a, long double ld_b)
+__libc_netf2(long double ld_a, long double ld_b)
 {
        const union sf_ieee_ldbl_u a = { .ldblu_ld = ld_a };
        const union sf_ieee_ldbl_u b = { .ldblu_ld = ld_b };
@@ -363,7 +373,7 @@
 }
 
 int
-__unordtf2(long double ld_a, long double ld_b)
+__libc_unordtf2(long double ld_a, long double ld_b)
 {
        const union sf_ieee_ldbl_u a = { .ldblu_ld = ld_a };
        const union sf_ieee_ldbl_u b = { .ldblu_ld = ld_b };



Home | Main Index | Thread Index | Old Index