diff options
| author | Tristan Gingold <gingold@adacore.com> | 2016-01-05 06:44:53 +0100 | 
|---|---|---|
| committer | Tristan Gingold <gingold@adacore.com> | 2016-01-06 18:38:37 +0100 | 
| commit | b5797a5cef6d25817da7998f6263afa53e196d25 (patch) | |
| tree | ad3b67a93d16e8a06fab2d7a8c4d8993ff101b8a /configure | |
| parent | 955e964b024de556c4c0db8fd745c6abdb8052fe (diff) | |
| download | ghdl-b5797a5cef6d25817da7998f6263afa53e196d25.tar.gz ghdl-b5797a5cef6d25817da7998f6263afa53e196d25.tar.bz2 ghdl-b5797a5cef6d25817da7998f6263afa53e196d25.zip  | |
mcode: add support for x86-64
Diffstat (limited to 'configure')
| -rwxr-xr-x | configure | 23 | 
1 files changed, 17 insertions, 6 deletions
@@ -120,10 +120,16 @@ echo "Build machine is: $build"  # For mcode, check that gcc emits i386  if test $backend = mcode; then -    if ! $CC $CFLAGS -dumpmachine | grep -q "[3-6]86"; then -	echo "WARNING: GHDL for mcode is supported only on x86 (32 bits)" -	echo "continuing, but build failure expected (See the README)" -    fi +    gcc_machine=`$CC $CFLAGS -dumpmachine` +    case "$gcc_machine" in +	i[3-6]86*) mcode64="" ;; +	x86_64*) mcode64="64" ;; +	*) +	  mcode64="" +	  echo "WARNING: GHDL for mcode is supported only on x86" +	  echo "continuing, but build failure expected (See the README)" +	  ;; +    esac      if test "x$backtrace_lib" != x ; then  	echo "WARNING: --with-backtrace-lib= ignored with mcode"  	backtrace_lib= @@ -205,9 +211,9 @@ fi  # Generate ortho_code-x86-flags  if test $backend = mcode; then      case "$build" in -	*darwin*) ortho_flags="Flags_Macosx" ;; +	*darwin*) ortho_flags="Flags_Macosx${mcode64}" ;;  	*mingw32*) ortho_flags="Flags_Windows" ;; -	*linux*) ortho_flags="Flags_Linux" ;; +	*linux*) ortho_flags="Flags_Linux${mcode64}" ;;  	*) echo "Unsupported $build build for mcode"; exit 1;;      esac      echo "Generate ortho_code-x86-flags.ads" @@ -215,6 +221,11 @@ if test $backend = mcode; then       echo "with Ortho_Code.X86.$ortho_flags;"       echo "package Ortho_Code.X86.Flags renames Ortho_Code.X86.$ortho_flags;"      } > ortho_code-x86-flags.ads +    echo "Generate elf_arch.ads" +    { +	echo "with Elf_Arch${mcode64:-32};" +	echo "package Elf_Arch renames Elf_Arch${mcode64:-32};" +    } > elf_arch.ads  fi  # Generate default_pathes.ads  | 
