2006-11-30 11:01:29 +01:00
|
|
|
# $NetBSD: transform-gcc,v 1.5 2006/11/30 10:01:29 rillig Exp $
|
|
|
|
#
|
|
|
|
# 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 11:01:29 +01:00
|
|
|
-[EcgOos] |\
|
|
|
|
-[DILlU]?* |\
|
|
|
|
-O[01])
|
|
|
|
# Standard options.
|
|
|
|
transform_pass ;;
|
|
|
|
|
|
|
|
-fPIC |\
|
|
|
|
-KPIC |\
|
2006-11-26 14:02:53 +01:00
|
|
|
-kPIC)
|
|
|
|
# Needed for the Solaris imake.
|
|
|
|
transform_to "-fPIC" ;;
|
|
|
|
|
|
|
|
-mt)
|
|
|
|
# Needed on Solaris with SunPro.
|
|
|
|
transform_to "-threads" ;;
|
|
|
|
|
2006-11-30 11:01:29 +01:00
|
|
|
-M[DFPT] |\
|
|
|
|
-O[23s] |\
|
|
|
|
-pthread |\
|
|
|
|
-shared |\
|
|
|
|
-static |\
|
|
|
|
-std=c99 |\
|
|
|
|
-std=gnu99 |\
|
|
|
|
-W |\
|
|
|
|
-W[cLlS],* |\
|
|
|
|
-Wall |\
|
|
|
|
-Wcast-qual |\
|
|
|
|
-Wextra |\
|
|
|
|
-Werror |\
|
|
|
|
-Wformat=[012] |\
|
|
|
|
-Wmissing-prototypes |\
|
|
|
|
-Wno-error |\
|
|
|
|
-Wno-long-long |\
|
|
|
|
-Wno-traditional |\
|
|
|
|
-Wno-uninitialized |\
|
|
|
|
-Wno-unused |\
|
|
|
|
-Wno-write-strings |\
|
|
|
|
-Wpointer-arith |\
|
|
|
|
-Wreturn-type |\
|
|
|
|
-Wshadow |\
|
|
|
|
-Wsign-compare |\
|
|
|
|
-Wstrict-prototypes |\
|
|
|
|
-Wswitch |\
|
2006-11-26 10:56:46 +01:00
|
|
|
-Wwrite-strings)
|
2006-11-26 11:00:04 +01:00
|
|
|
transform_pass ;;
|
|
|
|
|
2006-11-26 10:56:46 +01:00
|
|
|
-*)
|
2006-11-26 11:00:04 +01:00
|
|
|
transform_pass_with_warning ;;
|
2006-11-26 10:56:46 +01:00
|
|
|
esac
|