diff options
author | Tristan Gingold <tgingold@free.fr> | 2019-04-27 18:39:15 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2019-04-27 18:39:15 +0200 |
commit | da81679c73d79a64519b50fb40764b8d41fd6fd0 (patch) | |
tree | a207c191b9d78170b9bd7e64452685e51f6311e4 | |
parent | 273798099ced21ad739b1ea8fcc387d50d21abf4 (diff) | |
download | ghdl-da81679c73d79a64519b50fb40764b8d41fd6fd0.tar.gz ghdl-da81679c73d79a64519b50fb40764b8d41fd6fd0.tar.bz2 ghdl-da81679c73d79a64519b50fb40764b8d41fd6fd0.zip |
configure: use default_pic instead of default_pie.
Adjust Makefile.in so that libgrt.a is built with pic only when default_pic is
set.
-rw-r--r-- | Makefile.in | 7 | ||||
-rwxr-xr-x | configure | 10 | ||||
-rw-r--r-- | src/ghdldrv/default_paths.ads.in | 2 |
3 files changed, 10 insertions, 9 deletions
diff --git a/Makefile.in b/Makefile.in index 70ddb2c1c..cb4d69a24 100644 --- a/Makefile.in +++ b/Makefile.in @@ -41,6 +41,7 @@ enable_werror=@enable_werror@ enable_checks=@enable_checks@ enable_openieee=@enable_openieee@ enable_python=@enable_python@ +default_pic=@default_pic@ INSTALL_PROGRAM=install -m 755 INSTALL_DATA=install -m 644 @@ -80,7 +81,11 @@ OPT_FLAGS+=-fprofile-arcs -ftest-coverage endif GNATFLAGS=-gnaty3befhkmr -gnatwa -gnatf $(OPT_FLAGS) $(ADA_FLAGS) -GRT_FLAGS=$(OPT_FLAGS) $(PIC_FLAGS) +GRT_FLAGS=$(OPT_FLAGS) + +ifeq "$(default_pic)" "true" +GRT_FLAGS+=$(PIC_FLAGS) +endif WARN_CFLAGS=-Wall @@ -53,7 +53,7 @@ PIC_FLAGS=-fPIC show_help=no progname=$0 -subst_vars="CC CXX GNATMAKE MAKE CFLAGS LDFLAGS build srcdir abs_srcdir prefix backend libdirsuffix libdirreverse gcc_src_dir llvm_config llvm_be backtrace_lib build_mode EXEEXT SOEXT PIC_FLAGS default_pie enable_werror enable_checks enable_openieee enable_python libghdl_version ghdl_version" +subst_vars="CC CXX GNATMAKE MAKE CFLAGS LDFLAGS build srcdir abs_srcdir prefix backend libdirsuffix libdirreverse gcc_src_dir llvm_config llvm_be backtrace_lib build_mode EXEEXT SOEXT PIC_FLAGS default_pic enable_werror enable_checks enable_openieee enable_python libghdl_version ghdl_version" # Find srcdir srcdir=`dirname $progname` @@ -281,11 +281,7 @@ libghdl_version=`echo $ghdl_version | sed -e 's/[-.]/_/g'` # Check if gcc was configured with --enable-default-pie. In that case -fPIC # should be added. if gcc -v 2>&1 | grep -q enable-default-pie; then - default_pie="true" -fi - -if [ "x$default_pic" = "xtrue" ]; then - default_pie="true" + default_pic="true" fi # Create subdirectories @@ -377,7 +373,7 @@ sed -e "s%@COMPILER_GCC@%ghdl1-gcc$EXEEXT%" \ -e "s%@INSTALL_PREFIX@%$prefix%" \ -e "s%@LIB_PREFIX@%$libdirsuffix%" \ -e "s%@SOEXT@%$SOEXT%" \ - -e "s%@default_pie@%$default_pie%" \ + -e "s%@default_pic@%$default_pic%" \ < $srcdir/src/ghdldrv/default_paths.ads.in > default_paths.ads exit 0 diff --git a/src/ghdldrv/default_paths.ads.in b/src/ghdldrv/default_paths.ads.in index a20491c3d..ae321011b 100644 --- a/src/ghdldrv/default_paths.ads.in +++ b/src/ghdldrv/default_paths.ads.in @@ -38,5 +38,5 @@ package Default_Paths is "@POST_PROCESSOR@"; Shared_Library_Extension : constant String := "@SOEXT@"; - Default_Pie : constant Boolean := "@default_pie@" = String'("true"); + Default_Pie : constant Boolean := "@default_pic@" = String'("true"); end Default_Paths; |