This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
PATCH: fix build problem on spu
- From: Ben Elliston <bje at au1 dot ibm dot com>
- To: newlib at sourceware dot org
- Cc: patmans at us dot ibm dot com
- Date: Tue, 09 Oct 2007 11:29:55 +1000
- Subject: PATCH: fix build problem on spu
I'm not quite sure if this ever worked, but building newlib with
--target=spu fails because `vector' is not defined early enough.
spu_intrinsics.h must be included before simdmath.h, which is needed for
the vector -> __vector defintion.
OK for mainline? I'd commit it as obvious, but as the problem seems
equally obvious, I'm worried that I have overlooked something. :-)
Thanks, Ben
2007-10-09 Ben Elliston <bje@au.ibm.com>
* libm/machine/spu/headers/acosd2.h: Include spu_intrinsics.h
before simdmath.h to get a definition for `vector'.
* libm/machine/spu/headers/asind2.h: Likewise.
Index: libm/machine/spu/headers/acosd2.h
===================================================================
RCS file: /cvs/src/src/newlib/libm/machine/spu/headers/acosd2.h,v
retrieving revision 1.1
diff -u -p -r1.1 acosd2.h
--- libm/machine/spu/headers/acosd2.h 28 Sep 2007 18:44:24 -0000 1.1
+++ libm/machine/spu/headers/acosd2.h 9 Oct 2007 01:28:15 -0000
@@ -52,8 +52,9 @@
#ifndef _ACOSD2_H_
#define _ACOSD2_H_ 1
-#include "simdmath.h"
#include <spu_intrinsics.h>
+
+#include "simdmath.h"
#include "sqrtd2.h"
#include "divd2.h"
Index: libm/machine/spu/headers/asind2.h
===================================================================
RCS file: /cvs/src/src/newlib/libm/machine/spu/headers/asind2.h,v
retrieving revision 1.1
diff -u -p -r1.1 asind2.h
--- libm/machine/spu/headers/asind2.h 28 Sep 2007 18:44:24 -0000 1.1
+++ libm/machine/spu/headers/asind2.h 9 Oct 2007 01:28:15 -0000
@@ -53,8 +53,9 @@
#ifndef _ASIND2_H_
#define _ASIND2_H_ 1
-#include "simdmath.h"
#include <spu_intrinsics.h>
+
+#include "simdmath.h"
#include "sqrtd2.h"
#include "divd2.h"