Tuesday, 8 September 2015

[gccsdk] GCC 4.7.4 difficulties

I am trying to compile Lua 5.31 with GCC 4.7.4. In the help
docs of GCC it says that both Unix and RISC OS filenaming can be
used. I rejoiced at this, as the shuffling about with
extenders is a bore. I added
MYCFLAGS= -mfpu=vfp
MYLDFLAGS= -mfpu=vfp
to the Makefile provided, set the current directory and
gave the command "make" at the *-prompt in a taskwindow.
The reply was
> gcc -std=gnu99 -O2 -Wall -Wextra -DLUA_COMPAT_5_2 -mfpu=vfp -c -o lapi.o lapi.c
> cc1: fatal error: lapi.c: No such file or directory
> compilation terminated.
> make: *** [lapi.o] Error 1

Not so out of the box, then? So I did the old rigmarole of creating directories
c, o and a and renamed files appropriately. I made tools for this job years
ago. Now, giving the make command got considerably further. The o directory
filled up with object files nicely. But things started to fail when it came to the
command to collect them up into a library. The command
$(AR) $@ $(BASE_O)
produced a file liblua/a instead of a.liblua. Then the next step

ranlib liblua.a

produced
> gcc -std=gnu99 -o lua lua.o liblua.a -lm
> gcc: error: liblua/a: No such file or directory
> make: *** [lua] Error 1

So, have I done something wrong, by omission or commission, or was the claim
about filenaming in the help docs premature? Should I have set some system
variables to tell GCC what filenaming system to use?

Sorry if I have not read the docs carefully enough, but I am just dipping my toe
in at this stage. All help and suggestions gratefully received.
--
Gavin Wraith (gavin@wra1th.plus.com)
Home page: http://www.wra1th.plus.com/

_______________________________________________
GCCSDK mailing list gcc@gccsdk.riscos.info
Bugzilla: http://www.riscos.info/bugzilla/index.cgi
List Info: http://www.riscos.info/mailman/listinfo/gcc
Main Page: http://www.riscos.info/index.php/GCCSDK

No comments:

Post a Comment