public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/rust/master] Merge #1596
@ 2022-10-19 19:45 Thomas Schwinge
  0 siblings, 0 replies; only message in thread
From: Thomas Schwinge @ 2022-10-19 19:45 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:3cedc655c2928707612da663211c0802a8ec9319

commit 3cedc655c2928707612da663211c0802a8ec9319
Merge: 9ecbc900874 a02750e8dd5
Author: bors[bot] <26634292+bors[bot]@users.noreply.github.com>
Date:   Wed Oct 19 17:45:47 2022 +0000

    Merge #1596
    
    1596: Add more implementations for TARGET_RUST_OS_INFO r=philberty a=ibuclaw
    
    Pretty much all follow the same template as how darwin was added in the first commit, so mostly uninteresting.
    
    The only slight deviation is with `*-*-linux*`, where rather than putting it in a common `glibc-rust.cc` file, I've instead opted to force each platform have their own source file. So Linux gets a `linux-rust.cc` file, and anyone who wants to add Hurd, kFreeBSD, or kOpenSolaris later can do so by adding a case to this switch with the appropriately named file (i.e: `gnu-rust.cc` for Hurd).
    
    The same can also be said for MinGW targets - `winnt-rust.cc` is explicitly _not_ set for Cygwin, and I'd prefer that whoever does add Cygwin support will create a separate file for it - otherwise you've either got to modify the target headers to add whatever defines you need in order to abstract the two away, or start adding some defines to `tm_rust.h` to expose hints about the target known at configure time.
    
    Linux is also the only implementation that has an `#ifndef` condition, as not all Linux targets include `linux-android.{h,opt}`.
    
    Checked dumps of target_options on a plethora of target configurations, though this list is by no means exhaustive.
    
    ---
    
    <details>
      <summary>i686-dragonflybsd</summary>
    
    ```
    target_pointer_width: "32"
    target_env: ""
    target_vendor: "unknown"
    target_endian: "little"
    target_os: "dragonfly"
    target_family: "unix"
    target_arch: "x86"
    ```
    </details>
    <details>
      <summary>x86_64-dragonflybsd</summary>
    
    ```
    target_pointer_width: "64"
    target_env: ""
    target_vendor: "unknown"
    target_endian: "little"
    target_os: "dragonfly"
    target_family: "unix"
    target_feature: "fxsr"
    target_feature: "sse"
    target_feature: "sse2"
    target_feature: "mmx"
    target_arch: "x86_64"
    ```
    </details>
    <details>
      <summary>aarch64-freebsd12, ia64-freebsd6, riscv64-freebsd12</summary>
    
    ```
    target_pointer_width: "64"
    target_env: ""
    target_vendor: "unknown"
    target_endian: "little"
    target_os: "freebsd"
    target_family: "unix"
    ```
    </details>
    <details>
      <summary>arm-freebsd12</summary>
    
    ```
    target_pointer_width: "32"
    target_env: ""
    target_vendor: "unknown"
    target_endian: "little"
    target_os: "freebsd"
    target_family: "unix"
    ```
    </details>
    <details>
      <summary>i486-freebsd4, i686-freebsd6</summary>
    
    ```
    target_pointer_width: "32"
    target_env: ""
    target_vendor: "unknown"
    target_endian: "little"
    target_os: "freebsd"
    target_family: "unix"
    target_arch: "x86"
    ```
    </details>
    <details>
      <summary>powerpc-freebsd6</summary>
    
    ```
    target_pointer_width: "32"
    target_env: ""
    target_vendor: "unknown"
    target_endian: "big"
    target_os: "freebsd"
    target_family: "unix"
    ```
    </details>
    <details>
      <summary>sparc64-freebsd6</summary>
    
    ```
    target_pointer_width: "64"
    target_env: ""
    target_vendor: "unknown"
    target_endian: "big"
    target_os: "freebsd"
    target_family: "unix"
    ```
    </details>
    <details>
      <summary>x86_64-freebsd6</summary>
    
    ```
    target_pointer_width: "64"
    target_env: ""
    target_vendor: "unknown"
    target_endian: "little"
    target_os: "freebsd"
    target_family: "unix"
    target_feature: "fxsr"
    target_feature: "sse"
    target_feature: "sse2"
    target_feature: "mmx"
    target_arch: "x86_64"
    ```
    </details>
    <details>
      <summary>aarch64-fuchsia</summary>
    
    ```
    target_pointer_width: "64"
    target_env: ""
    target_vendor: "unknown"
    target_endian: "little"
    target_os: "fushsia"
    target_family: "unix"
    ```
    </details>
    <details>
      <summary>x86_64-fuchsia</summary>
    
    ```
    target_pointer_width: "64"
    target_env: ""
    target_vendor: "unknown"
    target_endian: "little"
    target_os: "fushsia"
    target_family: "unix"
    target_feature: "fxsr"
    target_feature: "sse"
    target_feature: "sse2"
    target_feature: "mmx"
    target_arch: "x86_64"
    ```
    </details>
    <details>
      <summary>i686-kfreebsd-gnu</summary>
    
    ```
    target_endian: "little"
    target_pointer_width: "32"
    target_arch: "x86"
    ```
    </details>
    <details>
      <summary>arm-linux-androideabi</summary>
    
    ```
    target_pointer_width: "32"
    target_env: ""
    target_endian: "little"
    target_os: "android"
    target_vendor: "unknown"
    target_family: "unix"
    ```
    </details>
    <details>
      <summary>aarch64-linux-gnu, alpha-linux-gnu, ia64-linux, riscv64-unknown-linux-gnu</summary>
    
    ```
    target_pointer_width: "64"
    target_env: "gnu"
    target_endian: "little"
    target_os: "linux"
    target_vendor: "unknown"
    target_family: "unix"
    ```
    </details>
    <details>
      <summary>am33_2.0-linux-gnu, csky-linux-gnu, mips64el-st-linux-gnu, nios2-linux-gnu, powerpcle-linux, riscv32-unknown-linux-gnu, rx-linux, shle-linux, vax-linux-gnu</summary>
    
    ```
    target_pointer_width: "32"
    target_env: "gnu"
    target_endian: "little"
    target_os: "linux"
    target_vendor: "unknown"
    target_family: "unix"
    ```
    </details>
    <details>
      <summary>arc-linux-uclibc, bfin-linux-uclibc</summary>
    
    ```
    target_pointer_width: "32"
    target_env: "uclibc"
    target_endian: "little"
    target_os: "linux"
    target_vendor: "unknown"
    target_family: "unix"
    ```
    </details>
    <details>
      <summary>arceb-linux-uclibc, or1k-linux-uclibc</summary>
    
    ```
    target_pointer_width: "32"
    target_env: "uclibc"
    target_endian: "big"
    target_os: "linux"
    target_vendor: "unknown"
    target_family: "unix"
    ```
    </details>
    <details>
      <summary>frv-linux, h8300-linux, hppa-linux-gnu, m68k-linux, microblaze-linux, mips64octeon-linux, mipsisa32r2-linux-gnu, mipsisa64r2-linux, mips-linux, mips-mti-linux, powerpc64-linux_altivec, powerpc-linux, s390-linux-gnu, sparc-leon3-linux-gnu, sparc-linux-gnu, xtensa-linux</summary>
    
    ```
    target_pointer_width: "32"
    target_env: "gnu"
    target_endian: "big"
    target_os: "linux"
    target_vendor: "unknown"
    target_family: "unix"
    ```
    </details>
    <details>
      <summary>hppa64-linux-gnu, s390x-linux-gnu, sparc64-linux</summary>
    
    ```
    target_pointer_width: "64"
    target_env: "gnu"
    target_endian: "big"
    target_os: "linux"
    target_vendor: "unknown"
    target_family: "unix"
    ```
    </details>
    <details>
      <summary>i686-pc-linux-gnu, i686-pc-linux</summary>
    
    ```
    target_pointer_width: "32"
    target_env: "gnu"
    target_endian: "little"
    target_os: "linux"
    target_vendor: "unknown"
    target_family: "unix"
    target_arch: "x86"
    ```
    </details>
    <details>
      <summary>or1k-linux-musl</summary>
    
    ```
    target_pointer_width: "32"
    target_env: "musl"
    target_endian: "big"
    target_os: "linux"
    target_vendor: "unknown"
    target_family: "unix"
    ```
    </details>
    <details>
      <summary>i686-mingw32crt</summary>
    
    ```
    target_pointer_width: "32"
    target_env: "gnu"
    target_vendor: "pc"
    target_endian: "little"
    target_os: "windows"
    target_family: "windows"
    target_arch: "x86"
    ```
    </details>
    <details>
      <summary>x86_64-mingw32, x86_64-w64-mingw32</summary>
    
    ```
    target_pointer_width: "64"
    target_env: "gnu"
    target_vendor: "pc"
    target_endian: "little"
    target_os: "windows"
    target_family: "windows"
    target_feature: "fxsr"
    target_feature: "sse"
    target_feature: "sse2"
    target_feature: "mmx"
    target_arch: "x86_64"
    ```
    </details>
    <details>
      <summary>aarch64-netbsd, alpha-netbsd</summary>
    
    ```
    target_pointer_width: "64"
    target_env: ""
    target_vendor: "unknown"
    target_endian: "little"
    target_os: "netbsd"
    target_family: "unix"
    ```
    </details>
    <details>
      <summary>arm-netbsdelf, vax-netbsdelf</summary>
    
    ```
    target_pointer_width: "32"
    target_env: ""
    target_vendor: "unknown"
    target_endian: "little"
    target_os: "netbsd"
    target_family: "unix"
    ```
    </details>
    <details>
      <summary>hppa-netbsd, m68k-netbsdelf, mips-netbsd, powerpc-netbsd, sh-netbsdelf, sparc-netbsdelf</summary>
    
    ```
    target_pointer_width: "32"
    target_env: ""
    target_vendor: "unknown"
    target_endian: "big"
    target_os: "netbsd"
    target_family: "unix"
    ```
    </details>
    <details>
      <summary>i686-netbsdelf9</summary>
    
    ```
    target_pointer_width: "32"
    target_env: ""
    target_vendor: "unknown"
    target_endian: "little"
    target_os: "netbsd"
    target_family: "unix"
    target_arch: "x86"
    ```
    </details>
    <details>
      <summary>sparc64-netbsd</summary>
    
    ```
    target_pointer_width: "64"
    target_env: ""
    target_vendor: "unknown"
    target_endian: "big"
    target_os: "netbsd"
    target_family: "unix"
    ```
    </details>
    <details>
      <summary>x86_64-netbsd</summary>
    
    ```
    target_pointer_width: "64"
    target_env: ""
    target_vendor: "unknown"
    target_endian: "little"
    target_os: "netbsd"
    target_family: "unix"
    target_feature: "fxsr"
    target_feature: "sse"
    target_feature: "sse2"
    target_feature: "mmx"
    target_arch: "x86_64"
    ```
    </details>
    <details>
      <summary>alpha-openbsd</summary>
    
    ```
    target_pointer_width: "64"
    target_env: ""
    target_vendor: "unknown"
    target_endian: "little"
    target_os: "openbsd"
    target_family: "unix"
    ```
    </details>
    <details>
      <summary>bfin-openbsd</summary>
    
    ```
    target_pointer_width: "32"
    target_env: ""
    target_vendor: "unknown"
    target_endian: "little"
    target_os: "openbsd"
    target_family: "unix"
    ```
    </details>
    <details>
      <summary>i686-openbsd</summary>
    
    ```
    target_pointer_width: "32"
    target_env: ""
    target_vendor: "unknown"
    target_endian: "little"
    target_os: "openbsd"
    target_family: "unix"
    target_arch: "x86"
    ```
    </details>
    <details>
      <summary>sparc64-openbsd</summary>
    
    ```
    target_pointer_width: "64"
    target_env: ""
    target_vendor: "unknown"
    target_endian: "big"
    target_os: "openbsd"
    target_family: "unix"
    ```
    </details>
    <details>
      <summary>x86_64-openbsd</summary>
    
    ```
    target_pointer_width: "64"
    target_env: ""
    target_vendor: "unknown"
    target_endian: "little"
    target_os: "openbsd"
    target_family: "unix"
    target_feature: "fxsr"
    target_feature: "sse"
    target_feature: "sse2"
    target_feature: "mmx"
    target_arch: "x86_64"
    ```
    </details>
    <details>
      <summary>aarch64-wrs-vxworks</summary>
    
    ```
    target_pointer_width: "64"
    target_env: "gnu"
    target_vendor: "wrs"
    target_endian: "little"
    target_os: "vxworks"
    target_family: "unix"
    ```
    </details>
    <details>
      <summary>arm-wrs-vxworks7</summary>
    
    ```
    target_pointer_width: "32"
    target_env: "gnu"
    target_vendor: "wrs"
    target_endian: "little"
    target_os: "vxworks"
    target_family: "unix"
    ```
    </details>
    <details>
      <summary>i686-wrs-vxworks, i686-wrs-vxworksae</summary>
    
    ```
    target_pointer_width: "32"
    target_env: "gnu"
    target_vendor: "wrs"
    target_endian: "little"
    target_os: "vxworks"
    target_family: "unix"
    target_arch: "x86"
    ```
    </details>
    <details>
      <summary>mips-wrs-vxworks, powerpc-wrs-vxworksae, powerpc-wrs-vxworks, powerpc-wrs-vxworksmils, sh-wrs-vxworks, sparc-wrs-vxworks</summary>
    
    ```
    target_pointer_width: "32"
    target_env: "gnu"
    target_vendor: "wrs"
    target_endian: "big"
    target_os: "vxworks"
    target_family: "unix"
    ```
    </details>
    <details>
      <summary>arm-uclinux_eabi, bfin-uclinux, c6x-uclinux</summary>
    
    ```
    target_endian: "little"
    target_pointer_width: "32"
    ```
    </details>
    <details>
      <summary>lm32-uclinux, m68k-uclinux, moxie-uclinux, xtensa-uclinux</summary>
    
    ```
    target_endian: "big"
    target_pointer_width: "32"
    ```
    </details>
    
    Co-authored-by: Iain Buclaw <ibuclaw@gdcproject.org>

Diff:

 gcc/config.gcc               | 24 +++++++++++++++++++
 gcc/config/dragonfly-rust.cc | 40 +++++++++++++++++++++++++++++++
 gcc/config/freebsd-rust.cc   | 40 +++++++++++++++++++++++++++++++
 gcc/config/fuchsia-rust.cc   | 40 +++++++++++++++++++++++++++++++
 gcc/config/linux-rust.cc     | 57 ++++++++++++++++++++++++++++++++++++++++++++
 gcc/config/netbsd-rust.cc    | 40 +++++++++++++++++++++++++++++++
 gcc/config/openbsd-rust.cc   | 40 +++++++++++++++++++++++++++++++
 gcc/config/sol2-rust.cc      | 40 +++++++++++++++++++++++++++++++
 gcc/config/t-dragonfly       |  4 ++++
 gcc/config/t-freebsd         |  4 ++++
 gcc/config/t-fuchsia         | 21 ++++++++++++++++
 gcc/config/t-linux           |  4 ++++
 gcc/config/t-netbsd          |  4 ++++
 gcc/config/t-openbsd         |  5 ++++
 gcc/config/t-sol2            |  5 ++++
 gcc/config/t-vxworks         |  4 ++++
 gcc/config/t-winnt           |  4 ++++
 gcc/config/vxworks-rust.cc   | 40 +++++++++++++++++++++++++++++++
 gcc/config/winnt-rust.cc     | 40 +++++++++++++++++++++++++++++++
 19 files changed, 456 insertions(+)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-10-19 19:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-19 19:45 [gcc/devel/rust/master] Merge #1596 Thomas Schwinge

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).