Kavitha Manjunath | 6 Mar 22:20 2014
Picon

Provide custom warnings for some directives

Hi,

I would like to provide custom warnings for few directives in gnu pascal. Can you please help me how to achieve it?


Thanks and Regards
Kavitha
_______________________________________________
Gpc mailing list
Gpc <at> gnu.de
https://www.g-n-u.de/mailman/listinfo/gpc
Jay Michael | 25 Feb 06:50 2014
Picon

change SETGPC.BAT

     SETGPC.BAT does not allow me to compile C using gpc:
           gpc tc.c -o tc

     As installed by dev_gnu_pascal-1.9.4.13.exe, SETGPC.BAT:

          set PATH=C:\prg\GPC\bin;%PATH%
          set C_INCLUDE_PATH=C:\prg\GPC\include
          set GCC_BASE=3.4.5
          set GPC_EXEC_PREFIX=C:\prg\GPC\libexec\gcc\mingw32
          set LIBRARY_PATH=C:\prg\GPC\lib;C:\prg\GPC\lib\gcc\mingw32\%GCC_BASE%
          set GPC_UNIT_PATH=C:\prg\GPC\lib\gcc\mingw32\%GCC_BASE%\units;C:\prg\GPC\units;C:\prg\GPC\units\winapi;C:\prg\GPC\units\objects;C:\prg\GPC\units\sysutils;C:\prg\GPC\units\objmingw

     I have been able to compile and link Pascal and C (one each) by
only changing PATH.

     Separately, I succeeded by appending 
c:\prg\gpc\lib\gcc\mingw32\3.4.5\include to C_INCLUDE_PATH.
(After running SETGPC.BAT)

     I don't know what to say is wrong.  The lack of a trailing slash on
GPC_EXEC_PREFIX results in a horrible mess in one of the attempted
directories
(C:/prg/GPC/libexec/gcc/mingw32mingw32/3.4.5/../../../../include/stddef.h)
but appending a slash doesn't solve the real problem, because "libexec"
is the wrong path to get to an include directory.
     Does GPC have different rules for the EXEC_PREFIX than GCC, so the
lack of a trailing slash is not a mistake for GPC_EXEC_PREFIX?

     Does the setting of all of the variables other than PATH date back
to a time before GPC did such an elaborate job of fabricating
directory names?  Or before GPC had the target and version wired in?

     Is it likely that all I need is to prepend GPC/bin to PATH?
Or do you think I will need some of the other environment variables
when I get around to trying to compile more substantial programs?

program TPAS( INPUT, OUTPUT ) ;
begin
WRITELN( 'end TPAS' ) ;
end.
#include "stdio.h"

int main( int argc, char * argv[], char * envp[] )
{
  int i ;

  for ( i = 0 ; i < argc ; i++ )
    printf( "argv[%d] = \"%s\"\n", i, argv[i] ) ;
}
_______________________________________________
Gpc mailing list
Gpc <at> gnu.de
https://www.g-n-u.de/mailman/listinfo/gpc
Kevan Hashemi | 21 Feb 00:30 2014
Picon

Compiling GPC on Msys

Greetings,

I'm trying to compile GPC from sources on Msys, within mingw on 32-bit 
Windows 7. Is this possible? The gcc-3.4.6/configure appears to work. It 
patches the GCC 3.4.6 for Pascal. I run the makefile, which proceeds for 
a while, with warnings like this:

warning: structure 'reg_info_def' used but not defined

Then the compile then fails with:

cc1.exe: error: min-insn-modes.c: Invalid argument

If any of this is familiar, or if I'm missing something obvious, please 
let me know. Ultimately, I'd like to be in a position to fix the 
GetMicroSecondTime routine, which does not work in Windows, and has not 
done so for years.

Yours, Kevan

--

-- 
Kevan Hashemi, Electrical Engineer
Physics Department, Brandeis University
http://alignment.hep.brandeis.edu/

_______________________________________________
Gpc mailing list
Gpc <at> gnu.de
https://www.g-n-u.de/mailman/listinfo/gpc

Rajat Singh | 15 Feb 03:26 2014
Picon

Change Include in frontend

Hi,

I want to include the files using #include <filename> in GNU PASCAL instead of {$INCLUDE}. I am unable to trace where the changes has to happen.


Thanks for help in advance.

Regards,
Rajat Singh
_______________________________________________
Gpc mailing list
Gpc <at> gnu.de
https://www.g-n-u.de/mailman/listinfo/gpc
Kavitha Manjunath | 15 Feb 02:29 2014
Picon

GNU PASCAL FRONT END Changes to mimic HP PASCAL m68k


Dear Team,

Greeting for the day.

I am a student working on GNU PASCAL Porting to adapt a version of HP PASCAL m68k for school purposes. I was trying to do the following on which I am stuck. Can you please provide me some insight and lead a path to achieve the same. Thanks a million in advance

1. I want to include the files using #include <filename> instead of {$INCLUDE}. I am unable to trace where the changes has to happen. Also all the directives in the similar way without the use of "{}".

Request your help. Thanks once again.

Regards
Kavitha 
_______________________________________________
Gpc mailing list
Gpc <at> gnu.de
https://www.g-n-u.de/mailman/listinfo/gpc
Kevan Hashemi | 14 Feb 03:33 2014
Picon

Integer Size on 64-Bit

Greetings,

On Red Hat Linux 6.5 running on a 32-bit machine, I compile GPC to 
obtain a 32-bit Pascal compiler in which the integer type is 4 bytes 
long. I compile TclTk from sources and obtain an executable in which the 
C "int" type is 32 bits long. They work well together.

On Red Hat Linux 6.5 running on a 64-bit machine, I compile GPC to 
obtain a 64-bit Pascal compiler in which the integer type is 8 bytes 
long. I compile TclTk from sources and obtain an executable in which the 
C "int" type is still 32 bits long. They do not work well together.

I can edit my Pascal code to make all integer types a fixed length 
regardless of architecture. But I was wondering if there is a Pascal 
compiler directive that I can use to force the integer size to 32 bits 
on all platforms.

Or perhaps there is a configure option when I compile GPC from its 
sources that will tell the compiler to make the integer type 32 bits.

Yours, Kevan

--

-- 
Kevan Hashemi, Electrical Engineer
Physics Department, Brandeis University
http://alignment.hep.brandeis.edu/

_______________________________________________
Gpc mailing list
Gpc <at> gnu.de
https://www.g-n-u.de/mailman/listinfo/gpc

Kevan Hashemi | 5 Feb 21:11 2014
Picon

Compiling for Shared Libraries

Dear GPC Users,

I just compiled GPC from sources on both 32-bit and 64-bit Linux 
machines. On both machines, I'm running Scientific Linux 6.4, a 
derivative of Red Had Linux 6.4. The local C compiler is 4.4.7 in both 
cases.

On the 32-bit machine, I can compile from Pascal to make objects, and 
link them with libgpc.a to make a shared library. But on the 64-bit 
machine I find that I must pass -fPIC to GPC to force it to compile 
position-independent code for the subsequent link. Even then, libgpc.a 
is position-dependent, so I can't link it into a shared library. So I 
edit the GPC build's Makefile:

CFLAGS = -g -O2 -fPIC

Now I build GPC again and re-install. The new libgpc.a is 
position-independent, and I can make my shared library.

Does anyone know why the default on 64-bit is position-dependent, while 
on 32-bit it is position-independent?

Is there an easier way to add a compiler option to the build process, 
other than editing the Makefile produced by the GCC_3.4.6 configure 
script? (For example, can I pass a compiler option into the configure 
script or into the makefile.)

Anyway: I have adapted my compiler GPC instructions below, and I'll be 
adding more Linux binary install files in the coming weeks.

http://alignment.hep.brandeis.edu/Software/Pascal/Index.html

Yours, Kevan

--

-- 
Kevan Hashemi, Electrical Engineer
Physics Department, Brandeis University
http://alignment.hep.brandeis.edu/

_______________________________________________
Gpc mailing list
Gpc <at> gnu.de
https://www.g-n-u.de/mailman/listinfo/gpc

Rajat Singh | 3 Feb 20:47 2014
Picon

GNU frontend modification

Hi All,

Greetings for the day !!

I am trying to modify the  GNU Pascal fronted. I have gone through GNU Pascal manual and  GNU Pascal internals site and this is what I have understood.

1.Lexer -  I need to modify pascal-lex.l file and using flex compile it to lex.yy.c file.Rename this file to pascal-lex.c
2. Parser - I need to modify parse.y file and using bison compile it to parse.c file.

Now what I am supposed to do next, to make these changes reflect when I compile a pascal file ?


Thanks a lot in advance.

Thanks and regards,
Rajat

_______________________________________________
Gpc mailing list
Gpc <at> gnu.de
https://www.g-n-u.de/mailman/listinfo/gpc
Thomas Schneider | 29 Jan 08:47 2014
Picon

gpc compiler failed on Mac OS X 10.9.1

I have Mac OS X 10.9.1 Maveric.  Pacal programs compile but fail to run:

% cat tst.p
program h(output);
begin
writeln(output,'did');
end.

% tst
dyld: no valid entry point
Trace/BPT trap

but a previously compiles version does run:

% tst2009
did

http://www.microbizz.nl/gpc.html

There I find:

   GNU Pascal 3.4.6u4 installer for Mac OS X 10.6 Intel native and PowerPC cross-compiler15.7 MB)

The file gpc346u4-10.6-Intel.dmg is identical (by diff) with the one I
already have installed.

So what's wrong?  How do I get it to compile correctly?

Tom

  Thomas D. Schneider, Ph.D.
  Senior Investigator
  National Institutes of Health
  National Cancer Institute
  Center for Cancer Research
  Gene Regulation and Chromosome Biology Laboratory
  Molecular Information Theory Group
  Frederick, Maryland  21702-1201
  schneidt <at> mail.nih.gov
  http://schneider.ncifcrf.gov/ (current link)
  http://alum.mit.edu/www/toms  (permanent link)

_______________________________________________
Gpc mailing list
Gpc <at> gnu.de
https://www.g-n-u.de/mailman/listinfo/gpc

Kevan Hashemi | 28 Oct 19:10 2013
Picon

Re-Install on OSX10.7

Dear GPC,

I am updating my installation instructions for GPC on all platforms. I 
just uninstalled all XCode files from my MacOS 10.7.5 system with:

sudo /Developer/Library/uninstall-devtools -mode=all

I re-started the OS. I have an installation of gpc, but I could not find 
an uninstall script for the files in /usr/bin, so I just downloaded 
Adriaan's "GNU Pascal 3.4.6u4 installer for Mac OS X 10.6 Intel native 
and PowerPC cross-compiler" and installed again. That package says "for 
MacOS 10.6 only" but I went ahead anyway.

I have the following program:

program p; begin writeln('Hello World'); end.

And I try to compile with 'gpc', but I get this error:

Kevan-Laptop:Build kevan$ gpc p.pas
as: assembler (/usr/bin/../libexec/gcc/darwin/i386/as or 
/usr/bin/../local/libexec/gcc/darwin/i386/as)
   for architecture i386 not installed
Installed assemblers are:
/usr/bin/../libexec/gcc/darwin/ppc64/as for architecture ppc64
/usr/bin/../libexec/gcc/darwin/x86_64/as for architecture x86_64
/usr/bin/../local/libexec/gcc/darwin/m68k/as for architecture m68k
/usr/bin/../local/libexec/gcc/darwin/hppa/as for architecture hppa
/usr/bin/../local/libexec/gcc/darwin/sparc/as for architecture sparc
/usr/bin/../local/libexec/gcc/darwin/m88k/as for architecture m88k
/usr/bin/../local/libexec/gcc/darwin/i860/as for architecture i860

I always imagined that the assemblers were installed with the GCC that 
comes included with GPC, but I appear to be mistaken, because

Kevan-Laptop:Pascal kevan$ find /Developer/Pascal/ -name as

comes up with nothing. Meanwhile I do have:

Kevan-Laptop:Pascal kevan$ find /usr -name as
/usr/bin/as
/usr/libexec/as
/usr/libexec/gcc/darwin/ppc64/as
/usr/libexec/gcc/darwin/x86_64/as
/usr/local/libexec/gcc/darwin/hppa/as
/usr/local/libexec/gcc/darwin/i860/as
/usr/local/libexec/gcc/darwin/m68k/as
/usr/local/libexec/gcc/darwin/m88k/as
/usr/local/libexec/gcc/darwin/sparc/as

In Adriaan's Readme.rtf file, it says, "The following utilities are 
installed with Xcode... as Apple/gnu assembler."

I conclude that I must install XCode in order to compile with GPC. Which 
version of XCode should I install? Starting with XCode 4.0, PPC 
processors and OS 10.4 SDKs are not provided, although it will do 32-bit 
i386. I tried XCode 3.2 but it crashes on OS 10.7. The one that works 
for me is XCode 2.5, just using the command-line tools and SDKs.

Is anyone else using GPC on MacOS 10.7 or later, and if so, are you able 
to use the PPC cross-compiler?

Yours, Kevan

--

-- 
Kevan Hashemi, Electrical Engineer
Physics Department, Brandeis University
http://alignment.hep.brandeis.edu/

_______________________________________________
Gpc mailing list
Gpc <at> gnu.de
https://www.g-n-u.de/mailman/listinfo/gpc

Stadelmann Josef | 11 Sep 19:06 2013
Picon

--amtmpfile not given

what can I do in this case?

it was compiling so nicely,

and it was so fast,

and then from one moment to the other, I don’t know why, I get only one error.

gpc: Internal GPC problem: internal option `--amtmpfile' not given

gpc1.exe: C:\dev_gpc\bin\gpc exited with status 1

gpc1.exe: C:\dev_gpc\bin\gpc exited with status 1

exiting from Dev+GPC and ree-ntering the project is a no go either.

the button: Build all AND the button: make project

both buttons deliver the same error message.

what can I do.

Josef

_______________________________________________
Gpc mailing list
Gpc <at> gnu.de
https://www.g-n-u.de/mailman/listinfo/gpc

Gmane