AUTOHEADER := @AUTOHEADER@
CXX := @CXX@
CXXFLAGS := @CXXFLAGS@
-CXXOPTS := $(CXXFLAGS) -fno-exceptions -fno-rtti
+PIEFLAG := @PIEFLAG@
+CXXOPTS := $(CXXFLAGS) $(PIEFLAG) -fno-exceptions -fno-rtti
+LDFLAGS := @LDFLAGS@
exeext := @EXEEXT@
LIBIBERTY := ../libiberty/libiberty.a
VERSION.O := ../gcc/version.o
CODYLIB = ../libcody/libcody.a
CXXINC += -I$(srcdir)/../libcody -I$(srcdir)/../include -I$(srcdir)/../gcc -I.
g++-mapper-server$(exeext): $(MAPPER.O) $(CODYLIB)
- +$(CXX) $(LDFLAGS) -o $@ $^ $(VERSION.O) $(LIBIBERTY)
+ +$(CXX) $(LDFLAGS) $(PIEFLAG) -o $@ $^ $(VERSION.O) $(LIBIBERTY)
# copy to gcc dir so tests there can run
all::../gcc/g++-mapper-server$(exeext)
ac_ct_CC
CFLAGS
CC
+PIEFLAG
MAINTAINER
CXX_AUX_TOOLS
AUTOHEADER
enable_option_checking
enable_c___tools
enable_maintainer_mode
+enable_default_pie
with_gcc_major_version_only
'
ac_precious_vars='build_alias
--enable-maintainer-mode
enable maintainer mode. Add rules to rebuild
configurey bits
+ --enable-default-pie enable Position Independent Executable as default
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
test "$maintainer_mode" = yes && MAINTAINER=yes
+# Check whether --enable-default-pie was given.
+# Check whether --enable-default-pie was given.
+if test "${enable_default_pie+set}" = set; then :
+ enableval=$enable_default_pie; PIEFLAG=-fPIE
+else
+ PIEFLAG=
+fi
+
+
+
# Check if O_CLOEXEC is defined by fcntl
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
test "$maintainer_mode" = yes && MAINTAINER=yes
AC_SUBST(MAINTAINER)
+# Check whether --enable-default-pie was given.
+AC_ARG_ENABLE(default-pie,
+[AS_HELP_STRING([--enable-default-pie],
+ [enable Position Independent Executable as default])],
+[PIEFLAG=-fPIE], [PIEFLAG=])
+AC_SUBST([PIEFLAG])
+
# Check if O_CLOEXEC is defined by fcntl
AC_CACHE_CHECK(for O_CLOEXEC, ac_cv_o_cloexec, [
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[