[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gm2] Status Report on HP-UX 11.11
From: |
Gaius Mulley |
Subject: |
Re: [Gm2] Status Report on HP-UX 11.11 |
Date: |
25 Apr 2007 23:35:16 +0100 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 |
John O Goyo <address@hidden> writes:
> I am running HP-UX B.11.11 on PA-RISC. Since my last report, I
> upgraded bash to 3.2, binutils to 3.16, and gcc to 4.1.1 with the
> 4.1.2 source tree.
>
> As usual, dwarf-2 is not supported so I removed references to it in
> gm2/Make-lang.in.
>
> My previous shell-script problem the ulm directories has gone away
> but another has taken its place. There is no getdents() yet it was
> somehow found by configure Accordingly, I undefined HAVE_GETDENTS in
> gm2/gm2-libs/gm2-libs-host.h.
Hi John,
thanks for reporting this. I've rebuilt the gm2/gm2-libs/configure
which seems to have generated a more bourne shell compatible script and
have just checked this into cvs.
> As before, the build succeeds but linking does not. In the build
> directory, I compiled and linked a small C programme with xgcc and
> then tried one with xgm2. The former succeeds but the latter fails.
> I then tried to link an empty module with xgcc but I do not know what
> files to link in. Vide infra for my effort. ("heap" is my HP-UX box.)
>
> =====================================================================================
> heap: gcc% cat hello.c
> #include <stdio.h>
>
> main()
> {
> puts("Hello.\n");
> }
> heap: gcc%
> heap: gcc% ./xgcc -v -o hello hello.c
> Using built-in specs.
> Target: hppa2.0w-hp-hpux11.11
> Configured with: ../../src/gcc-4.1.2/configure
> --prefix=/var/build/bin/gm2 --exec-prefix=/var/build/bin/gm2
> --host=hppa2.0w-hp-hpux11.11 --with-gnu-as
> --with-as=/usr/local/bin/gas --without-gnu-ld
> --with-ld=/usr/ccs/bin/ld --without-dwarf2 --enable-languages=c,gm2
> Thread model: posix
> gcc version 4.1.2
> /var/build/bin/gm2/libexec/gcc/hppa2.0w-hp-hpux11.11/4.1.2/cc1
> -quiet -v -iprefix
> /var/build/bld/gm2-64/gcc/../lib/gcc/hppa2.0w-hp-hpux11.11/4.1.2/
> hello.c -quiet -dumpbase hello.c -auxbase hello -version -o
> /var/tmp//ccfwrGFY.s
> ignoring nonexistent directory
> "/var/build/bld/gm2-64/gcc/../lib/gcc/hppa2.0w-hp-hpux11.11/4.1.2/include"
> ignoring nonexistent directory
> "/var/build/bld/gm2-64/gcc/../lib/gcc/hppa2.0w-hp-hpux11.11/4.1.2/../../../../hppa2.0w-hp-hpux11.11/include"
> ignoring nonexistent directory
> "/var/build/bin/gm2/hppa2.0w-hp-hpux11.11/include"
> #include "..." search starts here:
> #include <...> search starts here:
> /usr/local/include
> /var/build/bin/gm2/include
> /var/build/bin/gm2/lib/gcc/hppa2.0w-hp-hpux11.11/4.1.2/include
> /usr/include
> End of search list.
> GNU C version 4.1.2 (hppa2.0w-hp-hpux11.11)
> compiled by GNU C version 4.1.1.
> GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
> Compiler executable checksum: 101793f0f2e4f0224bf16e2a7fc48174
> /usr/local/bin/gas -o /var/tmp//cc0HMEeU.o /var/tmp//ccfwrGFY.s
> /var/build/bin/gm2/libexec/gcc/hppa2.0w-hp-hpux11.11/4.1.2/collect2
> -L/lib/pa1.1 -L/usr/lib/pa1.1 -z -u main -u __gcc_plt_call -o hello
> /usr/ccs/lib/crt0.o /lib/unix98.o
> -L/var/build/bin/gm2/lib/gcc/hppa2.0w-hp-hpux11.11/4.1.2
> -L/usr/ccs/lib -L/var/build/bin/gm2/lib /var/tmp//cc0HMEeU.o -lgcc
> -lgcc_eh -lc -lgcc -lgcc_eh
> =====================================================================================
> heap: gcc% cat Hello.mod
> MODULE Hello;
>
> FROM StrIO IMPORT WriteString, WriteLn;
>
> BEGIN
> WriteString( "GM2 on HP-UX -- wot the ..." );
> WriteLn
> END Hello.
> heap: gcc%
> heap: gcc% ./xgm2 -v -B./stage1/gm2/ -c Hello.mod
> Using built-in specs.
> Target: hppa2.0w-hp-hpux11.11
> s=c,gm2
> Thread model: posix
> gcc version 4.1.2
> build/bin/gm2/lib/gcc/hppa2.0w-hp-hpux11.11/4.1.2/gm2/logitech
> Hello.mod -o /var/tmp//ccKZ3Crd.s
> GNU Modula-2 version 4.1.2 (hppa2.0w-hp-hpux11.11)
> compiled by GNU C version 4.1.1.
> GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
> gm2 [0.53a (address@hidden)] [Sat Mar 24 21:35:33 2007]
> /usr/local/bin/gas -o Hello.o /var/tmp//ccKZ3Crd.s
> heap: gcc%
> heap: gcc% ./xgm2 -v -o Hello -I. Hello.mod
> GNU C version 4.1.2 (hppa2.0w-hp-hpux11.11)
> compiled by GNU C version 4.1.1.
> GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
> Compiler executable checksum: 101793f0f2e4f0224bf16e2a7fc48174
> /usr/local/bin/gas -o /var/tmp//ccesWPVI.o /var/tmp//ccmJIAU8.s
> rm -f /var/tmp//cc41nXfQ.a
> /var/build/bin/gm2/libexec/gcc/hppa2.0w-hp-hpux11.11/4.1.2/gm2lcc
> -Wtarget-ar=/usr/local/bin/ar -Wtarget-ranlib=/usr/local/bin/ranlib
> -I.:/var/build/bin/gm2/lib/gcc/hppa2.0w-hp-hpux11.11/4.1.2/gm2/pim:/var/build/bin/gm2/lib/gcc/hppa2.0w-hp-hpux11.11/4.1.2/gm2/logitech
> -v -exec -ar -startup /var/tmp//ccesWPVI.o -o /var/tmp//cc41nXfQ.a
> /var/tmp//ccMrQpR5.lst
> /usr/local/bin/ar rc /var/tmp//cc41nXfQ.a /var/tmp//ccesWPVI.o
> /var/build/bin/gm2/lib/gcc/hppa2.0w-hp-hpux11.11/4.1.2/gm2/pim/M2RTS.o
> /var/build/bin/gm2/lib/gcc/hppa2.0w-hp-hpux11.11/4.1.2/gm2/pim/ASCII.o
> /var/build/bin/gm2/lib/gcc/hppa2.0w-hp-hpux11.11/4.1.2/gm2/pim/SYSTEM.o
> /var/build/bin/gm2/lib/gcc/hppa2.0w-hp-hpux11.11/4.1.2/gm2/pim/Debug.o
> /var/build/bin/gm2/lib/gcc/hppa2.0w-hp-hpux11.11/4.1.2/gm2/pim/SysStorage.o
> /var/build/bin/gm2/lib/gcc/hppa2.0w-hp-hpux11.11/4.1.2/gm2/pim/StrLib.o
> /var/build/bin/gm2/lib/gcc/hppa2.0w-hp-hpux11.11/4.1.2/gm2/pim/Assertion.o
> /var/build/bin/gm2/lib/gcc/hppa2.0w-hp-hpux11.11/4.1.2/gm2/pim/Storage.o
> /var/build/bin/gm2/lib/gcc/hppa2.0w-hp-hpux11.11/4.1.2/gm2/pim/DynamicStrings.o
> /var/build/bin/gm2/lib/gcc/hppa2.0w-hp-hpux11.11/4.1.2/gm2/pim/FIO.o
> /var/build/bin/gm2/lib/gcc/hppa2.0w-hp-hpux11.11/4.1.2/gm2/pim/IO.o
> /var/build/bin/gm2/lib/gcc/hppa2.0w-hp-hpux11.11/4.1.2/gm2/pim/StdIO.o
> /var/build/bin/gm2/lib/gcc/hppa2.0w-hp-hpux11.11/4.1.2/gm2/pim/StrIO.o
> /var/build/bin/gm2/lib/gcc/hppa2.0w-hp-hpux11.11/4.1.2/gm2/pim/NumberIO.o
> Hello.o
> /usr/local/bin/ranlib /var/tmp//cc41nXfQ.a
> /var/build/bin/gm2/libexec/gcc/hppa2.0w-hp-hpux11.11/4.1.2/collect2
> -L/lib/pa1.1 -L/usr/lib/pa1.1 -z -u main -u __gcc_plt_call -o Hello
> /usr/ccs/lib/crt0.o /lib/unix98.o
> -L/var/build/bin/gm2/lib/gcc/hppa2.0w-hp-hpux11.11/4.1.2
> -L/usr/ccs/lib -L/var/build/bin/gm2/lib /var/tmp//cc41nXfQ.a -lgcc
> -lgcc_eh -lc -lgcc -lgcc_eh
> /usr/ccs/bin/ld: Unsatisfied symbols:
> Assertion_Assert (first referenced in
> /var/tmp//cc41nXfQ.a(DynamicStrings.o)) (data)
> FIO_GetUnixFileDescriptor (first referenced in
> /var/tmp//cc41nXfQ.a(IO.o)) (data)
> abort (first referenced in /var/tmp//cc41nXfQ.a(M2RTS.o)) (data)
> close (first referenced in /var/tmp//cc41nXfQ.a(FIO.o)) (data)
> free (first referenced in /var/tmp//cc41nXfQ.a(SysStorage.o)) (data)
> Storage_ALLOCATE (first referenced in
> /var/tmp//cc41nXfQ.a(DynamicStrings.o)) (data)
> StrLib_StrLen (first referenced in /var/tmp//cc41nXfQ.a(M2RTS.o)) (data)
> M2RTS_FunctionReturnError (first referenced in
> /var/tmp//cc41nXfQ.a(StdIO.o)) (data)
> isatty (first referenced in /var/tmp//cc41nXfQ.a(IO.o)) (data)
> StrLib_StrCopy (first referenced in /var/tmp//cc41nXfQ.a(M2RTS.o))
> (data)
> strlen (first referenced in
> /var/tmp//cc41nXfQ.a(DynamicStrings.o)) (data)
> FIO_ReadChar (first referenced in /var/tmp//cc41nXfQ.a(IO.o)) (data)
> Debug_Halt (first referenced in
> /var/tmp//cc41nXfQ.a(SysStorage.o)) (data)
> StdIO_Write (first referenced in /var/tmp//cc41nXfQ.a(Debug.o)) (data)
> StrLib_StrEqual (first referenced in
> /var/tmp//cc41nXfQ.a(M2RTS.o)) (data)
> IO_Read (first referenced in /var/tmp//cc41nXfQ.a(StdIO.o)) (data)
> M2RTS_HALT (first referenced in /var/tmp//cc41nXfQ.a(Debug.o)) (data)
> creat (first referenced in /var/tmp//cc41nXfQ.a(FIO.o)) (data)
> M2RTS_NilPointerError (first referenced in
> /var/tmp//cc41nXfQ.a(DynamicStrings.o)) (data)
> system (first referenced in /var/tmp//cc41nXfQ.a(IO.o)) (data)
> strncpy (first referenced in /var/tmp//cc41nXfQ.a(FIO.o)) (data)
> StrIO_WriteString (first referenced in
> /var/tmp//cc41nXfQ.a(Assertion.o)) (data)
> SysStorage_DEALLOCATE (first referenced in
> /var/tmp//cc41nXfQ.a(Storage.o)) (data)
> StrLib_StrConCat (first referenced in /var/tmp//cc41nXfQ.a(FIO.o))
> (data)
> realloc (first referenced in /var/tmp//cc41nXfQ.a(SysStorage.o)) (data)
> StrLib_StrConCat (first referenced in /var/tmp//cc41nXfQ.a(FIO.o))
> (data)
> realloc (first referenced in /var/tmp//cc41nXfQ.a(SysStorage.o)) (data)
> open (first referenced in /var/tmp//cc41nXfQ.a(FIO.o)) (data)
> exit (first referenced in /var/tmp//cc41nXfQ.a(M2RTS.o)) (data)
> M2RTS_ArraySubscriptError (first referenced in
> /var/tmp//cc41nXfQ.a(Debug.o)) (data)
> SysStorage_REALLOCATE (first referenced in
> /var/tmp//cc41nXfQ.a(Storage.o)) (data)
> StrIO_WriteLn (first referenced in
> /var/tmp//cc41nXfQ.a(Assertion.o)) (data)
> read (first referenced in /var/tmp//cc41nXfQ.a(FIO.o)) (data)
> lseek (first referenced in /var/tmp//cc41nXfQ.a(FIO.o)) (data)
> SysStorage_ALLOCATE (first referenced in
> /var/tmp//cc41nXfQ.a(Storage.o)) (data)
> NumberIO_CardToStr (first referenced in
> /var/tmp//cc41nXfQ.a(M2RTS.o)) (data)
> StrLib_StrRemoveWhitePrefix (first referenced in
> /var/tmp//cc41nXfQ.a(NumberIO.o)) (data)
> Storage_DEALLOCATE (first referenced in
> /var/tmp//cc41nXfQ.a(DynamicStrings.o)) (data)
> SysStorage_Available (first referenced in
> /var/tmp//cc41nXfQ.a(Storage.o)) (data)
> write (first referenced in /var/tmp//cc41nXfQ.a(M2RTS.o)) (data)
> malloc (first referenced in /var/tmp//cc41nXfQ.a(SysStorage.o)) (data)
> FIO_WriteChar (first referenced in /var/tmp//cc41nXfQ.a(IO.o)) (data)
> M2RTS_InstallTerminationProcedure (first referenced in
> /var/tmp//cc41nXfQ.a(FIO.o)) (data)
> StdIO_Read (first referenced in /var/tmp//cc41nXfQ.a(StrIO.o)) (data)
> StrIO_ReadString (first referenced in
> /var/tmp//cc41nXfQ.a(NumberIO.o)) (data)
> /usr/ccs/bin/ld: (Warning) Linker features were used that may not be
> supported in future releases. The +vallcompatwarnings option can be
> used to display more details, and the ld(1) man page contains
> additional information. This warning can be suppressed with the
> +vnocompatwarnings option.
> collect2: ld returned 1 exit status
> =====================================================================================
> heap: gcc% cat null.mod
> MODULE null;
> BEGIN
> END null.
> heap: gcc% ./xgm2 -B./stage1/gm2/ -c null.mod
> heap: gcc% ll null.o
> -rw-r--r-- 1 build users 628 Apr 8 01:39 null.o
> heap: gcc% ./xgm2 -O2 -S null.mod
ok, probably better to omit the -O2 option at present.
> heap: gcc% cat null.s
> .LEVEL 1.1
> .SPACE $PRIVATE$
> .SUBSPA $DATA$,QUAD=1,ALIGN=8,ACCESS=31
> .SUBSPA $BSS$,QUAD=1,ALIGN=8,ACCESS=31,ZERO,SORT=82
> .SPACE $TEXT$
> .SUBSPA $LIT$,QUAD=0,ALIGN=8,ACCESS=44
> .SUBSPA $CODE$,QUAD=0,ALIGN=8,ACCESS=44,CODE_ONLY
> .IMPORT $global$,DATA
> .IMPORT $$dyncall,MILLICODE
> .SPACE $TEXT$
> .NSUBSPA $CODE$
> .align 4
> .EXPORT _M2_null_init,ENTRY,PRIV_LEV=3,RTNVAL=GR
> _M2_null_init:
> .PROC
> .CALLINFO FRAME=0,NO_CALLS
> .ENTRY
> bv,n %r0(%r2)
> .EXIT
> .PROCEND
> heap: gcc% ./xgcc -B./stage1/gm2/ -o null -L./gm2/gm2-libs null.o -lgm2
> /usr/ccs/bin/ld: Unsatisfied symbols:
> main (Not referenced yet! Probably due to -u option)
> collect2: ld returned 1 exit status
> =====================================================================================
> Where are the startup files for gm2? I shall try linking them in
> directly.
gm2 creates a temporary C program which contains main() and makes
calls to all the imported modules - with the final call to the top
level modula-2 program module.
For example on my GNU/Linux Debian box it looks like this:
(*** indicates annotation)
gm2 -v hello.mod
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-4.1.0/configure --disable-multilib
--enable-languages=c,gm2 --enable-checking --prefix=/home/gaius/opt
Thread model: posix
gcc version 4.1.0
/home/gaius/opt/libexec/gcc/x86_64-unknown-linux-gnu/4.1.0/gm2l
-I/home/gaius/opt/lib/gcc/x86_64-unknown-linux-gnu/4.1.0/gm2/pim:/home/gaius/opt/lib/gcc/x86_64-unknown-linux-gnu/4.1.0/gm2/logitech
-o /tmp/ccU7Sjpe.l hello.mod
*** /tmp/ccU7Sjpe.l contains a plain text file which indicates the
*** imported modules and their initialization order
/home/gaius/opt/libexec/gcc/x86_64-unknown-linux-gnu/4.1.0/gm2lsub
/tmp/ccU7Sjpe.l -o /tmp/ccsF3wQg.lst
*** /tmp/ccsF3wQg.lst contains a list of all runtime modules together
*** with those requested directly or indirectly by the user.
/home/gaius/opt/libexec/gcc/x86_64-unknown-linux-gnu/4.1.0/gm2lgen
/tmp/ccsF3wQg.lst -o /tmp/cciuKIBj.c
*** /tmp/cciuKIBj.c contains the main() and all the calls to
*** _M2_M2RTS_init(), _M2_foo_init() etc
/home/gaius/opt/libexec/gcc/x86_64-unknown-linux-gnu/4.1.0/gm2cc -v
-c -o /tmp/ccQvaAfm.o /tmp/cciuKIBj.c
*** /tmp/ccQvaAfm.o contains the compiled version of the previous .c
*** file.
/home/gaius/opt/libexec/gcc/x86_64-unknown-linux-gnu/4.1.0/gm2lcc
-Wtarget-ar=/usr/bin/ar -Wtarget-ranlib=/usr/bin/ranlib
-I/home/gaius/opt/lib/gcc/x86_64-unknown-linux-gnu/4.1.0/gm2/pim:/home/gaius/opt/lib/gcc/x86_64-unknown-linux-gnu/4.1.0/gm2/logitech
-v -exec -ar -startup /tmp/ccQvaAfm.o -o /tmp/ccQpn8pu.a
/tmp/ccsF3wQg.lst
*** generates /tmp/ccQpn8pu.a which contains an archive of all
*** modules including m2 runtime modules, user imported
*** implementation modules and the top level program module.
/usr/bin/ar rc /tmp/ccQpn8pu.a /tmp/ccQvaAfm.o
/home/gaius/opt/lib/gcc/x86_64-unknown-linux-gnu/4.1.0/gm2/pim/M2RTS.o
/home/gaius/opt/lib/gcc/x86_64-unknown-linux-gnu/4.1.0/gm2/pim/ASCII.o
/home/gaius/opt/lib/gcc/x86_64-unknown-linux-gnu/4.1.0/gm2/pim/SYSTEM.o
/home/gaius/opt/lib/gcc/x86_64-unknown-linux-gnu/4.1.0/gm2/pim/Debug.o
/home/gaius/opt/lib/gcc/x86_64-unknown-linux-gnu/4.1.0/gm2/pim/SysStorage.o
/home/gaius/opt/lib/gcc/x86_64-unknown-linux-gnu/4.1.0/gm2/pim/StrLib.o
/home/gaius/opt/lib/gcc/x86_64-unknown-linux-gnu/4.1.0/gm2/pim/Assertion.o
/home/gaius/opt/lib/gcc/x86_64-unknown-linux-gnu/4.1.0/gm2/pim/Storage.o
/home/gaius/opt/lib/gcc/x86_64-unknown-linux-gnu/4.1.0/gm2/pim/DynamicStrings.o
/home/gaius/opt/lib/gcc/x86_64-unknown-linux-gnu/4.1.0/gm2/pim/FIO.o
/home/gaius/opt/lib/gcc/x86_64-unknown-linux-gnu/4.1.0/gm2/pim/IO.o
/home/gaius/opt/lib/gcc/x86_64-unknown-linux-gnu/4.1.0/gm2/pim/StdIO.o
/home/gaius/opt/lib/gcc/x86_64-unknown-linux-gnu/4.1.0/gm2/pim/StrIO.o
/home/gaius/opt/lib/gcc/x86_64-unknown-linux-gnu/4.1.0/gm2/pim/NumberIO.o
hello.o
*** the /usr/bin/ar is exec'ed by the gm2lcc to generate the archive.
/usr/bin/ranlib /tmp/ccQpn8pu.a
/home/gaius/opt/libexec/gcc/x86_64-unknown-linux-gnu/4.1.0/collect2
--eh-frame-hdr -m elf_x86_64 -dynamic-linker
/lib64/ld-linux-x86-64.so.2 /usr/lib/../lib64/crt1.o
/usr/lib/../lib64/crti.o
/home/gaius/opt/lib/gcc/x86_64-unknown-linux-gnu/4.1.0/crtbegin.o
-L/home/gaius/opt/lib
[snip]
I think I'd capture your equivalent commands issued by gm2, copy them
to a shell script and change the temporary files to easier to read
names. Then I'd check in turn to see these intermediate files
contain sensible info
hope this helps,
Gaius
> john
>
> Postscript: House renovation put my boxes out of reach for a few
> months, hence my long absence.
:-) sounds satisfying!