aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorDavid E. O'Brien <obrien@FreeBSD.org>2002-09-12 16:05:56 +0000
committerDavid E. O'Brien <obrien@FreeBSD.org>2002-09-12 16:05:56 +0000
commitb9cab93186b857125372c610a6baa021ca1ed780 (patch)
treee61537c64fc23b92256dada8886b798d34abbf79 /contrib
parent1ca49705617f1609ac656c235c1aa13d6d78ba97 (diff)
downloadsrc-b9cab93186b857125372c610a6baa021ca1ed780.tar.gz
src-b9cab93186b857125372c610a6baa021ca1ed780.zip
Try to detect support for the `long long' type so that ANSI-C[89] clean
code will know not to try to use `long long'. Unfortunately the GCC spec parser will not allow us to properly detect the "iso9899:1990" and "iso9899:199409" forms of the acceptable -std= arguments, because of the ':' in the -std argument. :-( I have left them in the spec as a place holder in hopes someone knows a way to make the detection of them work. Desired by: wollman
Notes
Notes: svn path=/head/; revision=103258
Diffstat (limited to 'contrib')
-rw-r--r--contrib/gcc/config/freebsd-spec.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/contrib/gcc/config/freebsd-spec.h b/contrib/gcc/config/freebsd-spec.h
index 888302894591..517a3842e449 100644
--- a/contrib/gcc/config/freebsd-spec.h
+++ b/contrib/gcc/config/freebsd-spec.h
@@ -1,3 +1,10 @@
+/*
+ %{!ansi: \
+ %{!std=*:-D_LONGLONG} \
+ %{std=gnu*:-D_LONGLONG} } \
+ %{std=c99:-D_LONGLONG} \
+
+*/
/* Base configuration file for all FreeBSD targets.
Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
@@ -90,7 +97,12 @@ Boston, MA 02111-1307, USA. */
/* Provide a CPP_SPEC appropriate for FreeBSD. We just deal with the GCC
- option `-posix', and PIC issues. */
+ option `-posix', and PIC issues. Try to detect support for the
+ `long long' type. Unfortunately the GCC spec parser will not allow us
+ to properly detect the "iso9899:1990" and "iso9899:199409" forms of
+ -std=c89. Because of the ':' in the -std argument. :-( I have left
+ them in the spec as a place holder in hopes someone knows a way to make
+ the detection of them work. */
#define FBSD_CPP_SPEC " \
%(cpp_cpu) \
@@ -98,6 +110,7 @@ Boston, MA 02111-1307, USA. */
%{munderscores: -D__UNDERSCORES__} \
%{maout: %{!mno-underscores: -D__UNDERSCORES__}} \
%{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} \
+ %{!ansi:%{!std=c89:%{!std=iso9899.1990:%{!std=iso9899.199409:-D_LONGLONG}}}} \
%{posix:-D_POSIX_SOURCE}"
/* Provide a STARTFILE_SPEC appropriate for FreeBSD. Here we add