diff options
author | Laurent GUERBY <laurent@guerby.net> | 2011-07-12 17:23:04 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2011-07-12 17:23:04 +0000 |
commit | 9e9bd455d4cb9df5f0c54858448ebfd699b14f1b (patch) | |
tree | 18042d58d56e687de9c857cb5ad05b8bf282ca29 /gcc/ada/gcc-interface | |
parent | 4d652a1865628038acbfc0b9cab1ef7547d49d40 (diff) | |
download | gcc-9e9bd455d4cb9df5f0c54858448ebfd699b14f1b.zip gcc-9e9bd455d4cb9df5f0c54858448ebfd699b14f1b.tar.gz gcc-9e9bd455d4cb9df5f0c54858448ebfd699b14f1b.tar.bz2 |
prefix.h: Wrap up in extern "C" block.
* prefix.h: Wrap up in extern "C" block.
ada/
* adadecode.c: Wrap up in extern "C" block.
* adadecode.h: Likewise.
* adaint.c: Likewise. Remove 'const' keyword.
* adaint.h: Likewise.
* argv.c: Likewise.
* atree.h: Likewise.
* cio.c: Likewise.
* cstreams.c: Likewise.
* env.c: Likewise.
* exit.c: Likewise.
* fe.h: Likewise.
* final.c: Likewise.
* init.c: Likewise.
* initialize.c: Likewise.
* link.c: Likewise.
* namet.h: Likewise.
* nlists.h: Likewise.
* raise.c: Likewise.
* raise.h: Likewise.
* repinfo.h: Likewise.
* seh_init.c: Likewise.
* targext.c: Likewise.
* tracebak.c: Likewise.
* uintp.h: Likewise.
* urealp.h: Likewise.
* xeinfo.adb: Wrap up generated C code in extern "C" block.
* xsinfo.adb: Likewise.
* xsnamest.adb: Likewise.
* gcc-interface/gadaint.h: Wrap up in extern "C" block.
* gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
* gcc-interface/misc.c: Likewise.
* gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
(GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
ada/targext.o here...
(GNAT_ADA_OBJS): ...and not here.
(GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
(GNATBIND_OBJS): Reorder.
Co-Authored-By: Eric Botcazou <ebotcazou@adacore.com>
From-SVN: r176210
Diffstat (limited to 'gcc/ada/gcc-interface')
-rw-r--r-- | gcc/ada/gcc-interface/Make-lang.in | 22 | ||||
-rw-r--r-- | gcc/ada/gcc-interface/gadaint.h | 10 | ||||
-rw-r--r-- | gcc/ada/gcc-interface/gigi.h | 17 | ||||
-rw-r--r-- | gcc/ada/gcc-interface/misc.c | 8 |
4 files changed, 44 insertions, 13 deletions
diff --git a/gcc/ada/gcc-interface/Make-lang.in b/gcc/ada/gcc-interface/Make-lang.in index d4344cc..c471508 100644 --- a/gcc/ada/gcc-interface/Make-lang.in +++ b/gcc/ada/gcc-interface/Make-lang.in @@ -104,19 +104,19 @@ ADA_TOOLS_FLAGS_TO_PASS=\ "GNATLINK=../../gnatlink" \ "GNATBIND=../../gnatbind" -GCC_LINK=$(CC) -static-libgcc $(LDFLAGS) +GCC_LINK=$(LINKER) $(ALL_LINKERFLAGS) -static-libgcc $(LDFLAGS) # Lists of files for various purposes. # Languages-specific object files for Ada. + # Object files for gnat1 from C sources. -GNAT1_C_OBJS = ada/b_gnat1.o ada/adadecode.o ada/adaint.o ada/cstreams.o \ - ada/cio.o ada/targtyps.o ada/decl.o ada/misc.o ada/utils.o ada/utils2.o \ - ada/trans.o ada/cuintp.o ada/argv.o ada/raise.o ada/init.o ada/tracebak.o \ - ada/initialize.o ada/env.o +GNAT1_C_OBJS = ada/adadecode.o ada/adaint.o ada/argv.o ada/cio.o \ + ada/cstreams.o ada/env.o ada/init.o ada/initialize.o ada/raise.o \ + ada/seh_init.o ada/targext.o ada/tracebak.o ada/cuintp.o ada/decl.o \ + ada/misc.o ada/utils.o ada/utils2.o ada/trans.o ada/targtyps.o # Object files from Ada sources that are used by gnat1 - GNAT_ADA_OBJS = \ ada/a-charac.o \ ada/a-chlat1.o \ @@ -270,7 +270,6 @@ GNAT_ADA_OBJS = \ ada/scng.o \ ada/scos.o \ ada/sdefault.o \ - ada/seh_init.o \ ada/sem.o \ ada/sem_aggr.o \ ada/sem_attr.o \ @@ -320,7 +319,6 @@ GNAT_ADA_OBJS = \ ada/switch.o \ ada/system.o \ ada/table.o \ - ada/targext.o \ ada/targparm.o \ ada/tbuild.o \ ada/tree_gen.o \ @@ -338,24 +336,24 @@ GNAT_ADA_OBJS = \ ada/widechar.o # Object files for gnat executables -GNAT1_ADA_OBJS = $(GNAT_ADA_OBJS) ada/back_end.o ada/gnat1drv.o +GNAT1_ADA_OBJS = $(GNAT_ADA_OBJS) ada/back_end.o ada/gnat1drv.o ada/b_gnat1.o GNAT1_OBJS = $(GNAT1_C_OBJS) $(GNAT1_ADA_OBJS) GNATBIND_OBJS = \ ada/adaint.o \ ada/argv.o \ - ada/exit.o \ ada/cio.o \ ada/cstreams.o \ ada/env.o \ + ada/exit.o \ ada/final.o \ ada/init.o \ ada/initialize.o \ - ada/seh_init.o \ ada/link.o \ - ada/targext.o \ ada/raise.o \ + ada/seh_init.o \ + ada/targext.o \ ada/tracebak.o \ ada/ada.o \ ada/a-clrefi.o \ diff --git a/gcc/ada/gcc-interface/gadaint.h b/gcc/ada/gcc-interface/gadaint.h index 57503f0..ce27a14 100644 --- a/gcc/ada/gcc-interface/gadaint.h +++ b/gcc/ada/gcc-interface/gadaint.h @@ -6,7 +6,7 @@ * * * C Header File * * * - * Copyright (C) 2010, Free Software Foundation, Inc. * + * Copyright (C) 2010-2011, Free Software Foundation, Inc. * * * * GNAT is free software; you can redistribute it and/or modify it under * * terms of the GNU General Public License as published by the Free Soft- * @@ -30,6 +30,14 @@ #ifndef GCC_ADAINT_H #define GCC_ADAINT_H +#ifdef __cplusplus +extern "C" { +#endif + extern char *__gnat_to_canonical_file_spec (char *); +#ifdef __cplusplus +} +#endif + #endif /* GCC_ADAINT_H */ diff --git a/gcc/ada/gcc-interface/gigi.h b/gcc/ada/gcc-interface/gigi.h index c1f1217..8ef6097 100644 --- a/gcc/ada/gcc-interface/gigi.h +++ b/gcc/ada/gcc-interface/gigi.h @@ -199,6 +199,10 @@ struct File_Info_Type Nat Num_Source_Lines; }; +#ifdef __cplusplus +extern "C" { +#endif + /* This is the main program of the back-end. It sets up all the table structures and then generates code. */ extern void gigi (Node_Id gnat_root, int max_gnat_node, @@ -218,6 +222,10 @@ extern void gigi (Node_Id gnat_root, int max_gnat_node, Entity_Id standard_exception_type, Int gigi_operating_mode); +#ifdef __cplusplus +} +#endif + /* GNAT_NODE is the root of some GNAT tree. Return the root of the GCC tree corresponding to that GNAT tree. Normally, no code is generated; we just return an equivalent tree which is used elsewhere to generate @@ -929,6 +937,11 @@ extern int fp_size_to_prec (int size); /* These functions return the basic data type sizes and related parameters about the target machine. */ + +#ifdef __cplusplus +extern "C" { +#endif + extern Pos get_target_bits_per_unit (void); extern Pos get_target_bits_per_word (void); extern Pos get_target_char_size (void); @@ -953,6 +966,10 @@ extern Nat get_target_strict_alignment (void); extern Nat get_target_double_float_alignment (void); extern Nat get_target_double_scalar_alignment (void); +#ifdef __cplusplus +} +#endif + /* Let code know whether we are targetting VMS without need of intrusive preprocessor directives. */ #ifndef TARGET_ABI_OPEN_VMS diff --git a/gcc/ada/gcc-interface/misc.c b/gcc/ada/gcc-interface/misc.c index 92426fd..62e7ac7 100644 --- a/gcc/ada/gcc-interface/misc.c +++ b/gcc/ada/gcc-interface/misc.c @@ -68,12 +68,20 @@ const char **save_argv; extern int gnat_argc; extern char **gnat_argv; +#ifdef __cplusplus +extern "C" { +#endif + /* Declare functions we use as part of startup. */ extern void __gnat_initialize (void *); extern void __gnat_install_SEH_handler (void *); extern void adainit (void); extern void _ada_gnat1drv (void); +#ifdef __cplusplus +} +#endif + /* The parser for the language. For us, we process the GNAT tree. */ static void |