[M3devel] PPC_LINUX breaks

Jay jayk123 at hotmail.com
Thu Jan 3 23:51:46 CET 2008


I'll try upgrade.sh instead of my make-dist.py.
I got the same gcc error on PPC_DRAWIN too, but that was definitely without building m3cc.
Also from an older build.

 - Jay

----------------------------------------
> From: jayk123 at hotmail.com
> To: m3devel at elegosoft.com
> Subject: PPC_LINUX breaks
> Date: Thu, 3 Jan 2008 22:09:22 +0000
> 
> 
> I can't build PPC_LINUX.
> 
> 
> I can build the compiler with 5.2.6 but then stuck at building m3core with current compiler.
> There are several problems.
> Some I can fix, some stump me.
> This platform still uses non-PTHREADs.
> I figure that is worth fixing, but maybe afterward?
> 
> 
> [jay at localhost m3core]$ /tmp/make-dist/compiler_with_self/bin/cm3 -override -DROOT='/dev2/cm3'
> 
> 
> new source -> compiling Uucontext.i3
> "../src/unix/linux-ppc/Uucontext.i3", line 102: syntax error: missing ']'
> 1 error encountered
> 
> 
> [jay at localhost m3core]$ cvs diff src/unix/linux-ppc/Uucontext.i3
> Index: src/unix/linux-ppc/Uucontext.i3
> ===================================================================
> RCS file: /usr/cvs/cm3/m3-libs/m3core/src/unix/linux-ppc/Uucontext.i3,v
> retrieving revision 1.1
> diff -r1.1 Uucontext.i3
> 102c102
> <     vrregs: ARRAY[0..32,0..4] OF unsigned_int;
> ---
>>     vrregs: ARRAY[0..32 * 4] OF unsigned_int;
> 
> 
> new source -> compiling Uucontext.i3
> "../src/unix/linux-ppc/Uucontext.i3", line 92: undefined (double)
> "../src/unix/linux-ppc/Uucontext.i3", line 93: undefined (double)
> "../src/unix/linux-ppc/Uucontext.i3", line 94: undefined (unsigned_int)
> "../src/unix/linux-ppc/Uucontext.i3", line 102: undefined (unsigned_int)
> "../src/unix/linux-ppc/Uucontext.i3", line 103: undefined (unsigned_int)
> "../src/unix/linux-ppc/Uucontext.i3", line 104: undefined (unsigned_int)
> "../src/unix/linux-ppc/Uucontext.i3", line 105: undefined (unsigned_int)
> "../src/unix/linux-ppc/Uucontext.i3", line 149: undefined (char)
> "../src/unix/linux-ppc/Uucontext.i3", line 10: warning: not used (unsigned_short)
> "../src/unix/linux-ppc/Uucontext.i3", line 11: warning: not used (unsigned_short_int)
> 8 errors and 2 warnings encountered
> 
> 
> [jay at localhost m3core]$ cvs diff src/unix/linux-ppc/Uucontext.i3
> Index: src/unix/linux-ppc/Uucontext.i3
> ===================================================================
> RCS file: /usr/cvs/cm3/m3-libs/m3core/src/unix/linux-ppc/Uucontext.i3,v
> retrieving revision 1.1
> diff -r1.1 Uucontext.i3
> 10,11c10,11
> < IMPORT int, unsigned_long, unsigned_long_int, unsigned_short, void_star,
> <        unsigned_short_int;
> ---
>> IMPORT int, unsigned_long, unsigned_long_int, void_star,
>>        double, unsigned_int, char;
> 
> 
> 
> new source -> compiling RTSignal.m3
> "../src/runtime/PPC_LINUX/RTSignal.m3", line 82: undefined (Usignal.struct_sigcontext)
> 1 error encountered
> 
> [jay at localhost m3core]$ cvs diff src/runtime/PPC_LINUX/RTSignal.m3
> Index: src/runtime/PPC_LINUX/RTSignal.m3
> ===================================================================
> RCS file: /usr/cvs/cm3/m3-libs/m3core/src/runtime/PPC_LINUX/RTSignal.m3,v
> retrieving revision 1.1
> diff -r1.1 RTSignal.m3
> 10c10
> < IMPORT RTError, RTProcess, Csignal, Usignal, Uprocess;
> ---
>> IMPORT RTError, RTProcess, Csignal, Usignal, Uprocess, Uucontext;
> 82c82
> <                  scp  : Usignal.struct_sigcontext;
> ---
>>                  scp  : Uucontext.struct_sigcontext;
> 
> 
> new source -> compiling RTSignal.m3
> "../src/runtime/PPC_LINUX/RTSignal.m3", line 85: unknown qualification '.' (eip)
> 1 error encountered
> 
> This I looked into a while. The problem is obvious, the fix is not.
> For now I replaced whatever.eip with 0.
> Sometimes PowerPC calls eip srr0, but sometimes not.
> The first thing I found reading about PowerPC is that there's no instruction
> counter register, because it is rarely needed directly in code.
> But anyway, it's still need for traps/exceptions.
> I'll look at an old winnt.h.
> 
> 
> And then I am stuck on:
> 
> 
> new source -> compiling RTThread.m3
> "../src/runtime/PPC_LINUX/RTThread.m3", line 88: unknown qualification '.' (sa_handler)
> "../src/runtime/PPC_LINUX/RTThread.m3", line 89: unknown qualification '.' (empty_sigset_t)
> "../src/runtime/PPC_LINUX/RTThread.m3", line 91: incompatible types (act)
> "../src/runtime/PPC_LINUX/RTThread.m3", line 91: VAR actual must be a designator (oact)
> "../src/runtime/PPC_LINUX/RTThread.m3", line 96: incompatible types (set)
> "../src/runtime/PPC_LINUX/RTThread.m3", line 96: VAR actual must be a designator (oset)
> "../src/runtime/PPC_LINUX/RTThread.m3", line 101: incompatible types (set)
> "../src/runtime/PPC_LINUX/RTThread.m3", line 101: VAR actual must be a designator (oset)
> "../src/runtime/PPC_LINUX/RTThread.m3", line 108: unknown qualification '.' (sigmask)
> 9 errors encountered
> 
> 
> The code:
> 
> 
> PROCEDURE setup_sigvtalrm (handler: Usignal.SignalHandler) =
>   VAR x: Usignal.struct_sigaction;
>   BEGIN
>     x.sa_handler :=  LOOPHOLE (handler, Usignal.SignalActionHandler); (* line 88*)
>     x.sa_mask := Usignal.empty_sigset_t; (*89*)
>     x.sa_flags := Usignal.SA_RESTART;  (*90*)
>     EVAL Usignal.sigaction (Usignal.SIGVTALRM, ADR (x), NIL); (*91*)
>   END setup_sigvtalrm;
> 
> 
> Other platforms get away without this stuff by using just "signal" which
> takes fewer parameters. I ASSUME PPC_LINUX as some interest in more parameters
> in order to implement vtalarm based threads, instead of pthreads.
> 
> 
> Usignal does define these types..unless I am looking at the wrong one.
> Or heck, even the obvious wrong one.
> 
> 
> Except..overrides..the local package..stuff doesn't need an override to refer to itself, right?
> 
> 
> Non-standalone binaries also don't work. I think I reported that two weeks ago.
> I figured that'd come afterward..
> 
> 
> There is also:
> new source -> compiling Long.m3
> GenWord.mg: In function `Long__Divide':
> GenWord.mg:13: Internal compiler error in emit_library_call_value_1, at calls.c:3684
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See  for instructions.
> 
> 
> though I thought I had gotten past that by building m3cc.
> Not likely a Modula-3 problem and I could always get around it
> by making LONGINT only 32 bits (I think "long" is dumb in a name...).
> 
> 
> [jay at localhost m3core]$ uname -a
> Linux localhost.localdomain 2.6.15-rc5.ydl.1 #1 Wed Jan 4 16:25:38 EST 2006 ppc ppc ppc GNU/Linux
> 
> 
> [jay at localhost m3core]$ gcc -v
> Reading specs from /usr/lib/gcc/ppc64-yellowdog-linux/3.4.4/specs
> Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-java-awt=gtk --host=ppc64-yellowdog-linux --build=ppc64-yellowdog-linux --target=ppc64-yellowdog-linux --with-cpu=default32
> Thread model: posix
> gcc version 3.4.4 20050721 (Yellow Dog 3.4.4-2.ydl.2)
> 
> 
> This is like Yellow Dog 4.x or so.
> I don't know why all the ppc64 references. This is an iBook G3 -- 32bit.
> I guess maybe it can build both -- oh, not that this gcc is in use.
> Nor do I expect it matters.
> 
> 
>  - Jay
> _________________________________________________________________
> The best games are on Xbox 360.  Click here for a special offer on an Xbox 360 Console.
> http://www.xbox.com/en-US/hardware/wheretobuy/

_________________________________________________________________
The best games are on Xbox 360.  Click here for a special offer on an Xbox 360 Console.
http://www.xbox.com/en-US/hardware/wheretobuy/


More information about the M3devel mailing list