On Mon, Aug 30, 2010 at 9:38 PM, Jakub Jelinek <ja...@redhat.com> wrote:

>> >>> I'm not familiar in versioning stuff, but since soft-fp symbols are
>> >>> part of generic libgcc-std.ver for a long time (before 4.5.0), I
>> >>> believe, it is enough to patch only configure files (see i.e. commits
>> >>> that enabled soft-fp on mingw/cygwin/-gnu*).
>> >>
>> >> It will "work", but not properly.  One should never have symbols
>> >> magically appear in old versions.  If you add the symbols to the
>> >> proper current version number in a config/gcc/i386/libgcc-bsd.ver,
>> >> they'll appear at the right place.
>> >
>> > Can someone please help here?
>>
>> Attached is my best (untested) shot at libgcc-bsd.ver. Someone has to
>> write i386/t-freebsd (similar to i386/t-linux) and connect it to the
>> build system. The versioning assumes that this will be committed to
>> 4.5.x first.
>
> It is wrong, GCC 4.5.0 has been released already, so no new symbols should
> be added to GCC_4.5.0 symver.
> IMNSHO this isn't a regression fix, so you should just apply it to the
> trunk, and introduce them as GCC_4.6.0 version.  Also, there is no need
> to have two chunks for the same symver in the *.ver file, just put the
> 3 resp. 2 symbols before the preceeding closing brace, together with the
> %ifdef/%else/%endif.

So, attached and untested.

Uros.
Index: libgcc/config.host
===================================================================
--- libgcc/config.host  (revision 163647)
+++ libgcc/config.host  (working copy)
@@ -608,7 +608,8 @@
   i[34567]86-*-linux* | x86_64-*-linux* | \
   i[34567]86-*-gnu* | \
   i[34567]86-*-solaris2* | \
-  i[34567]86-*-cygwin* | i[34567]86-*-mingw* | x86_64-*-mingw*)
+  i[34567]86-*-cygwin* | i[34567]86-*-mingw* | x86_64-*-mingw* | \
+  i[34567]86-*-freebsd* | x86_64-*-freebsd*)
        if test "${host_address}" = 32; then
                tmake_file="${tmake_file} t-softfp 
i386/${host_address}/t-fprules-softfp"
        fi
Index: gcc/config.gcc
===================================================================
--- gcc/config.gcc      (revision 163647)
+++ gcc/config.gcc      (working copy)
@@ -1153,10 +1153,11 @@
        ;;
 i[34567]86-*-freebsd*)
        tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h 
${fbsd_tm_file} i386/freebsd.h"
+       tmake_file="${tmake_file} i386/t-freebsd"
        ;;
 x86_64-*-freebsd*)
        tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h 
${fbsd_tm_file} i386/x86-64.h i386/freebsd.h i386/freebsd64.h"
-       tmake_file="${tmake_file} i386/t-crtstuff"
+       tmake_file="${tmake_file} i386/t-crtstuff i386/t-freebsd"
        ;;
 i[34567]86-*-netbsdelf*)
        tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h netbsd.h 
netbsd-elf.h i386/netbsd-elf.h"
@@ -3485,6 +3486,9 @@
        i[34567]86-*-cygwin* | i[34567]86-*-mingw* | x86_64-*-mingw*)
                tmake_file="${tmake_file} i386/t-fprules-softfp 
soft-fp/t-softfp"
                ;;
+       i[34567]86-*-freebsd* | x86_64-*-freebsd*)
+               tmake_file="${tmake_file} i386/t-fprules-softfp 
soft-fp/t-softfp"
+               ;;
        ia64*-*-linux*)
                tmake_file="${tmake_file} ia64/t-fprules-softfp 
soft-fp/t-softfp"
                ;;
Index: gcc/config/i386/t-freebsd
===================================================================
--- gcc/config/i386/t-freebsd   (revision 0)
+++ gcc/config/i386/t-freebsd   (revision 0)
@@ -0,0 +1 @@
+SHLIB_MAPFILES = $(srcdir)/config/i386/libgcc-bsd.ver
Index: gcc/config/i386/libgcc-bsd.ver
===================================================================
--- gcc/config/i386/libgcc-bsd.ver      (revision 0)
+++ gcc/config/i386/libgcc-bsd.ver      (revision 0)
@@ -0,0 +1,98 @@
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This file is part of GCC.
+#
+# GCC is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GCC is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3.  If not see
+# <http://www.gnu.org/licenses/>.
+
+# 128 bit long double support was introduced with GCC 4.6.0.
+# These lines make the symbols to get a @@GCC_4.6.0 attached.
+
+%exclude {
+  __addtf3
+  __divtc3
+  __divtf3
+  __eqtf2
+  __extenddftf2
+  __extendsftf2
+  __extendxftf2
+  __fixtfdi
+  __fixtfsi
+  __fixtfti
+  __fixunstfdi
+  __fixunstfsi
+  __fixunstfti
+  __floatditf
+  __floatsitf
+  __floattitf
+  __floatunditf
+  __floatunsitf
+  __floatuntitf
+  __getf2
+  __gttf2
+  __letf2
+  __lttf2
+  __multc3
+  __multf3
+  __negtf2
+  __netf2
+  __powitf2
+  __subtf3
+  __trunctfdf2
+  __trunctfsf2
+  __trunctfxf2
+  __unordtf2
+}
+
+GCC_4.6.0 {
+  __addtf3
+  __divtc3
+  __divtf3
+  __eqtf2
+  __extenddftf2
+  __extendsftf2
+  __extendxftf2
+  __fixtfdi
+  __fixtfsi
+  __fixunstfdi
+  __fixunstfsi
+  __floatditf
+  __floatsitf
+  __floattitf
+  __floatunditf
+  __floatunsitf
+  __getf2
+  __gttf2
+  __letf2
+  __lttf2
+  __multc3
+  __multf3
+  __negtf2
+  __netf2
+  __powitf2
+  __subtf3
+  __trunctfdf2
+  __trunctfsf2
+  __trunctfxf2
+  __unordtf2
+
+%ifdef __x86_64__
+  __fixtfti
+  __fixunstfti
+  __floatuntitf
+%else
+  __copysigntf3
+  __fabstf2
+%endif
+}
\ No newline at end of file

Reply via email to