From a95be2d47a4e851e44f04765e549e34c43b2f006 Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Thu, 1 Sep 2011 15:37:13 +0200 Subject: [PATCH] [multiple changes] 2011-09-01 Vincent Celier * ug_words: Add /MULTI_UNIT_INDEX= -> -gnateI * vms_data.ads: Add new VMS qualifier equivalent for -gnateInnn 2011-09-01 Nicolas Roche * adaint.c (__gnat_tmp_name): Don't use tmpnam function from the system on VxWorks in kernel mode. From-SVN: r178415 --- gcc/ada/ChangeLog | 10 ++++++++++ gcc/ada/adaint.c | 17 +++++++++++++++++ gcc/ada/ug_words | 2 ++ gcc/ada/vms_data.ads | 14 +++++++------- 4 files changed, 36 insertions(+), 7 deletions(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 7a2516e29b3..373f901308f 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,13 @@ +2011-09-01 Vincent Celier + + * ug_words: Add /MULTI_UNIT_INDEX= -> -gnateI + * vms_data.ads: Add new VMS qualifier equivalent for -gnateInnn + +2011-09-01 Nicolas Roche + + * adaint.c (__gnat_tmp_name): Don't use tmpnam function from the system + on VxWorks in kernel mode. + 2011-09-01 Jose Ruiz * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use the linux diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c index 26c62890aaf..adc702a23f9 100644 --- a/gcc/ada/adaint.c +++ b/gcc/ada/adaint.c @@ -1240,6 +1240,23 @@ __gnat_tmp_name (char *tmp_filename) sprintf (tmp_filename, "%s/gnat-XXXXXX", tmpdir); close (mkstemp(tmp_filename)); +#elif defined (__vxworks) && !(defined (__RTP__) || defined (VTHREADS)) + int index; + char * pos; + ushort_t t; + static ushort_t seed = 0; /* used to generate unique name */ + + /* generate unique name */ + strcpy (tmp_filename, "tmp"); + + /* fill up the name buffer from the last position */ + index = 5; + pos = tmp_filename + strlen (tmp_filename) + index; + *pos = '\0'; + + seed++; + for (t = seed; 0 <= --index; t >>= 3) + *--pos = '0' + (t & 07); #else tmpnam (tmp_filename); #endif diff --git a/gcc/ada/ug_words b/gcc/ada/ug_words index eb0a57bbc4a..d92b89c0cc8 100644 --- a/gcc/ada/ug_words +++ b/gcc/ada/ug_words @@ -63,6 +63,7 @@ gcc -c ^ GNAT COMPILE -gnateD ^ /SYMBOL_PREPROCESSING -gnatef ^ /FULL_PATH_IN_BRIEF_MESSAGES -gnateG ^ /GENERATE_PROCESSED_SOURCE +-gnateI ^ /MULTI_UNIT_INDEX= -gnatem ^ /MAPPING_FILE -gnatep ^ /DATA_PREPROCESSING -gnateP ^ /CATEGORIZATION_WARNINGS @@ -229,3 +230,4 @@ stderr ^ SYS$ERROR -O3 ^ /OPTIMIZE=INLINING -H32 ^ /32_MALLOC -H64 ^ /64_MALLOC +-Wall ^ /WARNINGS=ALL_GCC diff --git a/gcc/ada/vms_data.ads b/gcc/ada/vms_data.ads index b742c69265b..1da9855245a 100644 --- a/gcc/ada/vms_data.ads +++ b/gcc/ada/vms_data.ads @@ -1926,6 +1926,12 @@ package VMS_Data is -- When using a project file, GNAT MAKE creates a temporary mapping file -- and communicates it to the compiler using this switch. + S_GCC_Multi : aliased constant S := "/MULTI_UNIT_INDEX=#" & + "-gnateI#"; + -- /MULTI_UNIT_INDEX=nnn + -- + -- Specify the index of the unit to compile in a multi-unit source file. + S_GCC_Mess : aliased constant S := "/MESSAGES_PROJECT_FILE=" & "DEFAULT " & "-vP0 " & @@ -3391,12 +3397,6 @@ package VMS_Data is -- -- Inhibit all warning messages of the GCC back-end. - S_GCC_All_Back : aliased constant S := "/ALL_BACK_END_WARNINGS " & - "-Wall"; - -- /ALL_BACK_END_WARNINGS - -- - -- Activate all warning messages of the GCC back-end. - S_GCC_Wide : aliased constant S := "/WIDE_CHARACTER_ENCODING=" & "BRACKETS " & "-gnatWb " & @@ -3585,6 +3585,7 @@ package VMS_Data is S_GCC_Output 'Access, S_GCC_Machine 'Access, S_GCC_Mapping 'Access, + S_GCC_Multi 'Access, S_GCC_Mess 'Access, S_GCC_Nesting 'Access, S_GCC_Noadc 'Access, @@ -3627,7 +3628,6 @@ package VMS_Data is S_GCC_Wide 'Access, S_GCC_WideX 'Access, S_GCC_No_Back 'Access, - S_GCC_All_Back'Access, S_GCC_Xdebug 'Access, S_GCC_Lxdebug 'Access, S_GCC_Xref 'Access);