== 371668
376956 syswrap of SNDDRV and DRM_IOCTL_VERSION causing some addresses
to be wrongly marked as addressable
+377066 Some Valgrind unit tests fail to compile on Ubuntu 16.10 with
+ PIE enabled by default
377376 memcheck/tests/linux/getregset fails with glibc2.24
377427 PPC64, lxv instruction failing on odd destination register
377478 PPC64: ISA 3.0 setup fixes
AM_CONDITIONAL([HAVE_ASM_CONSTRAINT_P], [test x$ac_have_asm_constraint_p = xyes])
+# Does this compiler support -no-pie?
+# On Ubuntu 16.10+, gcc produces position independent executables (PIE) by
+# default. However this gets in the way with some tests, we use -no-pie
+# for these.
+
+AC_MSG_CHECKING([if gcc accepts -no-pie])
+
+safe_CFLAGS=$CFLAGS
+CFLAGS="-no-pie"
+
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ]], [[
+ return 0;
+]])], [
+AC_SUBST([FLAG_NO_PIE], ["-no-pie"])
+AC_MSG_RESULT([yes])
+], [
+AC_SUBST([FLAG_NO_PIE], [""])
+AC_MSG_RESULT([no])
+])
+CFLAGS=$safe_CFLAGS
+
+
# We want to use use the -Ttext-segment option to the linker.
# GNU (bfd) ld supports this directly. Newer GNU gold linkers
# support it as an alias of -Ttext. Sadly GNU (bfd) ld's -Ttext
check_PROGRAMS += ll
ll_SOURCES = ll.S
endif
+
+clone_test_CFLAGS = $(AM_CFLAGS) @FLAG_NO_PIE@
+complex_rep_CFLAGS = $(AM_CFLAGS) @FLAG_NO_PIE@
+fldcw_check_CFLAGS = $(AM_CFLAGS) @FLAG_NO_PIE@
+ll_CFLAGS = $(AM_CFLAGS) @FLAG_NO_PIE@
+million_CFLAGS = $(AM_CFLAGS) @FLAG_NO_PIE@
+rep_prefix_CFLAGS = $(AM_CFLAGS) @FLAG_NO_PIE@
AM_CCASFLAGS += @FLAG_M64@
defcfaexpr_SOURCES = defcfaexpr.S
-
+defcfaexpr_CFLAGS = $(AM_CFLAGS) @FLAG_NO_PIE@
AM_CXXFLAGS += @FLAG_M64@
AM_CCASFLAGS += @FLAG_M64@
+fxsave_amd64_CFLAGS = $(AM_CFLAGS) @FLAG_NO_PIE@
insn_pcmpistri_CFLAGS = $(AM_CFLAGS)
if VGCONF_OS_IS_SOLARIS
insn_pcmpistri_CFLAGS += --std=c99
more_x87_fp_CFLAGS = $(AM_CFLAGS) -O -ffast-math -mfpmath=387 \
-mfancy-math-387
more_x87_fp_LDADD = -lm
-
+shr_edx_CFLAGS = $(AM_CFLAGS) @FLAG_NO_PIE@
# generic C ones
amd64locked_CFLAGS = $(AM_CFLAGS) -O
bug132918_LDADD = -lm
-fxtract_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_OVERFLOW@
+cmpxchg_CFLAGS = $(AM_CFLAGS) @FLAG_NO_PIE@
+fcmovnu_CFLAGS = $(AM_CFLAGS) @FLAG_NO_PIE@
+fxtract_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_OVERFLOW@ @FLAG_NO_PIE@
insn_basic_SOURCES = insn_basic.def
insn_basic_LDADD = -lm
insn_mmx_SOURCES = insn_mmx.def
fma4_CFLAGS += -D__EXTENSIONS__
endif
fma4_LDADD = -lm
+jrcxz_CFLAGS = $(AM_CFLAGS) @FLAG_NO_PIE@
+looper_CFLAGS = $(AM_CFLAGS) @FLAG_NO_PIE@
+sbbmisc_CFLAGS = $(AM_CFLAGS) @FLAG_NO_PIE@
+shrld_CFLAGS = $(AM_CFLAGS) @FLAG_NO_PIE@
.def.c: $(srcdir)/gen_insn_test.pl
$(PERL) $(srcdir)/gen_insn_test.pl < $< > $@