Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F156700756
D26469.id77149.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D26469.id77149.diff
View Options
Index: lib/libarchive/Makefile
===================================================================
--- lib/libarchive/Makefile
+++ lib/libarchive/Makefile
@@ -6,29 +6,13 @@
LIB= archive
-LIBADD= z bz2 lzma bsdxml zstd
-CFLAGS+= -DHAVE_BZLIB_H=1 -DHAVE_LIBLZMA=1 -DHAVE_LZMA_H=1 -DHAVE_ZSTD_H=1 -DHAVE_LIBZSTD=1
-
# FreeBSD SHLIB_MAJOR value is managed as part of the FreeBSD system.
# It has no real relation to the libarchive version number.
SHLIB_MAJOR= 7
-CFLAGS+= -DPLATFORM_CONFIG_H=\"${.CURDIR}/config_freebsd.h\"
CFLAGS+= -I${.OBJDIR}
CFLAGS+= -I${SRCTOP}/sys/contrib/zstd/lib
-
-.if ${MK_OPENSSL} != "no"
-CFLAGS+= -DWITH_OPENSSL
-LIBADD+= crypto
-.else
-LIBADD+= md
-.endif
-
-.if ${MK_ICONV} != "no"
-# TODO: This can be changed back to CFLAGS once iconv works correctly
-# with statically linked binaries.
-SHARED_CFLAGS+= -DHAVE_ICONV=1 -DHAVE_ICONV_H=1 -DICONV_CONST=
-.endif
+.include "Makefile.inc"
.if ${MACHINE_ARCH:Marm*} != "" || ${MACHINE_ARCH:Mmips*} != "" || \
${MACHINE_ARCH:Mpowerpc*} != ""
Index: lib/libarchive/Makefile.inc
===================================================================
--- /dev/null
+++ lib/libarchive/Makefile.inc
@@ -0,0 +1,21 @@
+# $FreeBSD$
+# These defines are needed for both libarchive and the tests. If we don't keep
+# them in sync we can get run-time crashes while running tests due to mismatches
+# between structures such as archive_md5_ctx, etc.
+
+LIBADD= z bz2 lzma bsdxml zstd
+CFLAGS+= -DHAVE_BZLIB_H=1 -DHAVE_LIBLZMA=1 -DHAVE_LZMA_H=1 -DHAVE_ZSTD_H=1 -DHAVE_LIBZSTD=1
+CFLAGS+= -DPLATFORM_CONFIG_H=\"${.CURDIR}/config_freebsd.h\"
+
+.if ${MK_OPENSSL} != "no"
+CFLAGS+= -DWITH_OPENSSL
+LIBADD+= crypto
+.else
+LIBADD+= md
+.endif
+
+.if ${MK_ICONV} != "no"
+# TODO: This can be changed back to CFLAGS once iconv works correctly
+# with statically linked binaries.
+SHARED_CFLAGS+= -DHAVE_ICONV=1 -DHAVE_ICONV_H=1 -DICONV_CONST=
+.endif
Index: lib/libarchive/tests/Makefile
===================================================================
--- lib/libarchive/tests/Makefile
+++ lib/libarchive/tests/Makefile
@@ -1,4 +1,5 @@
# $FreeBSD$
+.include <src.opts.mk>
PACKAGE= tests
@@ -15,7 +16,7 @@
CFLAGS+= -I${.CURDIR} -I${.CURDIR:H} -I${.OBJDIR}
CFLAGS+= -I${_LIBARCHIVEDIR}/libarchive -I${_LIBARCHIVEDIR}/libarchive/test
CFLAGS+= -I${_LIBARCHIVEDIR}/test_utils
-CFLAGS+= -DHAVE_LIBLZMA=1 -DHAVE_LZMA_H=1
+.include "../Makefile.inc"
# Uncomment to link against dmalloc
#LDADD+= -L/usr/local/lib -ldmalloc
@@ -298,10 +299,6 @@
test_zip_filename_encoding.c
# Deterministic failures:
-# Crashes with SIGBUS
-BROKEN_TESTS+= test_archive_rmd160
-# Fails with `libarchive/test/test_archive_crypto.c:121: md != actualmd`
-BROKEN_TESTS+= test_archive_sha384
# Fails with `test_read_disk_directory_traversals.c:1094: File at has atime 886622, 1443306049 seconds ago`
BROKEN_TESTS+= test_read_disk_directory_traversals
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, May 16, 6:51 PM (6 h, 26 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33145685
Default Alt Text
D26469.id77149.diff (2 KB)
Attached To
Mode
D26469: libarchive: fix mismatch between library and test configuration
Attached
Detach File
Event Timeline
Log In to Comment