]>
Commit | Line | Data |
---|---|---|
c5f0fe67 | 1 | /* Definitions of default options for config/rs6000 configurations. |
83ffe9cd | 2 | Copyright (C) 1992-2023 Free Software Foundation, Inc. |
c5f0fe67 JM |
3 | |
4 | This file is part of GCC. | |
5 | ||
6 | GCC is free software; you can redistribute it and/or modify it | |
7 | under the terms of the GNU General Public License as published | |
8 | by the Free Software Foundation; either version 3, or (at your | |
9 | option) any later version. | |
10 | ||
11 | GCC is distributed in the hope that it will be useful, but WITHOUT | |
12 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | |
13 | or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public | |
14 | License for more details. | |
15 | ||
16 | Under Section 7 of GPL version 3, you are granted additional | |
17 | permissions described in the GCC Runtime Library Exception, version | |
18 | 3.1, as published by the Free Software Foundation. | |
19 | ||
20 | You should have received a copy of the GNU General Public License and | |
21 | a copy of the GCC Runtime Library Exception along with this program; | |
22 | see the files COPYING3 and COPYING.RUNTIME respectively. If not, see | |
23 | <http://www.gnu.org/licenses/>. */ | |
24 | ||
25 | /* This header needs to be included after any other headers affecting | |
26 | TARGET_DEFAULT. */ | |
27 | ||
78009d9f | 28 | #if TARGET_AIX_OS |
c5f0fe67 JM |
29 | #define OPT_64 "maix64" |
30 | #define OPT_32 "maix32" | |
31 | #else | |
32 | #define OPT_64 "m64" | |
33 | #define OPT_32 "m32" | |
34 | #endif | |
35 | ||
4d967549 MM |
36 | #ifndef OPTION_MASK_64BIT |
37 | #define OPTION_MASK_64BIT 0 | |
c5f0fe67 JM |
38 | #define MASK_64BIT 0 |
39 | #endif | |
40 | ||
4d967549 | 41 | #if TARGET_DEFAULT & OPTION_MASK_64BIT |
9e4b3dd6 | 42 | #define OPT_ARCH64 "!" OPT_32 |
c5f0fe67 JM |
43 | #define OPT_ARCH32 OPT_32 |
44 | #else | |
45 | #define OPT_ARCH64 OPT_64 | |
9e4b3dd6 | 46 | #define OPT_ARCH32 "!" OPT_64 |
c5f0fe67 JM |
47 | #endif |
48 | ||
49 | /* Support for a compile-time default CPU, et cetera. The rules are: | |
50 | --with-cpu is ignored if -mcpu is specified; likewise --with-cpu-32 | |
51 | and --with-cpu-64. | |
b44dd043 JJ |
52 | --with-tune is ignored if -mtune or -mcpu is specified; likewise |
53 | --with-tune-32 and --with-tune-64. | |
c5f0fe67 | 54 | --with-float is ignored if -mhard-float or -msoft-float are |
b44dd043 | 55 | specified. */ |
c5f0fe67 | 56 | #define OPTION_DEFAULT_SPECS \ |
b54214fe | 57 | {"abi", "%{!mabi=elfv*:-mabi=%(VALUE)}" }, \ |
b44dd043 JJ |
58 | {"tune", "%{!mtune=*:%{!mcpu=*:-mtune=%(VALUE)}}" }, \ |
59 | {"tune_32", "%{" OPT_ARCH32 ":%{!mtune=*:%{!mcpu=*:-mtune=%(VALUE)}}}" }, \ | |
60 | {"tune_64", "%{" OPT_ARCH64 ":%{!mtune=*:%{!mcpu=*:-mtune=%(VALUE)}}}" }, \ | |
c5f0fe67 JM |
61 | {"cpu", "%{!mcpu=*:-mcpu=%(VALUE)}" }, \ |
62 | {"cpu_32", "%{" OPT_ARCH32 ":%{!mcpu=*:-mcpu=%(VALUE)}}" }, \ | |
63 | {"cpu_64", "%{" OPT_ARCH64 ":%{!mcpu=*:-mcpu=%(VALUE)}}" }, \ | |
c5f0fe67 | 64 | {"float", "%{!msoft-float:%{!mhard-float:-m%(VALUE)-float}}" } |
2cbe5dd5 JJ |
65 | |
66 | /* rs6000.md uses OPTION_GLIBC unconditionally, while it is defined only in | |
67 | linux{,64}.h. Define fallback for other targets here. */ | |
68 | #ifndef OPTION_GLIBC | |
69 | #define OPTION_GLIBC 0 | |
70 | #endif |