From 07cdfc14b94fa48feb15e564b57afb498fff308a Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Thu, 21 Jul 2016 08:01:02 +0200 Subject: Do not use -fPIC to build libghdlvpi on windows and darwin. --- configure | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'configure') 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%" \ -- cgit v1.2.3