Gert Doering | 8 Dec 2009 17:00
Picon
Favicon

GPC 20060325 + GCC 3.4.6 on AIX 6.1 (was: Re: GPC support for AIX 6?)

Hi,

just to follow up on something from last year...  fully quoted to make
clear what I'm talking about - and for the sake of the archives.

On Wed, Oct 15, 2008 at 11:41:13PM +0200, Waldek Hebisch wrote:
> Gert Doering wrote:
> > Hi,
> > Well, if my understanding is correct, the GCC backend (code generation
> > and such) needs to support the platform in question.  Otherwise you can't
> > build GPC either.
> > 
> > Based on that understanding, I did not try to build a 3.4.x-based gpc on
> > APX 6 yet - as gcc-3.4.x itself isn't going to work.
> 
> AFAICS the "AIX 6 support" is the following patch:
> 
> http://gcc.gnu.org/ml/gcc-patches/2008-01/msg01114.html
> 
> This patch fixes a bug in gcc build scripts: before patch build
> script would treat AIX 6 like some ancient AIX version which
> may have very bad results.  The patch effectively means that
> AXI 6 will be treated the same as AIX 5.  Given that, it is
> likely that building compiler on AIX 5 and transferring binary
> to AIX 6 will give you perfectly running compiler.  If you
> want to build on AIX 6 backporting the patch should be relatively
> easy.
> 
> Bottom line: trying to build unpatched earlier versions of gcc
> is likely to fail.  However, changes to gcc needed to work on AIX 6
(Continue reading)

John Gordon Ollason | 8 Dec 2009 17:22
Picon

Compiling and linking Gnu-Pascal under Fedora 11 on x86_64 hardware.

Greetings,

I had to upgrade my hardware from i686 to x86_64 and my operating system  
 from Fedora Core 4 to Fedora Core 11. I have tried to install Gnu-Pascal  
by downloading several versions from the Gnu-Pascal homepage and all  
attempts fail Every attempt to use make terminated in errors as follows:
--
. . .
make[2]: *** [32/libgcc_s_32.so] Error 1
make[2]: Leaving directory `/usr/local/src/gpcbuild/gcc'
make[1]: *** [libgcc.a] Error 2
make[1]: Leaving directory `/usr/local/src/gpcbuild/gcc'
make: *** [all-gcc] Error 2
fail.
--
I downloaded the install.gpc script and that didn't work either. The  
closest I have got to a working system is illustrated by the listing below.
--
$ gpc -v hello.p
Using built-in specs.
Configured with: ../gcc-3.4.4/configure --enable-languages=pascal :  
(reconfigured) ../gcc-3.4.4/configure --enable-languages=pascal :  
(reconfigured) ../gcc-3.4.4/configure --enable-languages=pascal :  
(reconfigured) ../gcc-3.4.4/configure --enable-languages=pascal
Thread model: posix
gpc version 20070904, based on gcc-3.4.4
  gpc1 -quiet -v hello.p -quiet -dumpbase hello.p -mtune=k8  
-famtmpfile=/tmp/cceErexo.gpa -version -o /tmp/ccsxBXZC.s
GNU Pascal version 20070904, based on gcc-3.4.3 (x86_64-unknown-linux-gnu)
	compiled by GNU C version 4.4.1 20090725 (Red Hat 4.4.1-2).
(Continue reading)

Gert Doering | 8 Dec 2009 18:11
Picon
Favicon

AIX / collect2 / "is valid for Pascal but not for C" warnings (was: Re: New (gpc-20060325))

Hi, 

another very old thread that I can now revive a bit...  also full quoted
to spur your memory :-)

On Thu, Jul 06, 2006 at 07:32:31PM +0200, Frank Heckenbach wrote:
> Waldek Hebisch wrote:
> 
> > Frank Heckenbach wrote:
> > > Waldek Hebisch wrote:
> > > 
> > > > The driver passes options to collect2 via environment (see
> > > > `set_collect_gcc_options' in `gpc.c'). The problem is that the driver
> > > > does not remove options which are invalid for C compiler. In principle
> > > > other languages should have the same problem, I wonder how (if???) they
> > > > handle it.
> > >
> > > Do you know what collect2 has to compile here at all? Perhaps other
> > > languages don't need to, and perhaps we can avoid it as well ...
> > > 
> > 
> > I do not know more details, all I know is just from quick scan trough
> > collect2 sources. Perhaps we should ask on gcc list?
> 
> Can you (Gert) check what it does? Perhaps catch the input file to
> collect2 and send it to us?
> 
> Frank

Actually the input file is not overly helpful, as it really only is the
(Continue reading)

Maurice Lombardi | 9 Dec 2009 09:57
Picon
Picon
Favicon

Re: GPC 20060325 + GCC 3.4.6 on AIX 6.1

Gert Doering a écrit :
> Waldek, in last year's "GPC on AIX 6" thread you mentioned a new GPC
> version, gpc-20070904.  I think it might be worthwile to start hacking
> on this (to get the option passing to collect2 fixed) before I work on
> the older version.  Is gpc-20070904 the latest version?  If yes, where
> can I find it?  http://www.gnu-pascal.de only lists the 20060325
> version.

on his personal home page:

http://www.math.uni.wroc.pl/~hebisch/gpc/

Maurice

--

-- 
        Maurice Lombardi
Laboratoire de  Spectrometrie Physique,
Universite Joseph Fourier de Grenoble, BP87
38402 Saint Martin d'Heres Cedex     FRANCE
Tel: 33 (0)4 76 51 47 51
Fax: 33 (0)4 76 63 54 95
mailto:Maurice.Lombardi <at> ujf-grenoble.fr

Maurice Lombardi | 9 Dec 2009 10:38
Picon
Picon
Favicon

Re: Compiling and linking Gnu-Pascal under Fedora 11 on x86_64 hardware.

John Gordon Ollason a écrit :
>  ld --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 /usr/lib/../lib64/crtbegin.o 
> -L/usr/local/lib/gcc/x86_64-unknown-linux-gnu/3.4.4 
      ^
libgpc.a should be there: is it ?

> -L/usr/local/lib/gcc/x86_64-unknown-linux-gnu/3.4.4/../../../../lib64 
> -L/usr/local/lib/gcc/x86_64-unknown-linux-gnu/3.4.4/../../.. 
> -L/lib/../lib64 -L/usr/lib/../lib64 /tmp/ccUtT5MU.o -lgpc -lm -lgcc -lc 
> -lgcc crtend.o /usr/lib/../lib64/crtn.o
> ld: cannot find -lgpc

Maurice

--

-- 
        Maurice Lombardi
Laboratoire de  Spectrometrie Physique,
Universite Joseph Fourier de Grenoble, BP87
38402 Saint Martin d'Heres Cedex     FRANCE
Tel: 33 (0)4 76 51 47 51
Fax: 33 (0)4 76 63 54 95
mailto:Maurice.Lombardi <at> ujf-grenoble.fr

Waldek Hebisch | 9 Dec 2009 14:03
Picon

Re: Compiling and linking Gnu-Pascal under Fedora 11 on x86_64 hardware.

John Gordon Ollason wrote:
> Greetings,
> 
> I had to upgrade my hardware from i686 to x86_64 and my operating system  
>  from Fedora Core 4 to Fedora Core 11. I have tried to install Gnu-Pascal  
> by downloading several versions from the Gnu-Pascal homepage and all  
> attempts fail Every attempt to use make terminated in errors as follows:
> --
> . . .
> make[2]: *** [32/libgcc_s_32.so] Error 1
> make[2]: Leaving directory `/usr/local/src/gpcbuild/gcc'
> make[1]: *** [libgcc.a] Error 2
> make[1]: Leaving directory `/usr/local/src/gpcbuild/gcc'
> make: *** [all-gcc] Error 2
> fail.
> --
> I downloaded the install.gpc script and that didn't work either. The  
> closest I have got to a working system is illustrated by the listing below.
> --
> $ gpc -v hello.p
> Using built-in specs.
> Configured with: ../gcc-3.4.4/configure --enable-languages=pascal :  
> (reconfigured) ../gcc-3.4.4/configure --enable-languages=pascal :  
> (reconfigured) ../gcc-3.4.4/configure --enable-languages=pascal :  
> (reconfigured) ../gcc-3.4.4/configure --enable-languages=pascal
> Thread model: posix
> gpc version 20070904, based on gcc-3.4.4
>   gpc1 -quiet -v hello.p -quiet -dumpbase hello.p -mtune=k8  
> -famtmpfile=/tmp/cceErexo.gpa -version -o /tmp/ccsxBXZC.s
> GNU Pascal version 20070904, based on gcc-3.4.3 (x86_64-unknown-linux-gnu)
(Continue reading)

John Gordon Ollason | 11 Dec 2009 15:06
Picon

Compiler differences

Greetings,
Having installed gpc 20060325, based on gcc-3.4.4 in replacement of gpc  
20041218, based on gcc-3.3.3 I discovered that some programs which worked  
on the earlier version don't work on the later one. I narrowed the problem  
down to changes in the behaviour of goto.

program gototest;
label 9999;
procedure try;
begin
    goto 9999;
end; { try }
begin
      try;
      9999:
end.

The program gototest.p is compiled by both compilers. The following

program gototest1;
label 9999;
procedure try;
begin
    goto 9999;
end; { try }
begin
    repeat
      try;
      9999:
    until 0=0;
(Continue reading)

Frank Heckenbach | 11 Dec 2009 15:24
Picon

Re: Compiler differences

John Gordon Ollason wrote:

> Greetings,
> Having installed gpc 20060325, based on gcc-3.4.4 in replacement of gpc  
> 20041218, based on gcc-3.3.3 I discovered that some programs which worked  
> on the earlier version don't work on the later one. I narrowed the problem  
> down to changes in the behaviour of goto.
> 
> program gototest;
> label 9999;
> procedure try;
> begin
>     goto 9999;
> end; { try }
> begin
>       try;
>       9999:
> end.
> 
> The program gototest.p is compiled by both compilers. The following
> 
> program gototest1;
> label 9999;
> procedure try;
> begin
>     goto 9999;
> end; { try }
> begin
>     repeat
>       try;
(Continue reading)

John Gordon Ollason | 11 Dec 2009 18:45
Picon

Re: Compiler differences

Frank,

My mistake was misunderstanding the defintion of a statement-sequence.

Thanks.

John O.
>
> ISO7185 says:
>
> : The label shall be permitted to occur in a goto-statement G (see
> : 6.8.2.4) if and only if any of the following three conditions is
> : satisfied.
> :
> : a) S contains G.
> :
> : b) S is a statement of a statement-sequence containing G.
> :
> : c) S is a statement of the statement-sequence of the  
> compound-statement of the
> : statementpart of a block containing G.
>
> Though this is hardly readable, the "statementpart of a block" means
> that the target of a non-local goto must be in the outermost scope
> of the procedure. (To understand that, you have to follow the
> grammar rules.)
>
> So, the old gpc was too permissive, the new one behaves acoording to
> ISO.
>
(Continue reading)

Waldek Hebisch | 12 Dec 2009 01:08
Picon

Re: GPC 20060325 + GCC 3.4.6 on AIX 6.1

Gert Doering wrote:
> 
> $Management has now decided to have me working on "GPC on AIX 6" again,
> and I did some work with gcc-3.4.6 and gpc-20060325 today.
> 
> gcc-3.4.6 contains most of the patches contained in the mailing list
> posting quited above already, so the patch does not apply.  It is not
> needed, though - all that remains is one small bit in config.gcc:
> 
> 
> ------------------- snip --------------------
> diff -wur gcc-3.4.6.orig/gcc/config.gcc gcc-3.4.6/gcc/config.gcc
> --- gcc-3.4.6.orig/gcc/config.gcc	2005-07-19 23:08:48.000000000 +0200
> +++ gcc-3.4.6/gcc/config.gcc	2009-12-08 14:51:51.000000000 +0100
>  <at>  <at>  -1867,7 +1867,7  <at>  <at> 
>  	thread_file='aix'
>  	extra_headers=
>  	;;
> -rs6000-ibm-aix[56789].* | powerpc-ibm-aix[56789].*)
> +rs6000-ibm-aix[56789].* | powerpc-ibm-aix[56789].* | rs6000-ibm-aix )
>  	tm_file="${tm_file} rs6000/aix.h rs6000/aix52.h rs6000/xcoff.h"
>  	tmake_file=rs6000/t-aix52
>  	use_collect2=yes
> ------------------- snip --------------------
> 
> 
> (for some weird reason, AIX 6 is detected by configure as "rs6000-ibm-aix",
> without any version number.  But hey, the resulting pascal and C compiler 
> work, so who am I to complain...)
>
(Continue reading)


Gmane