ports/161562: [patch] games/el: clang build fails to link due to inlining
Nali Toja
nalitoja at gmail.com
Thu Oct 13 22:40:07 UTC 2011
>Number: 161562
>Category: ports
>Synopsis: [patch] games/el: clang build fails to link due to inlining
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Thu Oct 13 22:40:06 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator: Nali Toja
>Release: FreeBSD 10.0-CURRENT amd64
>Organization:
>Environment:
>Description:
>How-To-Repeat:
$ make CC=clang CXX=clang++
[...]
LINK el.x86
bags.o: In function `display_ground_items_handler':
bags.c:298: undefined reference to `get_items_texture'
cal.o: In function `cal_render_actor':
cal.c:709: undefined reference to `render_submesh'
cal.c:682: undefined reference to `render_submesh'
cal.c:686: undefined reference to `render_submesh'
cal.c:690: undefined reference to `render_submesh'
cal.c:717: undefined reference to `render_submesh'
hud.o: In function `display_quickbar_handler':
hud.c:1587: undefined reference to `get_items_texture'
manufacture.o: In function `display_manufacture_handler':
manufacture.c:117: undefined reference to `get_items_texture'
manufacture.c:154: undefined reference to `get_items_texture'
minimap.o: In function `draw_actor_points':
minimap.c:1165: undefined reference to `rotate_actor_points'
minimap.c:1262: undefined reference to `rotate_actor_points'
storage.o: In function `display_storage_handler':
storage.c:266: undefined reference to `get_items_texture'
trade.o: In function `display_trade_handler':
trade.c:104: undefined reference to `get_items_texture'
trade.c:142: undefined reference to `get_items_texture'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
gmake: *** [el.x86] Error 1
>Fix:
--- clang.diff begins here ---
--- cal.c~
+++ cal.c
@@ -367,7 +367,7 @@ CHECK_GL_ERRORS();
}
-__inline__ void render_submesh(int meshId, int submeshCount, struct CalRenderer * pCalRenderer, float meshVertices[30000][3], float meshNormals[30000][3], float meshTextureCoordinates[30000][2], CalIndex meshFaces[50000][3], Uint32 use_lightning, Uint32 use_textures)
+static __inline__ void render_submesh(int meshId, int submeshCount, struct CalRenderer * pCalRenderer, float meshVertices[30000][3], float meshNormals[30000][3], float meshTextureCoordinates[30000][2], CalIndex meshFaces[50000][3], Uint32 use_lightning, Uint32 use_textures)
{
int submeshId;
int vertexCount=0;
--- items.h~
+++ items.h
@@ -159,7 +159,7 @@ int get_mouse_pos_in_grid(int mx, int my
* \param no id of the item
* \retval GLuint the texture id associated with \a no.
*/
-__inline__ GLuint get_items_texture(int no);
+extern __inline__ GLuint get_items_texture(int no);
/*!
* \ingroup items_window
--- minimap.c~
+++ minimap.c
@@ -1090,7 +1090,7 @@ static __inline__ float minimap_get_zoom
return zoom;
}
-__inline__ void rotate_actor_points(float zoom_multip, float px, float py)
+static __inline__ void rotate_actor_points(float zoom_multip, float px, float py)
{
float x,y;
x = (px - (float_minimap_size/2) ) + float_minimap_size/2;
--- clang.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list