Fix mips16 __fpu_control static linking (bug 18397).
commit34cb304e5a6df706e186d504b69af974bfc15a2f
authorJoseph Myers <joseph@codesourcery.com>
Mon, 11 May 2015 22:58:10 +0000 (11 22:58 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Mon, 11 May 2015 22:58:10 +0000 (11 22:58 +0000)
treef7dc110200e0c4df2808076576c3481d497ea6ac
parentb13b96ca05a132a12dc5f3712b99e626670716bf
Fix mips16 __fpu_control static linking (bug 18397).

Programs are supposed to be able to define the __fpu_control variable,
overriding the library's version to cause the floating-point control
word to be set to the chosen value at startup.

This is broken for mips16 for static linking because the library's
__fpu_control variable is in the same object file as the helper
functions used by fpu_control.h for mips16, so test-fpucw-ieee-static
fails to link with multiple definitions of __fpu_control.

This patch fixes this by putting the helpers in a separate file rather
than overriding fpu_control.c.  Tested for mips16 that this fixes the
link failure and the ABI tests still pass.

[BZ #18397]
* sysdeps/mips/mips32/fpu/fpu_control.c: Move to ....
* sysdeps/mips/mips32/fpu/fpucw-helpers.c: ... here.  Include
<fpu_control.h> instead of <math/fpu_control.c>.
* sysdeps/mips/mips32/fpu/Makefile: New file.
ChangeLog
NEWS
sysdeps/mips/mips32/fpu/Makefile [new file with mode: 0644]
sysdeps/mips/mips32/fpu/fpucw-helpers.c [moved from sysdeps/mips/mips32/fpu/fpu_control.c with 97% similarity]