]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gas/configure.tgt
Add support for RISC-V architecture.
[thirdparty/binutils-gdb.git] / gas / configure.tgt
index 4e0d4aa30fabc48f3fef3454c7deff6042d85b4e..3e230cba934db10764bb10e103760f4ebf5b38e4 100644 (file)
@@ -87,6 +87,8 @@ case ${cpu} in
   pj*)                 cpu_type=pj endian=big ;;
   powerpc*le*)         cpu_type=ppc endian=little ;;
   powerpc*)            cpu_type=ppc endian=big ;;
+  riscv32*)            cpu_type=riscv endian=little arch=riscv32 ;;
+  riscv64*)            cpu_type=riscv endian=little arch=riscv64 ;;
   rs6000*)             cpu_type=ppc ;;
   rl78*)               cpu_type=rl78 ;;
   rx)                  cpu_type=rx ;;
@@ -127,11 +129,10 @@ case ${generic_target} in
   alpha-*-osf*)                                fmt=ecoff ;;
   alpha-*-linux*ecoff*)                        fmt=ecoff ;;
   alpha-*-linux-*)                     fmt=elf em=linux ;;
-  alpha-*-netbsd*)                     fmt=elf em=nbsd ;;
-  alpha-*-openbsd*)                    fmt=elf em=obsd ;;
+  alpha-*-netbsd* | alpha-*-openbsd*)  fmt=elf em=nbsd ;;
 
   arc-*-elf*)                          fmt=elf ;;
-  arc*-*-linux-uclibc*)                        fmt=elf bfd_gas=yes ;;
+  arc*-*-linux*)                       fmt=elf bfd_gas=yes ;;
 
   arm-*-aout)                          fmt=aout ;;
   arm-*-coff)                          fmt=coff ;;
@@ -392,6 +393,8 @@ case ${generic_target} in
   ppc-*-kaos*)                         fmt=elf ;;
   ppc-*-lynxos*)                       fmt=elf em=lynx ;;
 
+  riscv*-*-*)                  fmt=elf endian=little em=linux ;;
+
   s390-*-linux-*)                      fmt=elf em=linux ;;
   s390-*-tpf*)                         fmt=elf ;;
 
@@ -489,7 +492,7 @@ case ${generic_target} in
 esac
 
 case ${cpu_type} in
-  aarch64 | alpha | arm | i386 | ia64 | microblaze | mips | ns32k | or1k | or1knd | pdp11 | ppc | sparc | z80 | z8k)
+  aarch64 | alpha | arm | i386 | ia64 | microblaze | mips | ns32k | or1k | or1knd | pdp11 | ppc | riscv | sparc | z80 | z8k)
     bfd_gas=yes
     ;;
 esac
@@ -503,3 +506,12 @@ if test $bfd_gas != yes; then
   echo This target is no longer supported in gas
   exit 1
 fi
+
+case ${cpu_type}-${fmt}-${os} in
+i386-elf-linux*)
+  # Default to compress DWARF debug sections for Linux/x86.
+  if test ${ac_default_compressed_debug_sections} = unset; then
+    ac_default_compressed_debug_sections=yes
+  fi
+  ;;
+esac