[fpc-pascal] Compiling for SPARC
Mark Morgan Lloyd
markMLl.fpc-pascal at telemetry.co.uk
Fri Aug 11 18:55:07 CEST 2006
Jonas Maebe wrote:
> Internally, the compiler uses a shortstring (max 255) characters to
> build the "ar" command line. It currently passes three file names at
> a time to "ar", so the currently max is about 80 characters per dir
> +filename.
Executive summary: This fails when the longest filename is around 119
characters, but is OK when it is a couple of characters shorter.
Detail follows.
Working from a starting position of the source directory being /fpcsrc (i.e. 7
chars), I can confirm that this can be "stretched" to 51 chars but not to 53
which is the same length as the original path I was using. Once it gets to 53
chars it fails in the same place as before.
The shell running the make command displays:
/usr/bin/ar: creating units/sparc-linux/libpgdkpixbuf.a
make -C gtkgl all
make[6]: Entering directory
`/fpcsrcABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890123456789/packages/extra/gtk/gtkgl'
/fpcsrcABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890123456789/compiler/ppcsparc -XX -CX
-Ur -Xs -n
-Fu/fpcsrcABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890123456789/rtl/units/sparc-linux
-Fu/fpcsrcABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890123456789/packages/extra/x11/units/sparc-linux
-Fu/fpcsrcABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890123456789/packages/extra/opengl/units/sparc-linux
-FE.
-FU/fpcsrcABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890123456789/packages/extra/gtk/units/sparc-linux
-Fl/usr/lib/gcc-lib/sparc-linux/3.3.5 -Fl/usr/X11R6/lib -dsparc -dRELEASE
gtkglarea.pp
/usr/bin/ar: creating
/fpcsrcABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890123456789/packages/extra/gtk/units/sparc-linux/libpgtkglarea.a
ps faux displays:
\_ make -C gtkgl all
\_ /fpcsrcABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890123456789/compiler/ppcsparc
-XX -CX -Ur -Xs -n
-Fu/fpcsrcABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890123456789/rtl/units/sparc-linux
-Fu/fpcsrcABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890123456789/packages/extra/x11/units/sparc-linux
-Fu/fpcsrcABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890123456789/packages/extra/opengl/units/sparc-linux
-FE.
-FU/fpcsrcABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890123456789/packages/extra/gtk/units/sparc-linux
-Fl/usr/lib/gcc-lib/sparc-linux/3.3.5 -Fl/usr/X11R6/lib -dsparc -dRELEASE
gtkglarea.pp
\_ /bin/sh -c /usr/bin/ar qS
/fpcsrcABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890123456789/packages/extra/gtk/units/sparc-linux/libpgtkglarea.a
and then:
\_ make -C gtkgl all
\_ /fpcsrcABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890123456789/compiler/ppcsparc
-XX -CX -Ur -Xs -n
-Fu/fpcsrcABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890123456789/rtl/units/sparc-linux
-Fu/fpcsrcABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890123456789/packages/extra/x11/units/sparc-linux
-Fu/fpcsrcABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890123456789/packages/extra/opengl/units/sparc-linux
-FE.
-FU/fpcsrcABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890123456789/packages/extra/gtk/units/sparc-linux
-Fl/usr/lib/gcc-lib/sparc-linux/3.3.5 -Fl/usr/X11R6/lib -dsparc -dRELEASE
gtkglarea.pp
\_ /usr/bin/ar qS
/fpcsrcABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890123456789/packages/extra/gtk/units/sparc-linux/libpgtkglarea.a
Sorry about the wrap on that.
Looking in ....gtkglarea.sl:
-rw-r--r-- 1 markMLl markMLl 441 2006-08-11 13:06 gtkglarea0s17.o
-rw-r--r-- 1 markMLl markMLl 441 2006-08-11 13:06 gtkglarea0s18.o
-rw-r--r-- 1 markMLl markMLl 510 2006-08-11 13:06 gtkglarea0s10.o
-rw-r--r-- 1 markMLl markMLl 502 2006-08-11 13:06 gtkglarea0s11.o
-rw-r--r-- 1 markMLl markMLl 496 2006-08-11 13:06 gtkglarea0s12.o
-rw-r--r-- 1 markMLl markMLl 680 2006-08-11 13:06 gtkglarea0s13.o
-rw-r--r-- 1 markMLl markMLl 509 2006-08-11 13:06 gtkglarea0s14.o
-rw-r--r-- 1 markMLl markMLl 632 2006-08-11 13:06 gtkglarea0s15.o
-rw-r--r-- 1 markMLl markMLl 441 2006-08-11 13:06 gtkglarea0s16.o
-rw-r--r-- 1 markMLl markMLl 493 2006-08-11 13:06 gtkglarea0s5.o
-rw-r--r-- 1 markMLl markMLl 441 2006-08-11 13:06 gtkglarea0s6.o
-rw-r--r-- 1 markMLl markMLl 441 2006-08-11 13:06 gtkglarea0s7.o
-rw-r--r-- 1 markMLl markMLl 511 2006-08-11 13:06 gtkglarea0s8.o
-rw-r--r-- 1 markMLl markMLl 503 2006-08-11 13:06 gtkglarea0s9.o
-rw-r--r-- 1 markMLl markMLl 470 2006-08-11 13:06 gtkglarea0s1.o
-rw-r--r-- 1 markMLl markMLl 724 2006-08-11 13:06 gtkglarea0s2.o
-rw-r--r-- 1 markMLl markMLl 704 2006-08-11 13:06 gtkglarea0s3.o
-rw-r--r-- 1 markMLl markMLl 441 2006-08-11 13:06 gtkglarea0s4.o
Current time is now 14:43 so these haven't been touched for some hours despite
the fact that the make is still trying to run.
Slecting the file here with the longest name, the entire path would be something
like
/fpcsrcABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890123456789/packages/extra/gtk/units/sparc-linux/gtkglarea.sl/gtkglarea0s18.o
which is 119 characters. Going by your earlier comment 3 x 119 is 357 which is
obviously longer than 255.
What I don't see is how this worked when the path was only a couple of
characters shorter.
As an experiment, I'm going to leave the actual directory the same length but
see if setting up a short symlink to it works.
--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk
[Opinions above are the author's, not those of his employers or colleagues]
More information about the fpc-pascal
mailing list