aboutsummaryrefslogtreecommitdiff
path: root/sim/common/gennltvals.py
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2023-12-26 22:53:31 -0500
committerMike Frysinger <vapier@gentoo.org>2023-12-26 22:53:31 -0500
commita70dcdebbd5a6822293d893fd40a2129ee621148 (patch)
treedab72ee9ddd98d83d11f0cc75eec82444a394bec /sim/common/gennltvals.py
parentc2289ae34815e7c9048fa141f0551592db9897fa (diff)
downloadgdb-a70dcdebbd5a6822293d893fd40a2129ee621148.zip
gdb-a70dcdebbd5a6822293d893fd40a2129ee621148.tar.gz
gdb-a70dcdebbd5a6822293d893fd40a2129ee621148.tar.bz2
sim: common: pull in newlib extensions for Linux compatibility
Since newlib allows people to opt-in to extra errno names, pull them into our table too. The values don't conflict with each other -- the newlib names & values are distinct from newlib's Linux compatibility.
Diffstat (limited to 'sim/common/gennltvals.py')
-rwxr-xr-xsim/common/gennltvals.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/sim/common/gennltvals.py b/sim/common/gennltvals.py
index 62304a8..2acbb81 100755
--- a/sim/common/gennltvals.py
+++ b/sim/common/gennltvals.py
@@ -142,7 +142,11 @@ def gen_common(output_dir: Path, newlib: Path, cpp: str):
No arch should override these.
"""
- gentvals(output_dir, cpp, 'errno', newlib / 'newlib/libc/include',
+ # Enable Linux errno extensions since the newlib values are designed to
+ # not conflict with each other.
+ gentvals(output_dir,
+ cpp + ' -D__LINUX_ERRNO_EXTENSIONS__',
+ 'errno', newlib / 'newlib/libc/include',
('errno.h', 'sys/errno.h'), 'E[A-Z0-9]*')
gentvals(output_dir, cpp, 'signal', newlib / 'newlib/libc/include',