2006-12-10 01:18:17 +01:00
|
|
|
# $NetBSD: transform-gcc,v 1.10 2006/12/10 00:18:17 rillig Exp $
|
2006-11-30 11:01:29 +01:00
|
|
|
#
|
|
|
|
# This file handles the transformations needed for gcc that can be done
|
|
|
|
# looking at only one argument at a time.
|
2006-11-26 10:56:46 +01:00
|
|
|
#
|
|
|
|
|
|
|
|
transform_setname "transform-gcc"
|
2006-11-26 11:00:04 +01:00
|
|
|
|
2006-11-26 10:56:46 +01:00
|
|
|
case $arg in
|
2006-11-26 14:02:53 +01:00
|
|
|
|
2006-11-30 12:34:23 +01:00
|
|
|
# Standard options.
|
2006-11-30 11:01:29 +01:00
|
|
|
-[EcgOos] |\
|
|
|
|
-[DILlU]?* |\
|
2006-11-30 12:34:23 +01:00
|
|
|
-O[01] ) transform_pass ;;
|
2006-11-30 11:01:29 +01:00
|
|
|
|
2006-11-30 12:34:23 +01:00
|
|
|
# GCC extensions.
|
2006-11-30 11:01:29 +01:00
|
|
|
-fPIC |\
|
2006-12-09 13:06:55 +01:00
|
|
|
-fno-implicit-templates |\
|
2006-12-07 01:32:36 +01:00
|
|
|
-ggdb |\
|
2006-12-10 01:18:17 +01:00
|
|
|
-M |\
|
2006-12-09 13:06:55 +01:00
|
|
|
-M[DFMPT] |\
|
2006-11-30 11:01:29 +01:00
|
|
|
-O[23s] |\
|
2006-12-01 22:10:18 +01:00
|
|
|
-pipe |\
|
2006-11-30 11:01:29 +01:00
|
|
|
-pthread |\
|
|
|
|
-shared |\
|
|
|
|
-static |\
|
|
|
|
-std=c99 |\
|
|
|
|
-std=gnu99 |\
|
|
|
|
-W |\
|
|
|
|
-W[cLlS],* |\
|
|
|
|
-Wall |\
|
2006-12-07 01:32:36 +01:00
|
|
|
-Wcast-align |\
|
2006-11-30 11:01:29 +01:00
|
|
|
-Wcast-qual |\
|
|
|
|
-Wextra |\
|
|
|
|
-Werror |\
|
|
|
|
-Wformat=[012] |\
|
|
|
|
-Wmissing-prototypes |\
|
|
|
|
-Wno-error |\
|
2006-12-01 22:10:18 +01:00
|
|
|
-Wno-implicit-int |\
|
2006-11-30 11:01:29 +01:00
|
|
|
-Wno-long-long |\
|
|
|
|
-Wno-traditional |\
|
|
|
|
-Wno-uninitialized |\
|
|
|
|
-Wno-unused |\
|
|
|
|
-Wno-write-strings |\
|
|
|
|
-Wpointer-arith |\
|
|
|
|
-Wreturn-type |\
|
|
|
|
-Wshadow |\
|
|
|
|
-Wsign-compare |\
|
|
|
|
-Wstrict-prototypes |\
|
|
|
|
-Wswitch |\
|
2006-11-30 12:34:23 +01:00
|
|
|
-Wwrite-strings ) transform_pass ;;
|
|
|
|
|
2006-12-07 01:32:36 +01:00
|
|
|
# Options specific to g++.
|
|
|
|
-fmessage-length=* |\
|
|
|
|
-fno-exceptions |\
|
|
|
|
-fno-rtti ) transform_pass ;;
|
|
|
|
|
2006-11-30 12:34:23 +01:00
|
|
|
# Other compiler's options that have corresponding GCC options.
|
|
|
|
-KPIC |\
|
|
|
|
-kPIC ) transform_to "-fPIC" ;;
|
|
|
|
-mt ) transform_to "-threads" ;;
|
|
|
|
|
|
|
|
# Unknown options.
|
|
|
|
-* ) transform_pass_with_warning ;;
|
2006-11-26 11:00:04 +01:00
|
|
|
|
2006-11-26 10:56:46 +01:00
|
|
|
esac
|