diff options
author | Joseph Myers <joseph@codesourcery.com> | 2015-05-11 22:58:10 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2015-05-11 22:58:10 +0000 |
commit | 34cb304e5a6df706e186d504b69af974bfc15a2f (patch) | |
tree | f7dc110200e0c4df2808076576c3481d497ea6ac /sysdeps/mips | |
parent | b13b96ca05a132a12dc5f3712b99e626670716bf (diff) | |
download | glibc-34cb304e5a6df706e186d504b69af974bfc15a2f.tar.gz glibc-34cb304e5a6df706e186d504b69af974bfc15a2f.tar.xz glibc-34cb304e5a6df706e186d504b69af974bfc15a2f.zip |
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.
Diffstat (limited to 'sysdeps/mips')
-rw-r--r-- | sysdeps/mips/mips32/fpu/Makefile | 3 | ||||
-rw-r--r-- | sysdeps/mips/mips32/fpu/fpucw-helpers.c (renamed from sysdeps/mips/mips32/fpu/fpu_control.c) | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/sysdeps/mips/mips32/fpu/Makefile b/sysdeps/mips/mips32/fpu/Makefile new file mode 100644 index 0000000000..951c408423 --- /dev/null +++ b/sysdeps/mips/mips32/fpu/Makefile @@ -0,0 +1,3 @@ +ifeq ($(subdir),math) +aux += fpucw-helpers +endif diff --git a/sysdeps/mips/mips32/fpu/fpu_control.c b/sysdeps/mips/mips32/fpu/fpucw-helpers.c index eeb94c55c7..40391a3ec5 100644 --- a/sysdeps/mips/mips32/fpu/fpu_control.c +++ b/sysdeps/mips/mips32/fpu/fpucw-helpers.c @@ -16,7 +16,7 @@ License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ -#include <math/fpu_control.c> +#include <fpu_control.h> fpu_control_t __mips_fpu_getcw (void) |