Signed-off-by: Myles Watson <[email protected]>

Thanks,
Myles
Index: svn/src/include/lib.h
===================================================================
--- svn.orig/src/include/lib.h
+++ svn/src/include/lib.h
@@ -28,3 +28,15 @@ unsigned long ulzma(unsigned char *src, 
 /* Defined in src/arch/i386/boot/gdt.c */
 void move_gdt(void);
 
+/* Defined in src/lib/gcc.c */
+#define WRAP_LIBGCC_CALL(type, name) \
+	type __wrap_##name(type a, type b) { return __real_##name(a, b); }
+
+#define PROTO_WRAP_LIBGCC_CALL(type, name) \
+	type __real_##name(type a, type b) __attribute__((regparm(0))); \
+	type __wrap_##name(type a, type b);
+
+PROTO_WRAP_LIBGCC_CALL(long long, __divdi3)
+PROTO_WRAP_LIBGCC_CALL(unsigned long long, __udivdi3)
+PROTO_WRAP_LIBGCC_CALL(long long, __moddi3)
+PROTO_WRAP_LIBGCC_CALL(unsigned long long, __umoddi3)
Index: svn/src/lib/gcc.c
===================================================================
--- svn.orig/src/lib/gcc.c
+++ svn/src/lib/gcc.c
@@ -22,10 +22,7 @@
  * compiler call specifies. Therefore we need a wrapper around those
  * functions. See gcc bug PR41055 for more information.
  */
-
-#define WRAP_LIBGCC_CALL(type, name) \
-	type __real_##name(type a, type b) __attribute__((regparm(0))); \
-	type __wrap_##name(type a, type b) { return __real_##name(a, b); }
+#include <lib.h>
 
 WRAP_LIBGCC_CALL(long long, __divdi3)
 WRAP_LIBGCC_CALL(unsigned long long, __udivdi3)
-- 
coreboot mailing list: [email protected]
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to