This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#9648 - makefile for new multifile plugins requires hackish extra code for unknown reason
Attached to Project:
Rockbox
Opened by Joshua Simmons (mud) - Monday, 15 December 2008, 11:16 GMT+2
Last edited by Björn Stenberg (zagor) - Friday, 21 August 2009, 00:32 GMT+2
Opened by Joshua Simmons (mud) - Monday, 15 December 2008, 11:16 GMT+2
Last edited by Björn Stenberg (zagor) - Friday, 21 August 2009, 00:32 GMT+2
|
DetailsI'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. |
This task depends upon
Closed by Björn Stenberg (zagor)
Friday, 21 August 2009, 00:32 GMT+2
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.
Friday, 21 August 2009, 00:32 GMT+2
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).
Wow, that's annoying. I guess that works though, thanks.