ar script and bison errors

Theo Markettos atm26 at cam.ac.uk
Sat Feb 23 10:39:40 PST 2002


Lots of packages out there seem to call ar directly.  While libfile will
do the job, it's not a direct alias as the options are different.  Has
anyone written a script to convert ar to libfile options?  I've written
the attached Basic program, which will do the job using Brandy, but
something more portable (in shell or perl) is probably better -
unfortunately I don't know enough of either of those to do it properly.
I've attached the above in case it's of use to anyone, or someone has
something better.

Also, building release_2_95 (as of 18:15 today), I get:

make -C objc
make[3]: Entering directory `/home/atm26/extra/gccsdk/gcc/gcc/objc'
bison objc-parse.y -o objc-parse.c
objc-parse.y contains 72 shift/reduce conflicts.
expected 66 shift/reduce conflicts
make[3]: *** [objc-parse.c] Error 1

Now I know no yacc at all, so wouldn't know whether this is spurious or
not.  I don't actually care about building the objective C compiler anyway
- is there an easy way to exclude it?

Cheers,
Theo
-------------- next part --------------
#!/home/atm26/bin/brandy -quit

PRINT "argc=";ARGC
libfilearg$=""
FOR i%=1 TO LEN(ARGV$ 1)
CASE MID$(ARGV$ 1,i%,1) OF
WHEN "d":libfileargs$+="-d ":REM delete
WHEN "m":PRINT "Move members unsupported by libfile"
WHEN "p":libfileargs$+="-l ":REM print
WHEN "q","r":libfileargs$+="-i ":REM insert
WHEN "t":libfileargs$+="-L ":REM display table
WHEN "e":libfileargs$+="-e ":REM extract
WHEN "c":libfileargs$+="-c ":REM create
ENDCASE
NEXT i%

libfiletail$=""
IF ARGC>2 THEN
FOR i%=3 TO ARGC
libfiletail$+=ARGV$ i%+" "
NEXT i%
ENDIF
cmd$="arm-riscos-aof-libfile "+libfileargs$+" "+ARGV$ 2+" "+libfiletail$
PRINT cmd$
OSCLI cmd$
END


More information about the gcc mailing list