port to PDOS (especially mainframe)
jak
nospam at please.ty
Fri Apr 16 17:51:50 EDT 2021
Il 23/03/2021 10:23, Paul Edwards ha scritto:
> Hello. I have a new operating system called PDOS
> which works on both PC and mainframe, which
> can be found here:
>
> http://pdos.sourceforge.net/
>
> I know nothing about Python, my focus is on C90,
> but I wish to run this mainframe assembler, asma,
> which was written in Python, not C:
>
> https://github.com/s390guy/SATK
>
> It needs Python 3.3 as a minimum, so I wish to port
> that version, first to the PC version of PDOS, then to
> the mainframe version.
>
> I don't wish to run configure, I want to hand-construct
> the makefile. PDOS is a very simple system, so I only
> want to produce a single executable, no DLLs etc. I
> don't need extensions to work or anything, all I need
> to be able to do is run asma.
>
> I've started constructing a makefile (see below), which
> I execute with pdmake, included in PDOS. I only have
> a C90 runtime library, no more, no less, so I don't know
> whether Python will actually build in my environment,
> but so far things have been building successfully.
>
> However I'm currently stuck on this unresolved
> external:
>
> python.a(abstract.o)(.text+0x668c):abstract.c: undefined reference to `PyExc_StopIteration'
>
> What source file is meant to define that variable
> (PyExc_StopIteration) as opposed to just declaring
> it or using it? I tried looking at the OS/2 EMX for
> hints, but wasn't able to figure it out.
>
> Note that I am building a Win32 executable to start
> with, but it is linking against my own C90 library
> which will call either Microsoft's MSVCRT.DLL on
> Windows, or my own MSVCRT.DLL when running
> on PDOS/386 (aka PD-Windows).
>
> I also don't know whether Python will survive being
> transferred to an EBCDIC environment, as that is
> where it will ultimately need to be compiled and
> linked (MVS/380), or at least assembled, before it
> can wind up on PDOS/3X0. Well, maybe it can all
> be done on Windows. I need to see what asma
> is capable of.
>
> Thanks. Paul.
>
>
>
> # Produce Windows executables
> # links with PDPCLIB created by makefile.msv
>
> CC=gccwin
> CFLAGS=-O0
> LD=ldwin
> LDFLAGS=
> AS=aswin
> AR=arwin
> STRIP=stripwin
> COPTS=-S $(CFLAGS) -fno-common -ansi -I. -I../Include -I../../pdos/pdpclib -D__WIN32__
>
> all: clean python.exe
>
> python.exe: python.o ../Python/strdup.o ../Objects/object.o ../Objects/abstract.o \
> ../Python/errors.o ../Objects/bytesobject.o
> rm -f python.a
> ar r python.a ../Python/strdup.o ../Objects/object.o ../Objects/abstract.o
> ar r python.a ../Python/errors.o ../Objects/bytesobject.o
> $(LD) $(LDFLAGS) -o python.exe ../../pdos/pdpclib/w32start.o python.o python.a ../../pdos/pdpclib/msvcrt.a ../../pdos/src/kernel32.a
> $(STRIP) python.exe
>
> .c.o:
> $(CC) $(COPTS) -o $*.s $<
> $(AS) -o $@ $*.s
> rm -f $*.s
>
> clean:
> rm -f *.o python.exe
>
Hi,
one thing is not clear to me, do you absolutely need to use "asma"?
http://www.z390.org/
More information about the Python-list
mailing list