xref: /illumos-gate/usr/src/test/libc-tests/cfg/compilation.cfg (revision dd72704bd9e794056c558153663c739e2012d721)
1#
2# This file and its contents are supplied under the terms of the
3# Common Development and Distribution License ("CDDL"), version 1.0.
4# You may only use this file in accordance with the terms of version
5# 1.0 of the CDDL.
6#
7# A full copy of the text of the CDDL should have accompanied this
8# source.  A copy of the CDDL is also available via the Internet at
9# http://www.illumos.org/license/CDDL.
10#
11
12#
13# Copyright 2015 Garrett D'Amore <garrett@damore.org>
14# Copyright 2016 Joyent, Inc.
15#
16
17#
18# Compilation environments.
19#
20# Each compilation environment is declared using the keyword "env", like
21# this:
22#
23# env | <name> | <std> | <defs>
24#
25# <name> is just a symbolic name for environment.
26# <std>  indicates either c89 or c99, i.e. which C standard to compile
27#        under.  This infuences choice of compiler and switches.
28# <defs> is a list of CPP style -D or -U flags to define C preprocessor
29#        symbols.
30#
31# Groups of compilation environments can be named, using the "env_group"
32# keyword (this can also be used to create aliases):
33#
34# env_group | <name> | <envs>
35#
36# <name> is a name for the group or alias
37# <envs> is a whitespace separated list of previously declared environments
38#        or environment groups (or aliases).
39#
40
41env | XPG3		| c89 | -D_XOPEN_SOURCE
42env | XPG4		| c89 | -D_XOPEN_SOURCE -D_XOPEN_VERSION=4
43env | SUSv1		| c89 | -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1
44env | SUSv2		| c89 | -D_XOPEN_SOURCE=500
45env | SUSv3		| c99 | -D_XOPEN_SOURCE=600
46env | SUSv4		| c99 | -D_XOPEN_SOURCE=700
47env | POSIX-1990	| c89 | -D_POSIX_SOURCE
48env | POSIX-1992	| c89 | -D_POSIX_SOURCE -D_POSIX_C_SOURCE=2
49env | POSIX-1993	| c89 | -D_POSIX_C_SOURCE=199309L
50env | POSIX-1995	| c89 | -D_POSIX_C_SOURCE=199506L
51env | POSIX-2001	| c99 | -D_POSIX_C_SOURCE=200112L
52env | POSIX-2008	| c99 | -D_POSIX_C_SOURCE=200809L
53env | C90		| c89 |
54env | C99		| c99 |
55env | C11		| c11 |
56
57#
58# These are ordered from less inclusive (most recent) to most inclusive.
59# This allows for us to "include" by reference.
60#
61env_group | POSIX-2008+	| POSIX-2008
62env_group | POSIX-2001+	| POSIX-2008+ POSIX-2001
63env_group | POSIX-1995+ | POSIX-2001+ POSIX-1995
64env_group | POSIX-1993+ | POSIX-1995+ POSIX-1993
65env_group | POSIX-1992+ | POSIX-1993+ POSIX-1992
66env_group | POSIX-1990+ | POSIX-1992+ POSIX-1990
67env_group | POSIX+	| POSIX-1990+
68env_group | SUSv4+	| SUSv4 POSIX-2008+
69env_group | SUSv3+	| SUSv3 SUSv4+ POSIX-2001+
70env_group | SUSv2+	| SUSv2 SUSv3+
71env_group | SUSv1+	| SUSv1 SUSv2+
72env_group | SUS+	| SUSv1+
73env_group | XPG4+	| XPG4 SUSv1+
74env_group | XPG3+	| XPG3 XPG4+
75env_group | C99+	| C99 C11 POSIX-2001+ SUSv3+
76env_group | STDC	| C90 C99 C11
77env_group | C+		| STDC POSIX+ SUS+
78env_group | ALL		| C+
79
80#
81# Aliases.
82#
83env_group | XPG4v2	| SUSv1
84env_group | XPG4v2+	| SUSv1+
85env_group | XPG5	| SUSv2
86env_group | XPG5+	| SUSv2+
87env_group | XPG6	| SUSv3
88env_group | XPG6+	| SUSv3+
89env_group | XPG7	| SUSv4
90env_group | XPG7+	| SUSv4+
91