summaryrefslogtreecommitdiff
path: root/mk/wrapper/transform-gcc
blob: 6d1866bb55e90daa6a1f67240e39bfd2a38e26f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# $NetBSD: transform-gcc,v 1.7 2006/12/01 21:10:18 rillig Exp $
#
# This file handles the transformations needed for gcc that can be done
# looking at only one argument at a time.
#

transform_setname "transform-gcc"

case $arg in

# Standard options.
-[EcgOos]		|\
-[DILlU]?*		|\
-O[01]			) transform_pass ;;

# GCC extensions.
-fPIC			|\
-M[DFPT]		|\
-O[23s]			|\
-pipe			|\
-pthread		|\
-shared			|\
-static			|\
-std=c99		|\
-std=gnu99		|\
-W			|\
-W[cLlS],*		|\
-Wall			|\
-Wcast-qual		|\
-Wextra			|\
-Werror			|\
-Wformat=[012]		|\
-Wmissing-prototypes	|\
-Wno-error		|\
-Wno-implicit-int	|\
-Wno-long-long		|\
-Wno-traditional	|\
-Wno-uninitialized	|\
-Wno-unused		|\
-Wno-write-strings	|\
-Wpointer-arith		|\
-Wreturn-type		|\
-Wshadow		|\
-Wsign-compare		|\
-Wstrict-prototypes	|\
-Wswitch		|\
-Wwrite-strings		) transform_pass ;;

# Other compiler's options that have corresponding GCC options.
-KPIC			|\
-kPIC			) transform_to "-fPIC" ;;
-mt			) transform_to "-threads" ;;

# Unknown options.
-*			) transform_pass_with_warning ;;

esac