[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Recognize WebAssembly as "wasm32"
From: |
Pip Cet |
Subject: |
Recognize WebAssembly as "wasm32" |
Date: |
Mon, 20 Mar 2017 14:10:52 +0000 |
Hello,
I've been working on porting some GNU utilities to WebAssembly
(http://webassembly.github.io), a virtual architecture, and would like
to begin submitting my binutils changes. For that, I would like config
to recognize wasm32 as an architecture name (as suggested by
http://webassembly.org/docs/c-and-c++/).
So far, I've used wasm32-virtual-wasm32 as a triplet, but I think I
should have been using wasm32-unknown-none, so that's what this patch
recognizes; hopefully, I'll be able to fix other issues arising from
*-*-none another way. (While my port uses glibc, I ran into issues
with architectural assumptions being made for *-*-*-gnu, so I can't
currently use that.)
diff --git a/config.sub b/config.sub
index 87abeab..e008197 100755
--- a/config.sub
+++ b/config.sub
@@ -2,7 +2,7 @@
# Configuration validation subroutine script.
# Copyright 1992-2017 Free Software Foundation, Inc.
-timestamp='2017-02-07'
+timestamp='2017-03-20'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -315,6 +315,7 @@ case $basic_machine in
| ubicom32 \
| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
| visium \
+ | wasm32 \
| we32k \
| x86 | xc16x | xstormy16 | xtensa \
| z8k | z80)
@@ -446,6 +447,7 @@ case $basic_machine in
| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
| vax-* \
| visium-* \
+ | wasm32-* \
| we32k-* \
| x86-* | x86_64-* | xc16x-* | xps100-* \
| xstormy16-* | xtensa*-* \
@@ -1246,6 +1248,9 @@ case $basic_machine in
basic_machine=a29k-wrs
os=-vxworks
;;
+ wasm32)
+ basic_machine=wasm32-unknown
+ ;;
w65*)
basic_machine=w65-wdc
os=-none
diff --git a/testsuite/config-sub.data b/testsuite/config-sub.data
index d4ef23a..6a046ef 100644
--- a/testsuite/config-sub.data
+++ b/testsuite/config-sub.data
@@ -507,6 +507,7 @@ v850e v850e-unknown-none
v850 v850-unknown-none
visium-elf visium-unknown-elf
visium visium-unknown-none
+wasm32 wasm32-unknown-none
we32k we32k-unknown-none
x86_64-cygwin x86_64-pc-cygwin
x86_64-dicos x86_64-pc-dicos
Thanks,
Pip Cet
config.diff
Description: Text document
- Recognize WebAssembly as "wasm32",
Pip Cet <=