Commit e60db5be authored by Tollef Fog Heen's avatar Tollef Fog Heen

Pass -Wc,-fstack-protector to the libtool ld stage, to make the stack protector work on omnios

parent 7ad9ae5c
......@@ -480,12 +480,16 @@ AC_ARG_ENABLE(stack-protector,
if test "x$enable_stack_protector" != "xno"; then
save_CFLAGS="$CFLAGS"
CFLAGS="${CFLAGS} -fstack-protector-all"
save_AM_LT_LDFLAGS="$AM_LT_LDFLAGS"
AM_LT_LDFLAGS="${AM_LT_LDFLAGS} -Wc,-fstack-protector"
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([],[],[])],
[],
[AC_MSG_WARN([-fstack-protector not supported, disabling])
CFLAGS="$save_CFLAGS"])
CFLAGS="$save_CFLAGS"]
AM_LT_LDFLAGS="$save_AM_LT_LDFLAGS")
fi
AC_SUBST(AM_LT_LDFLAGS)
# --enable-tests
AC_ARG_ENABLE(tests,
......
INCLUDES = -I$(top_srcdir)/include @PCRE_CFLAGS@
AM_LDFLAGS = $(AM_LT_LDFLAGS)
pkglib_LTLIBRARIES = libvarnish.la
libvarnish_la_LDFLAGS = -avoid-version
libvarnish_la_LDFLAGS = $(AM_LDFLAGS) -avoid-version
libvarnish_la_SOURCES = \
vav.c \
......
#
AM_LDFLAGS = $(AM_LT_LDFLAGS)
INCLUDES = -I$(top_srcdir)/include @PCRE_CFLAGS@
lib_LTLIBRARIES = libvarnishapi.la
libvarnishapi_la_LDFLAGS = -version-info 1:0:0
libvarnishapi_la_LDFLAGS = $(AM_LDFLAGS) -version-info 1:0:0
libvarnishapi_la_SOURCES = \
vsm_api.h \
......
#
INCLUDES = -I$(top_srcdir)/include
AM_LDFLAGS = $(AM_LT_LDFLAGS)
pkglib_LTLIBRARIES = libvarnishcompat.la
libvarnishcompat_la_LDFLAGS = -avoid-version
libvarnishcompat_la_LDFLAGS = $(AM_LDFLAGS) -avoid-version
libvarnishcompat_la_SOURCES = \
daemon.c \
......
#
AM_LDFLAGS = $(AM_LT_LDFLAGS)
INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include
pkglib_LTLIBRARIES = libvcl.la
libvcl_la_LDFLAGS = -avoid-version
libvcl_la_LDFLAGS = $(AM_LDFLAGS) -avoid-version
libvcl_la_SOURCES = \
vcc_compile.h \
......
#
AM_LDFLAGS = $(AM_LT_LDFLAGS)
pkglib_LTLIBRARIES = libvgz.la
libvgz_la_LDFLAGS = -avoid-version
libvgz_la_LDFLAGS = $(AM_LDFLAGS) -avoid-version
libvgz_la_CFLAGS = -D_LARGEFILE64_SOURCE=1 $(libvgz_extra_cflags)
libvgz_la_SOURCES = \
......
#
AM_LDFLAGS = $(AM_LT_LDFLAGS)
INCLUDES = \
-I$(top_srcdir)/include \
......@@ -10,7 +11,7 @@ vmod_srcdir = $(top_srcdir)/lib/libvmod_debug
vmodtool = $(top_srcdir)/lib/libvcl/vmodtool.py
noinst_LTLIBRARIES = libvmod_debug.la
libvmod_debug_la_LDFLAGS = -module -export-dynamic -avoid-version -rpath /nowhere
libvmod_debug_la_LDFLAGS = $(AM_LDFLAGS) -module -export-dynamic -avoid-version -rpath /nowhere
libvmod_debug_la_SOURCES = \
vcc_if.c \
......
#
AM_LDFLAGS = $(AM_LT_LDFLAGS)
INCLUDES = \
-I$(top_srcdir)/include \
-I$(top_srcdir)/bin/varnishd \
......@@ -12,7 +14,7 @@ vmod_srcdir = $(top_srcdir)/lib/libvmod_std
vmodtool = $(top_srcdir)/lib/libvcl/vmodtool.py
vmod_LTLIBRARIES = libvmod_std.la
libvmod_std_la_LDFLAGS = -module -export-dynamic -avoid-version
libvmod_std_la_LDFLAGS = $(AM_LDFLAGS) -module -export-dynamic -avoid-version
libvmod_std_la_SOURCES = \
vcc_if.c \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment