summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafaël Carré <rafael.carre@gmail.com>2011-12-09 20:56:40 +0000
committerRafaël Carré <rafael.carre@gmail.com>2011-12-09 20:56:40 +0000
commit07cfc30e50f6fdd66b8bcf281f949ec6320d58fb (patch)
tree310ff90bc78fbed03b08ec98539d81d871005ce9
parent11b661e45ce7ac8f3ec16d06de165895b624e701 (diff)
lcd_blit_yuv(): don't use weak attribute when building for windows
current gcc/binutils don't support weak attribute correctly see http://sourceware.org/bugzilla/show_bug.cgi?id=9687 fix FS#12427 git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31193 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/drivers/lcd-16bit-common.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/firmware/drivers/lcd-16bit-common.c b/firmware/drivers/lcd-16bit-common.c
index 5f3997a5f6..2e5ce208b0 100644
--- a/firmware/drivers/lcd-16bit-common.c
+++ b/firmware/drivers/lcd-16bit-common.c
@@ -978,15 +978,24 @@ static inline int clamp(int val, int min, int max)
return val;
}
-__attribute__((weak)) void lcd_yuv_set_options(unsigned options)
+#ifndef _WIN32
+/*
+ * weak attribute doesn't work for win32 as of gcc 4.6.2 and binutils 2.21.52
+ * When building win32 simulators, we won't be using an optimized version of
+ * lcd_blit_yuv(), so just don't use the weak attribute.
+ */
+__attribute__((weak))
+#endif
+void lcd_yuv_set_options(unsigned options)
{
(void)options;
}
-/* Draw a partial YUV colour bitmap - similiar behavior to lcd_blit_yuv
- in the core */
-
-__attribute__((weak)) void lcd_blit_yuv(unsigned char * const src[3],
+/* Draw a partial YUV colour bitmap */
+#ifndef _WIN32
+__attribute__((weak))
+#endif
+void lcd_blit_yuv(unsigned char * const src[3],
int src_x, int src_y, int stride,
int x, int y, int width, int height)
{