pkgsrc/mk/wrapper/transform-gcc

172 lines
3.4 KiB
Text
Raw Normal View History

# $NetBSD: transform-gcc,v 1.31 2016/03/12 21:22:04 khorben 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 ;;
# Needed for the GNU configure scripts:
-V |\
-v |\
--version ) transform_pass ;;
# We occasionally override specs to force particular options.
-specs=* |\
-specs ) transform_pass ;;
# GCC extensions.
- |\
-dynamic |\
-export-dynamic |\
2007-02-06 20:35:41 +01:00
-falign-functions=* |\
-falign-loops=* |\
-falign-jumps=* |\
-fexpensive-optimizations |\
-ffast-math |\
2007-02-06 20:35:41 +01:00
-ffloat-store |\
-fhonour-copts |\
-finline-functions |\
-fno-align-* |\
2007-02-06 20:35:41 +01:00
-fno-builtin* |\
-fno-common |\
2006-12-09 13:06:55 +01:00
-fno-implicit-templates |\
2007-02-06 20:35:41 +01:00
-fno-inline-functions |\
-fno-strict-aliasing |\
-fomit-frame-pointer |\
-fPIC |\
2007-09-08 15:37:51 +02:00
-fpic |\
-fPIE |\
-fpie |\
-fpcc-struct-return |\
-freg-struct-return |\
-frename-registers |\
2007-02-06 20:35:41 +01:00
-fsigned-char |\
-fstack-protector |\
-fstack-protector-all |\
2007-02-06 20:35:41 +01:00
-funroll-loops |\
-funsigned-char |\
-fweb |\
-fwrapv |\
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] |\
2007-02-06 20:35:41 +01:00
-MMD |\
-m32 |\
-m64 |\
-mabi=* |\
2007-04-10 05:44:34 +02:00
-march=* |\
2007-02-06 20:35:41 +01:00
-mcpu=* |\
-momit-leaf-frame-pointer |\
-mpreferred-stack-boundary=* |\
-mpush-args |\
2012-01-21 13:05:03 +01:00
-mschedule=* |\
2007-02-06 20:35:41 +01:00
-mieee-fp |\
-O[23s] |\
-pedantic |\
2007-02-06 20:35:41 +01:00
-pedantic-errors |\
-pie |\
-pipe |\
-pthread |\
-print-prog-name=* |\
2007-02-06 20:35:41 +01:00
-print-search-dirs |\
-S |\
-shared |\
-shared-gcc |\
-shared-libgcc |\
-static |\
-std=c99 |\
-std=gnu89 |\
-std=gnu99 |\
-W |\
-W[cLlS],* |\
-Wall |\
-Wbounded |\
2006-12-07 01:32:36 +01:00
-Wcast-align |\
-Wcast-qual |\
2007-02-06 20:35:41 +01:00
-Wchar-subscripts |\
-Wconversion |\
-Wextra |\
-Werror |\
-Werror-implicit-function-declaration |\
-Wformat* |\
-Winline |\
-Wmissing-declarations |\
2007-02-06 20:35:41 +01:00
-Wmissing-format-attribute |\
-Wmissing-prototypes |\
2007-02-06 20:35:41 +01:00
-Wnested-externs |\
-Wno-error |\
2007-02-06 20:35:41 +01:00
-Wno-format-y2k |\
-Wno-format-zero-length |\
-Wno-implicit-int |\
2007-02-06 20:35:41 +01:00
-Wno-import |\
-Wno-inline |\
-Wno-long-long |\
2007-02-06 20:35:41 +01:00
-Wno-sign-compare |\
-Wno-traditional |\
-Wno-undef |\
-Wno-uninitialized |\
-Wno-unused |\
2007-02-21 20:29:56 +01:00
-Wno-unused-parameter |\
-Wno-write-strings |\
-Wparentheses |\
-Wpointer-arith |\
-Wredundant-decls |\
-Wreturn-type |\
-Wshadow |\
-Wsign-compare |\
2007-02-06 20:35:41 +01:00
-Wstrict-aliasing |\
-Wstrict-prototypes |\
-Wswitch |\
-Wtrigraphs |\
-Wunused |\
-Wundef |\
-Wwrite-strings ) transform_pass ;;
2007-02-06 20:35:41 +01:00
# There are some packages suppressing all warnings. We don't want that.
-w ) transform_discard ;;
2006-12-07 01:32:36 +01:00
# Options specific to g++.
2007-02-06 20:35:41 +01:00
-fexceptions |\
2006-12-07 01:32:36 +01:00
-fmessage-length=* |\
-fno-check-new |\
2006-12-07 01:32:36 +01:00
-fno-exceptions |\
-fno-rtti |\
2007-02-06 20:35:41 +01:00
-Wno-non-virtual-dtor |\
-ftemplate-depth=* ) transform_pass ;;
# Options specific to Objective C
-fgnu-runtime |\
-fconstant-string-class=* ) transform_pass ;;
2006-12-07 01:32:36 +01:00
# Old-style rpath specifier, may come from autoconf's AC_PATH_XTRA.
# Our gcc re-orders -R args relative to -Wl,-R specifiers (puts -R
# args at the front of the "ld" invocation), which messes up the relative
# search order. Fix this by rewriting -R to -Wl,-R.
-R* ) transform_to "-Wl,$arg" ;;
# Other compiler's options that have corresponding GCC options.
-Kpic |\
-kpic |\
-KPIC |\
-kPIC ) transform_to "-fPIC" ;;
-mt ) transform_discard ;;
-64 ) transform_to "-m64" ;;
# Ignore SunPRO flags to prevent it from being recognized as a entry point
# option for `ld'.
-errwarn=* |\
-errwarn ) transform_discard_with_warning ;;
# Unknown options.
-* ) transform_pass_with_warning ;;
esac