I did some work on updating gpc to newer gcc versions. You can
find it at GitHub:
https://github.com/hebisch/gpc
This is experimental work. 4.2 and 4.3 ports (on "master" Git branch)
are basically in "works for my purpose" state: on my machine compiler
builds and passes test suite with small (but nonzero) number of
failures. On 4.5.1 there is initial port to gcc-4.[45] -- this
one is broken from user point of view and may be of some use
only for people who want to seriously work on the …
[View More]compiler.
Note that this is _not_ a release. There are relatively easy to
fix but non working things (in particular some features of Makefiles
are broken). Testing was limited to running testsute just for
one configuration. I estimate that fixing easily fixable stuff
and polishing things would take me about a week -- unfortunately
I am busy with other things. So I decided to make the code
available "as is". If there will be bug reports, I will look
at them and there is reasonable chance that I will fix them.
But otherwise I do not plan to work on gpc in near future.
If you want to try the code note that there are changes to build
process, look at toplevel README file.
--
Waldek Hebisch
hebisch(a)math.uni.wroc.pl
[View Less]
Kevan:
> I'm running GPC just fine on 10.7.4. I may have installed on an earlier
> version of 10.7 and then upgraded. I installed the Mac OS X 10.6 Intel
> version I found here:
>
> http://www.microbizz.nl/gpc.html
>
> What did you install?
I hadn't installed, but I went to that page and installed from
⢠GNU Pascal 3.4.6u4 installer for Mac OS X 10.6 Intel native and PowerPC cross-compiler15.7 MB)
It SAYS it's supposed to be ONLY for 10.6, but I went ahead anyway …
[View More]on 10.7.
In /Developer/Pascal it installed cleanly and replaced directory
gpc346u2 with gpc346u4.
I can now compile:
egg 18% cat h.p
program helloworld (output);
begin
writeln(output,'hello world');
end.
egg 19% gpc h.p
ld: warning: -macosx_version_min not specified, assuming 10.7
ld: warning: PIE disabled. Absolute addressing (perhaps -mdynamic-no-pic) not allowed in code signed PIE, but used in __start from /Developer/SDKs/MacOSX10.5.sdk//usr/lib/crt1.o. To fix this warning, don't compile with -mdynamic-no-pic or link with -Wl,-no_pie
egg 20% a.out
hello world
Thanks,
Tom
Thomas D. Schneider, Ph.D.
Senior Investigator
National Institutes of Health
National Cancer Institute
Frederick National Laboratory for Cancer Research
Gene Regulation and Chromosome Biology Laboratory
Molecular Information Theory Group
Frederick, Maryland 21702-1201
http://alum.mit.edu/www/toms
[View Less]
I think "collect2" should honor all of the "where to find compiler components" switches fed to GPC.
I think it would be helpful if GPC defaulted to acting as if it were run with "-B <directory containing gpc>" (unless the user provides a "-B" switch).
The "collect2" in the binary distribution of gpc-2007-09-04 for Windows doesn't seem to make any effort to locate the "ld" it runs -- if there is no "ld" in the PATH, it prints
ld-orig: No such file or directory
I have …
[View More]been running GPC without putting GPC\bin in my PATH. It has been working. Then I discovered that when I installed Free Pascal, it took the liberty of updating my system-wide PATH. When I removed it from my PATH, running GPC\bin\gpc resulted in
gpc: installation problem, cannot exec `as': No such file or directory
Adding "-B GPC\bin" solves that, but has no effect on "collect2" finding "ld".
[View Less]
My program was terminating with no runtime error message. When run in gdb, gdb told me it terminated with exit code 52 (I think octal).
I had a Range Check Error. In gdb, I see that _p_RangeCheckError calls _p_RuntimeError. Then, _p_RuntimeError has code that might call _p_RangeCheckError. I didn't trace further -- gdb suddenly becomes unable to single-step, says "Unable to set breakpoint number -37". (The specific number changes if I keep trying to single-step. It's always negative.…
[View More])
I don't know how much better it would have been, but shouldn't _p_RuntimeError have been compiled with range checking suppressed?
(I've found source for RangeCheckError and RuntimeError. I can't find source for CString2String -- is it an intrinsic function? It seems to have been inline coded in RuntimeError.)
[View Less]
The procedures MoveLeft and MoveRight start with a test for whether special case code will be useful/possible.
procedure MoveLeft (const Source; var Dest; Count: SizeType);
if (Count >= SizeOf (LongestCard))
and not (pDst - pSrc in [0 .. 2 * SizeOf (TWord) - 1]) then
procedure MoveRight (const Source; var Dest; Count: SizeType);
if (Count >= SizeOf (LongestCard))
and not (pSrc - pDst in [0 .. 2 * SizeOf (TWord) - 1]) then
Procedure Move calls MoveRight when the address of …
[View More]the source is less than the source of the destination, so the difference will always be negative (except when source and destination are the same address), so the difference will never be in the range [0..2*SizeOf(TWord)-1].
Shouldn't those differences be reversed?
Shouldn't the threshold be either SizeOf(LongestCard) in both clauses, or 2*SizeOf(TWord) in both clauses?
[View Less]
Trying to get the source corresponding to the 20070904 Windows distribution, I have downloaded and unpacked
gpc-20070904.tar.bz2
mingw-gcc-core-3.4.5-20060117-2-src.tar.gz
Between them, they don't seem to be the complete source of the binary distribution I have installed.
I can't find any reference to "winmain", which I'm sure is involved in a Windows GUI application.
The only version of "collect2" is in the "gcc" chain. It doesn't invoke "windres", and it certainly doesn'…
[View More]t say "ld-orig" when it can't find "ld".
What do I need to download to be in a position to build GPC under and for Windows?
[View Less]
gpc folks:
I have moved to a new Mac running OS X 10.7.4 and Gnu Pascal now
doesn't work:
% more h.p
program helloworld (output);
begin
writeln(output,'hello world');
end.
% gpc h.p
ld: library not found for -lSystemStubs
collect2: ld returned 1 exit status
Any suggestions on how to fix this?
Thanks,
Tom
Thomas D. Schneider, Ph.D.
Senior Investigator
National Institutes of Health
National Cancer Institute
Frederick National Laboratory for Cancer Research
Gene Regulation and …
[View More]Chromosome Biology Laboratory
Molecular Information Theory Group
Frederick, Maryland 21702-1201
http://alum.mit.edu/www/toms
[View Less]