Rockbox

  • Status Closed
  • Percent Complete
    100%
  • Task Type Bugs
  • Category Infrastructure → Build environment
  • Assigned To No-one
  • Operating System All players
  • Severity Low
  • Priority Very Low
  • Reported Version Daily build (which?)
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by mud - 2008-12-15
Last edited by zagor - 2009-08-20

FS#9648 - makefile for new multifile plugins requires hackish extra code for unknown reason

I’m not even sure that this is a bug, it may be something I’m doing wrong or a misunderstanding on my part. But regardless, here it is:

This was tested from subversion revision r19442.

When making a new multi-file plugin, I can’t just copy the structure of the sudoku.make file from the sudoku plugin. These extra lines are needed at the end of the .make for some unknown reason:


$(call PRINTS,LD $(@F))
$(SILENT)$(CC) $(PLUGINFLAGS) -o $*.elf \
	$(filter %.o, $^) \
	$(filter %.a, $^) \
	-lgcc $(PLUGINLDFLAGS)

ifdef SIMVER

$(SILENT)cp $*.elf $@

else

$(SILENT)$(OC) -O binary $*.elf $@

endif


If this blob is not present, then the plugin does not get linked or built into a .rock. (there is no error message, it just builds the object files for the plugin and fails to do anything else with them. No .rock file is made for the plugin.).

Attached is a patch containing an extremely simple plugin, named goban, that exhibits this behavior (it is basically a copy of the helloworld plugin made into a multi-file style plugin for demonstration). It appears to me that it should be doing everything necessary to be built as a plugin, but it doesn’t work. Notice that the goban.make has exactly the same structure as sudoku’s sudoku.make file, and yet sudoku correctly becomes a .rock plugin while this test plugin does not.

By the way, the extra blob above was found in reversi’s makefile.

Steps to reproduce:
1) Apply the attached patch
2) Build rockbox (I tested with e200 normal and simulator)
3) make zip and extract it
4) Notice that there exists no goban.rock file in .rockbox/rocks/games/
5) View apps/plugins/sudoku/sudoku.make and compare it with apps/plugins/goban/goban.make. Notice that the structure is identical and yet one works correctly while the other fails silently. This makes it very treacherous to start new multi-file plugins by copying the structure of existing plugins.

Closed by  zagor
2009-08-20 22:32
Reason for closing:  Wont Fix
Additional comments about closing:  

Not being allowed to call plugin sources "main.c" is a bit annoying, but something we can live with.

Just rename main.c to goban.c (in SOURCES too).

mud commented on 2008-12-16 04:18

Wow, that’s annoying. I guess that works though, thanks.

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing