aboutsummaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2016-07-21 08:01:02 +0200
committerTristan Gingold <tgingold@free.fr>2016-07-21 08:01:02 +0200
commit07cdfc14b94fa48feb15e564b57afb498fff308a (patch)
tree01785f2709a36e11d88528921f71c07be002bb30 /configure
parentd1dee38b9433ee248da270abf661139b8c617413 (diff)
downloadghdl-07cdfc14b94fa48feb15e564b57afb498fff308a.tar.gz
ghdl-07cdfc14b94fa48feb15e564b57afb498fff308a.tar.bz2
ghdl-07cdfc14b94fa48feb15e564b57afb498fff308a.zip
Do not use -fPIC to build libghdlvpi on windows and darwin.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure14
1 files changed, 9 insertions, 5 deletions
diff --git a/configure b/configure
index a00e8f998..a69ba04c1 100755
--- a/configure
+++ b/configure
@@ -19,11 +19,12 @@ build=
build_mode=
EXEEXT=
SOEXT=.so
+PIC_FLAGS=-fPIC
show_help=no
progname=$0
-subst_vars="CC GNATMAKE CFLAGS LDFLAGS build srcdir prefix backend libdirsuffix libdirreverse gcc_src_dir llvm_config backtrace_lib build_mode EXEEXT SOEXT"
+subst_vars="CC GNATMAKE CFLAGS LDFLAGS build srcdir prefix backend libdirsuffix libdirreverse gcc_src_dir llvm_config backtrace_lib build_mode EXEEXT SOEXT PIC_FLAGS"
# Find srcdir
srcdir=`dirname $progname`
@@ -175,11 +176,12 @@ if test $backend = llvm; then
esac
fi
-# Define default file extensions for Windows or Linux-like systems
+# Define default file extensions for Windows or Linux-like systems and
+# use -fPIC or not.
case "$build" in
- *mingw*) SOEXT=".dll"; EXEEXT=".exe";;
- *darwin*) SOEXT=".dylib"; EXEEXT="";;
- *) SOEXT=".so"; EXEEXT="";;
+ *mingw*) SOEXT=".dll"; EXEEXT=".exe"; PIC_FLAGS="";;
+ *darwin*) SOEXT=".dylib"; EXEEXT=""; PIC_FLAGS="";;
+ *) SOEXT=".so"; EXEEXT=""; PIC_FLAGS="-fPIC";;
esac
# Generate config.status
@@ -241,6 +243,8 @@ if test $backend = mcode; then
fi
# Generate default_pathes.ads
+# Also update dist/mcode/windows/default_pathes.ads if you change this
+# template.
echo "Generate default_pathes.ads"
curdir=`pwd`
sed -e "s%@COMPILER_GCC@%ghdl1-gcc$EXEEXT%" \