fix valgrind on ppc
authorFelix Fietkau <nbd@openwrt.org>
Sun, 17 Aug 2008 11:49:31 +0000 (11:49 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Sun, 17 Aug 2008 11:49:31 +0000 (11:49 +0000)
SVN-Revision: 12330

utils/valgrind/Makefile
utils/valgrind/src/abort.c [new file with mode: 0644]

index ccf48f2..20699ca 100644 (file)
@@ -47,10 +47,18 @@ CONFIGURE_ARGS += \
 
 DEFAULT_SUPP += "uclibc.supp"
 
-define Build/Compile   
+define Build/Compile
+       $(TARGET_CC) $(TARGET_CFLAGS) -c -o $(PKG_BUILD_DIR)/abort.o ./src/abort.c
+       $(TARGET_CROSS)ar rcu $(PKG_BUILD_DIR)/abort.a $(PKG_BUILD_DIR)/abort.o
        $(MAKE) -C $(PKG_BUILD_DIR) \
+               $(TARGET_CONFIGURE_OPTS) \
                DESTDIR="$(PKG_INSTALL_DIR)" \
                CFLAGS="$(TARGET_CFLAGS)" \
+               AM_CFLAGS_X86_LINUX="$(TARGET_CFLAGS)" \
+               AM_CFLAGS_AMD64_LINUX="$(TARGET_CFLAGS)" \
+               AM_CFLAGS_PPC32_LINUX="$(TARGET_CFLAGS)" \
+               AM_CFLAGS_PPC64_LINUX="$(TARGET_CFLAGS)" \
+               TOOL_LDADD_COMMON="-lgcc $(PKG_BUILD_DIR)/abort.a" \
                all install
 endef
 
diff --git a/utils/valgrind/src/abort.c b/utils/valgrind/src/abort.c
new file mode 100644 (file)
index 0000000..0b4ad98
--- /dev/null
@@ -0,0 +1,3 @@
+void abort(void)
+{
+}