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

Re: [LTP] comileing error on PowerPC




I don't have specific knowledge of what that test is testing (the header
gives some information), but it is apparently ix86 specific.  It should
probably be wrapped in ifdefs.  This is an approach we've taken in the
past for architecture specific codes.  Here is a diff that might do it
for you:

--- fork05.c.orig	2000/09/08 16:26:52	1.2
+++ fork05.c	2001/02/07 04:28:31
@@ -88,6 +88,8 @@
  *
  *********************************************************/
 #include <stdio.h>
+
+#if defined(linux) && defined(__i386__)
 #include <fcntl.h>
 #include <unistd.h>
 #include <sys/wait.h>
@@ -166,3 +168,13 @@
 
   return WIFSIGNALED(res);
 }
+
+#else /* if defined(linux) && defined(__i386__) */
+
+int
+main()
+{
+  printf("%%gs test only for ix86\n");
+}
+
+#endif /* if defined(linux) && defined(__i386__) */

kerler wrote:
> 
> Hi,
> I build ltp on Linux for PowerPC. The following is the info. of compiling
> error.
> The tests/fork05.c should be port to PowerPC.
> 
> [kerler@csdc-091 ltp-20010122]$ make
> make[1]: Entering directory `/opt/kerler/PROJECTs/ltp/ltp-20010122/lib'
> make[1]: `libltp.a' is up to date.
> make[1]: Leaving directory `/opt/kerler/PROJECTs/ltp/ltp-20010122/lib'
> make[1]: Entering directory `/opt/kerler/PROJECTs/ltp/ltp-20010122/doio'
> make[1]: Nothing to be done for `all'.
> make[1]: Leaving directory `/opt/kerler/PROJECTs/ltp/ltp-20010122/doio'
> make[1]: Entering directory `/opt/kerler/PROJECTs/ltp/ltp-20010122/tests'
> cc -I../include    fork05.c -L../lib -lltp  -o fork05
> fork05.c: In function `main':
> fork05.c:143: Invalid `asm' statement:
> fork05.c:143: fixed or forbidden register 64 (mq) was spilled for class
> MQ_REGS.
> fork05.c:148: Invalid `asm' statement:
> fork05.c:148: fixed or forbidden register 64 (mq) was spilled for class
> MQ_REGS.
> fork05.c:156: Invalid `asm' statement:
> fork05.c:156: fixed or forbidden register 64 (mq) was spilled for class
> MQ_REGS.
> make[1]: *** [fork05] Error 1
> make[1]: Leaving directory `/opt/kerler/PROJECTs/ltp/ltp-20010122/tests'
> make: *** [all] Error 2
> 
> thanks,
> kerler

-- 
Aaron Laffin
laffinaw@acm.org