gcc/config: Drop cdecl and stdcall built-in defines

Droped the `__cdecl` and `__stdcall` built-in macros except for
32-bit i386 compilation.

These macros refer to calling conventions that are specific to
32-bit x86 and have no meaning for other architectures. Using them
does nothing except producing a compiler warning.

These macros were present in BeOS times but only for i386. At the
time of writing, they are not used anywhere throughout the Haiku
source tree, and some HaikuPorts recipes even have to provide
workarounds for these macros' prescence.

Change-Id: I70369a64a71d8e29ccc0bd6282ba93832c1a6adf
Reviewed-on: https://review.haiku-os.org/c/buildtools/+/6384
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: Niels Sascha Reedijk <niels.reedijk@gmail.com>
This commit is contained in:
Trung Nguyen 2023-05-08 18:49:58 +10:00 committed by Niels Sascha Reedijk
parent a370f9b4e0
commit a877b4dce9
6 changed files with 2 additions and 12 deletions

View File

@ -26,8 +26,6 @@
do \
{ \
builtin_define ("__HAIKU__"); \
builtin_define ("__stdcall=__attribute__((__stdcall__))"); \
builtin_define ("__cdecl=__attribute__((__cdecl__))"); \
builtin_define ("__STDC_ISO_10646__=201103L"); \
builtin_assert ("system=haiku"); \
} \

View File

@ -53,8 +53,6 @@
builtin_define ("__HAIKU__"); \
builtin_define ("__ARM__"); \
builtin_define ("__arm__"); \
builtin_define ("__stdcall=__attribute__((__stdcall__))"); \
builtin_define ("__cdecl=__attribute__((__cdecl__))"); \
builtin_define ("__STDC_ISO_10646__=201103L"); \
builtin_assert ("system=haiku"); \
TARGET_BPABI_CPP_BUILTINS(); \

View File

@ -42,9 +42,9 @@ Boston, MA 02111-1307, USA. */
{ \
builtin_define ("__INTEL__"); \
builtin_define ("__X86__"); \
} \
builtin_define ("__stdcall=__attribute__((__stdcall__))"); \
builtin_define ("__cdecl=__attribute__((__cdecl__))"); \
} \
builtin_define ("__STDC_ISO_10646__=201103L"); \
builtin_assert ("system=haiku"); \
} \

View File

@ -69,8 +69,6 @@ Boston, MA 02110-1301, USA. */
builtin_define ("__M68K__"); \
builtin_define_std ("mc68000"); \
builtin_define_std ("mc68020"); \
builtin_define ("__stdcall=__attribute__((__stdcall__))"); \
builtin_define ("__cdecl=__attribute__((__cdecl__))"); \
builtin_define ("__STDC_ISO_10646__=201103L"); \
builtin_assert ("system=haiku"); \
} \

View File

@ -27,8 +27,6 @@ Boston, MA 02111-1307, USA. */
builtin_define ("__MIPS__"); \
builtin_define ("__MIPSEL__"); \
builtin_define ("_MIPSEL_"); \
builtin_define ("__stdcall=__attribute__((__stdcall__))"); \
builtin_define ("__cdecl=__attribute__((__cdecl__))"); \
builtin_define ("__STDC_ISO_10646__=201103L"); \
builtin_assert ("system=haiku"); \
if (flag_pic) \

View File

@ -35,8 +35,6 @@ Boston, MA 02111-1307, USA. */
builtin_define ("__HAIKU__"); \
builtin_define ("__POWERPC__"); \
builtin_define ("__powerpc__"); \
builtin_define ("__stdcall=__attribute__((__stdcall__))"); \
builtin_define ("__cdecl=__attribute__((__cdecl__))"); \
builtin_define ("__STDC_ISO_10646__=201103L"); \
builtin_assert ("system=haiku"); \
builtin_assert ("cpu=powerpc"); \