valgrind: Fix build for x86_64
This commit is contained in:
parent
33e9cda847
commit
8a82ee521d
20
packages/valgrind/Makefile.all.am.patch
Normal file
20
packages/valgrind/Makefile.all.am.patch
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
--- a/Makefile.all.am
|
||||||
|
+++ b/Makefile.all.am
|
||||||
|
@@ -335,13 +335,13 @@
|
||||||
|
PRELOAD_LDFLAGS_COMMON_LINUX += -nostdlib
|
||||||
|
endif
|
||||||
|
|
||||||
|
-PRELOAD_LDFLAGS_X86_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@
|
||||||
|
-PRELOAD_LDFLAGS_AMD64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@
|
||||||
|
+PRELOAD_LDFLAGS_X86_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ $(shell $(CC) @FLAG_M32@ -print-libgcc-file-name)
|
||||||
|
+PRELOAD_LDFLAGS_AMD64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ $(shell $(CC) @FLAG_M64@ -print-libgcc-file-name)
|
||||||
|
PRELOAD_LDFLAGS_PPC32_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@
|
||||||
|
PRELOAD_LDFLAGS_PPC64BE_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@
|
||||||
|
PRELOAD_LDFLAGS_PPC64LE_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@
|
||||||
|
-PRELOAD_LDFLAGS_ARM_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@
|
||||||
|
-PRELOAD_LDFLAGS_ARM64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@
|
||||||
|
+PRELOAD_LDFLAGS_ARM_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ $(shell $(CC) @FLAG_M32@ -print-libgcc-file-name)
|
||||||
|
+PRELOAD_LDFLAGS_ARM64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ $(shell $(CC) @FLAG_M64@ -print-libgcc-file-name)
|
||||||
|
PRELOAD_LDFLAGS_X86_FREEBSD = $(PRELOAD_LDFLAGS_COMMON_FREEBSD) @FLAG_M32@
|
||||||
|
PRELOAD_LDFLAGS_AMD64_FREEBSD= $(PRELOAD_LDFLAGS_COMMON_FREEBSD) @FLAG_M64@
|
||||||
|
PRELOAD_LDFLAGS_X86_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch i386
|
31
packages/valgrind/Makefile.tool.am.patch
Normal file
31
packages/valgrind/Makefile.tool.am.patch
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
--- a/Makefile.tool.am
|
||||||
|
+++ b/Makefile.tool.am
|
||||||
|
@@ -44,13 +44,13 @@
|
||||||
|
-nodefaultlibs -nostartfiles -Wl,-u,_start @FLAG_NO_BUILD_ID@
|
||||||
|
|
||||||
|
TOOL_LDFLAGS_X86_LINUX = \
|
||||||
|
- $(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M32@
|
||||||
|
+ $(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M32@ $(shell $(CC) @FLAG_M32@ -print-libgcc-file-name)
|
||||||
|
|
||||||
|
TOOL_LDFLAGS_X86_FREEBSD = \
|
||||||
|
$(TOOL_LDFLAGS_COMMON_FREEBSD) @FLAG_M32@
|
||||||
|
|
||||||
|
TOOL_LDFLAGS_AMD64_LINUX = \
|
||||||
|
- $(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M64@
|
||||||
|
+ $(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M64@ $(shell $(CC) @FLAG_M64@ -print-libgcc-file-name)
|
||||||
|
|
||||||
|
TOOL_LDFLAGS_AMD64_FREEBSD = \
|
||||||
|
$(TOOL_LDFLAGS_COMMON_FREEBSD) @FLAG_M64@
|
||||||
|
@@ -65,10 +65,10 @@
|
||||||
|
$(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M64@
|
||||||
|
|
||||||
|
TOOL_LDFLAGS_ARM_LINUX = \
|
||||||
|
- $(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M32@
|
||||||
|
+ $(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M32@ $(shell $(CC) @FLAG_M32@ -print-libgcc-file-name)
|
||||||
|
|
||||||
|
TOOL_LDFLAGS_ARM64_LINUX = \
|
||||||
|
- $(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M64@
|
||||||
|
+ $(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M64@ $(shell $(CC) @FLAG_M64@ -print-libgcc-file-name)
|
||||||
|
|
||||||
|
TOOL_LDFLAGS_S390X_LINUX = \
|
||||||
|
$(TOOL_LDFLAGS_COMMON_LINUX) @FLAG_M64@
|
@ -11,11 +11,11 @@ TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--with-tmpdir=$TERMUX_PREFIX/tmp"
|
|||||||
|
|
||||||
termux_step_pre_configure() {
|
termux_step_pre_configure() {
|
||||||
CFLAGS=${CFLAGS/-fstack-protector-strong/}
|
CFLAGS=${CFLAGS/-fstack-protector-strong/}
|
||||||
LDFLAGS+=" $($CC -print-libgcc-file-name)"
|
|
||||||
|
|
||||||
if [ "$TERMUX_ARCH" == "aarch64" ]; then
|
if [ "$TERMUX_ARCH" == "aarch64" ]; then
|
||||||
cp $TERMUX_PKG_BUILDER_DIR/aarch64-setjmp.S $TERMUX_PKG_SRCDIR
|
cp $TERMUX_PKG_BUILDER_DIR/aarch64-setjmp.S $TERMUX_PKG_SRCDIR
|
||||||
autoreconf -if
|
patch --silent -p1 < $TERMUX_PKG_BUILDER_DIR/coregrindmake.am.diff
|
||||||
|
patch --silent -p1 < $TERMUX_PKG_BUILDER_DIR/memcheckmake.am.diff
|
||||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --enable-only64bit"
|
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --enable-only64bit"
|
||||||
elif [ "$TERMUX_ARCH" == "arm" ]; then
|
elif [ "$TERMUX_ARCH" == "arm" ]; then
|
||||||
# valgrind doesn't like arm; armv7 works, though.
|
# valgrind doesn't like arm; armv7 works, though.
|
||||||
@ -24,4 +24,6 @@ termux_step_pre_configure() {
|
|||||||
# "valgrind uses inline assembly that is not Thumb compatible":
|
# "valgrind uses inline assembly that is not Thumb compatible":
|
||||||
CFLAGS=${CFLAGS/-mthumb/}
|
CFLAGS=${CFLAGS/-mthumb/}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
autoreconf -fi
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user