Compile md5.c with "-fno-strict-aliasing".

The function md5_finish_ctx dereferences type-punned pointers which
breaks strict aliasing rules.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22832 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Mike Alexander 2013-03-24 00:03:54 +00:00
parent 28749fb1c3
commit 01e0693a23

View File

@ -5,10 +5,11 @@ TEST_SUBDIRS = test
lib_LTLIBRARIES = libgnc-qof.la
libgnc_qof_la_LDFLAGS= -version-info $(LIBQOF_LIBRARY_VERSION)
libgnc_qof_la_LIBADD= \
libgnc_qof_common_libs = \
$(GLIB_LIBS) \
$(REGEX_LIBS) \
$(top_builddir)/lib/libc/libc-missing.la
libgnc_qof_la_LIBADD = $(libgnc_qof_common_libs)
AM_CPPFLAGS = \
-I$(top_srcdir)/lib/libc \
@ -21,7 +22,6 @@ libgnc_qof_la_SOURCES = \
guid.c \
kvp-util.c \
kvp_frame.c \
md5.c \
qofbackend.c \
qofbook.c \
qofchoice.c \
@ -80,6 +80,13 @@ noinst_HEADERS = \
qofquery-p.h \
qofquerycore-p.h \
qofsession-p.h
# Must compile md5.c without strict aliasing, otherwise function md5_finish_ctx
# gets "dereferencing type-punned pointer will break strict-aliasing rules"
noinst_LTLIBRARIES = libmd5.la
libmd5_la_SOURCES = md5.c
libmd5_la_CFLAGS=-fno-strict-aliasing
libgnc_qof_la_LIBADD += libmd5.la
EXTRA_DIST += \
qofmath128.c
@ -96,6 +103,6 @@ check_PROGRAMS = test-qofmath
test_qofmath_SOURCES=gnc-numeric.c
test_qofmath_CPPFLAGS=$(AM_CPPFLAGS) -DTEST_128_BIT_MULT
test_qofmath_LDFLAGS=$(libgnc_qof_la_LDFLAGS)
test_qofmath_LDADD=$(libgnc_qof_la_LIBADD)
test_qofmath_LDADD=$(libgnc_qof_common_libs)
AM_CPPFLAGS += -DG_LOG_DOMAIN=\"qof\"