From 27d9411dfcda1833855d6240e3693a7df12c12fe Mon Sep 17 00:00:00 2001
From: Fred Hornsey
- Building Shared Libraries for VxWorks.
# include "ace/config-vxworks5.x.h"
#endif
ACE_ROOT
, CPP_LOCATION
,
+
ACE_ROOT
, TAO_IDL_PREPROCESSOR
,
WIND_BASE
, and WIND_HOST_TYPE
environment
variables.
@@ -1411,7 +1411,7 @@
ACE_wrappers/apps/gperf/src
.
CPP_LOCATION=/Program Files/DevStudio/VC/bin/CL.exe +TAO_IDL_PREPROCESSOR=/Program Files/DevStudio/VC/bin/CL.exe cd $TAO_ROOT/tao /gnuwin32/b18/H-i386-cygwin32/bin/make
CPP_LOCATION=/Program Files/DevStudio/VC/bin/CL.exe +TAO_IDL_PREPROCESSOR=/Program Files/DevStudio/VC/bin/CL.exe cd $TAO_ROOT/orbsvcs/orbsvcs /gnuwin32/b18/H-i386-cygwin32/bin/make@@ -1528,7 +1528,7 @@Jaffar Shaikh's SHELL=/bin/sh.exe TERM=pcbios TAO_ROOT=/Corba/ACE_wrapper/Tao -CPP_LOCATION=/Program Files/Microsoft Visual Studio/VC98/Bin/CL.exe +TAO_IDL_PREPROCESSOR=/Program Files/Microsoft Visual Studio/VC98/Bin/CL.exe GCC_EXEC_PREFIX=/tornado/host/x86-win32/lib/gcc-lib/ WIND_HOST_TYPE=x86-win32 PERL_PATH=/perl/bin/perl.exe diff --git a/TAO/NEWS b/TAO/NEWS index f8bc2bdb513f6..de08bbf5021e1 100644 --- a/TAO/NEWS +++ b/TAO/NEWS @@ -4,6 +4,12 @@ USER VISIBLE CHANGES BETWEEN TAO-2.5.12 and TAO-3.0.0 . C++11 is now a mandatory compiler feature which is required for TAO +. TAO_IDL: + + . Support for the long deprecated `CPP_LOCATION` and + `TAO_IDL_DEFAULT_CPP_FLAGS` environment variables has been removed; replace + with `TAO_IDL_PREPROCESSOR` and `TAO_IDL_PREPROCESSOR` respectively. + USER VISIBLE CHANGES BETWEEN TAO-2.5.11 and TAO-2.5.12 ====================================================== diff --git a/TAO/TAO_IDL/fe/fe_init.cpp b/TAO/TAO_IDL/fe/fe_init.cpp index 24c8284bf4d10..afd950dd63d06 100644 --- a/TAO/TAO_IDL/fe/fe_init.cpp +++ b/TAO/TAO_IDL/fe/fe_init.cpp @@ -491,30 +491,13 @@ FE_get_cpp_loc_from_env () // Set cpp_loc to the built in location, unless it has been overriden by // environment variables. - if (preprocessor != 0) + if (preprocessor) { cpp_loc = preprocessor; } else { - // Check for the deprecated CPP_LOCATION environment variable - ACE_Env_Value
cpp_path (ACE_TEXT ("CPP_LOCATION"), - (char *) nullptr); - - if (cpp_path != 0) - { - ACE_ERROR ((LM_WARNING, - "WARNING: The environment variable " - "CPP_LOCATION has been deprecated.\n" - " Please use TAO_IDL_PREPROCESSOR " - "instead.\n")); - - cpp_loc = cpp_path; - } - else - { - cpp_loc = idl_global->cpp_location (); - } + cpp_loc = idl_global->cpp_location (); } return cpp_loc; @@ -523,35 +506,5 @@ FE_get_cpp_loc_from_env () const char * FE_get_cpp_args_from_env () { - const char *cpp_args = nullptr; - - // Added some customizable preprocessor options - ACE_Env_Value args1 (ACE_TEXT ("TAO_IDL_PREPROCESSOR_ARGS"), - (char *) nullptr); - - if (args1 != 0) - { - cpp_args = args1; - } - else - { - // Check for the deprecated TAO_IDL_DEFAULT_CPP_FLAGS environment - // variable. - ACE_Env_Value args2 (ACE_TEXT ("TAO_IDL_DEFAULT_CPP_FLAGS"), - (char *) nullptr); - - if (args2 != 0) - { - ACE_ERROR ((LM_WARNING, - "Warning: The environment variable " - "TAO_IDL_DEFAULT_CPP_FLAGS has been " - "deprecated.\n" - " Please use " - "TAO_IDL_PREPROCESSOR_ARGS instead.\n")); - - cpp_args = args2; - } - } - - return cpp_args; + return ACE_Env_Value (ACE_TEXT ("TAO_IDL_PREPROCESSOR_ARGS"), nullptr); } diff --git a/TAO/docs/compiler.html b/TAO/docs/compiler.html index c12076ec35c52..89753e4f1a881 100644 --- a/TAO/docs/compiler.html +++ b/TAO/docs/compiler.html @@ -157,12 +157,6 @@ Generated Files
by setting the environment variables TAO_IDL_PREPROCESSOR and TAO_IDL_PREPROCESSOR_ARGS. -In previous versions, the environment variables CPP_LOCATION and -TAO_IDL_DEFAULT_CPP_FLAGS were used for this purpose. Both will still work, -but TAO_IDL will display a deprecation warning if it detects one of these. -It is possible that support for these old variables will be removed in a -future version of TAO.
-If ACE_ROOT or TAO_ROOT are defined, then TAO_IDL will use them to include the $(ACE_ROOT)/TAO/tao or $(TAO_ROOT)/tao directories. This is to allow TAO_IDL to automatically find From 7c6b0870f3a1a3dac507faad60d894a3dc363501 Mon Sep 17 00:00:00 2001 From: Fred Hornsey
Date: Sat, 26 Dec 2020 01:02:38 -0600 Subject: [PATCH 2/8] TAO_IDL: Make IDL 4 the Default --- TAO/NEWS | 3 +++ TAO/TAO_IDL/include/idl_version.h | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/TAO/NEWS b/TAO/NEWS index de08bbf5021e1..7575b8ab9b7c1 100644 --- a/TAO/NEWS +++ b/TAO/NEWS @@ -6,6 +6,9 @@ USER VISIBLE CHANGES BETWEEN TAO-2.5.12 and TAO-3.0.0 . TAO_IDL: + . IDL 4 is now the default IDL version. Note that IDL 4 support is still + incomplete. + . Support for the long deprecated `CPP_LOCATION` and `TAO_IDL_DEFAULT_CPP_FLAGS` environment variables has been removed; replace with `TAO_IDL_PREPROCESSOR` and `TAO_IDL_PREPROCESSOR` respectively. diff --git a/TAO/TAO_IDL/include/idl_version.h b/TAO/TAO_IDL/include/idl_version.h index 03255a8896207..1659fc745ee6f 100644 --- a/TAO/TAO_IDL/include/idl_version.h +++ b/TAO/TAO_IDL/include/idl_version.h @@ -50,7 +50,7 @@ enum SpecificIdlVersion * This is so that BE can control the version without overriding idl_version_ * directly and making --default-idl-version incorrect. */ -const SpecificIdlVersion DEFAULT_DEFAULT_IDL_VERSION = IDL_VERSION_3; +const SpecificIdlVersion DEFAULT_DEFAULT_IDL_VERSION = IDL_VERSION_4; /** * Class Operations involving SpecificIdlVersion Values From b79e784341ef801d7e9b946405dec93de5c98ceb Mon Sep 17 00:00:00 2001 From: Fred Hornsey Date: Mon, 28 Dec 2020 14:44:15 -0600 Subject: [PATCH 3/8] TAO/docs/compiler.html Cleanup Use conventional HTML, non breaking dashs, remove some outdated information. --- TAO/docs/compiler.html | 814 +++++++++++++++++++++-------------------- 1 file changed, 427 insertions(+), 387 deletions(-) diff --git a/TAO/docs/compiler.html b/TAO/docs/compiler.html index 89753e4f1a881..c394213f93b3d 100644 --- a/TAO/docs/compiler.html +++ b/TAO/docs/compiler.html @@ -5,16 +5,40 @@ TAO IDL compiler User's Guide - + - +
--TAO IDL Compiler User's Guide
+TAO IDL Compiler User's Guide
-Scope
This document describes the options and features of +Scope
+This document describes the options and features of TAO IDL compiler. It is not a reference manual or tutorial on OMG IDL. For more information on OMG IDL see the @@ -27,8 +51,8 @@Scope
This document describes the options and features of available in the OCI TAO Developer's Guide.-
-
Optional CIAO Functionality
+
+Optional CIAO Functionality
For users of the Component Integrated ACE ORB ( CIAO), it is @@ -40,50 +64,50 @@Optional CIAO Functionality
by additional functionality in the TAO IDL compiler. All the additional files generated and command line options used are described below. --
Generated Files
+
+Generated Files
-The IDL compiler generates up to 16 files from each .idl file. The +The IDL compiler generates up to 16 files from each.idl
file. The file names are obtained by taking the IDL basename and appending the following suffixes (see the list of TAO's IDL compiler options on how to get different suffixes for these files:)
-
-TAO's IDL compiler creates separate *.inl and *S_T.* +TAO's IDL compiler creates separate- Client stubs, i.e., *C.h, - *C.inl, and *C.cpp. Pure client applications +
- Client stubs, i.e.,
*C.h
, +*C.inl
, and*C.cpp
. Pure client applications only need to#include
and link with these files. -- Server skeletons, i.e., *S.h, and - *S.cpp. Servers need to
#include
and link - with these files. Generation of these files may be suppressed with the -SS option. -- Server skeleton templates, i.e., *S_T.h, S_T.inl, - and *S_T.cpp. Some C++ compilers do not like template +
- Server skeletons, i.e.,
*S.h
, and +*S.cpp
. Servers need to#include
and link + with these files. Generation of these files may be suppressed with the‑SS
option. +- Server skeleton templates, i.e.,
*S_T.h
,S_T.inl
, + and*S_T.cpp
. Some C++ compilers do not like template and non-template code in the same files, so TAO's IDL compiler generates these files separately. These files define tie classes, used to enable servant inheritance trees, and are not generated by default. -- Anyop files, i.e., *A.h, - and *A.cpp. Optionally generated files containing +
- Anyop files, i.e.,
*A.h
, + and*A.cpp
. Optionally generated files containing typecode and Any insertion/extraction operator definitions. This option enables the contents of these files to remain unlinked if not used. -- CIAO servant files, i.e., *_svnt.h, - and *_svnt.cpp. Optionally generated files, containing component +
- CIAO servant files, i.e.,
*_svnt.h
, + and*_svnt.cpp
. Optionally generated files, containing component and home servant implementations, as well as factory functions to create components and homes. -- Executor IDL file, i.e., *E.idl. +
- Executor IDL file, i.e.,
*E.idl
. IDL file containing local interfaces used for component and home executors, optionally generated. -- Executor implementation files, i.e., *_exec.h, - and *_exec.cpp. Optionally generated files containing executor implementation classes +
- Executor implementation files, i.e.,
*_exec.h
, + and*_exec.cpp
. Optionally generated files containing executor implementation classes with empty function bodies for facet, supported and inherited operations, as well as factory functions to create component and home executors. -- Connector implementation files, i.e., *_conn.h, - and *_conn.cpp. Optionally generated files containing connector implementation classes +
- Connector implementation files, i.e.,
*_conn.h
, + and*_conn.cpp
. Optionally generated files containing connector implementation classes with complete function bodies. The function implementations are specialized for DDS at present, but will be configurable to other connection mechanisms in the future. -- Export header files, i.e., *_export.h. +
- Export header files, i.e.,
*_export.h
. Optionally generated files defining export/import macros as well as corresponding macros related to singletons and tracing, all in terms of existing ACE macros. Note that, while these files must have the @@ -91,71 +115,76 @@Generated Files
from the IDL filename, as is the stem of the other file groups above. There can be as many as 4 of these files per build, for stub, skeleton, servant, and executor export macros, and they may also be generated by - the Perl script generate_export_file.pl, located in - $ACE_ROOT/bin. + the Perl scriptgenerate_export_file.pl
, located in +$ACE_ROOT/bin
.*.inl
and*S_T.*
files to improve the performance of the generated code. For example, -the *.inl files enable you to compile with inlining enabled or +the*.inl
files enable you to compile with inlining enabled or not, which is useful for trading-off compile-time and run-time -performance. Fortunately, you need to#include
only the -client stubs declared in the *C.h file and the skeletons in -the *S.h file in your code. Inline files are not generated +performance. Fortunately, you need to#include
only the +client stubs declared in the*C.h
file and the skeletons in +the*S.h
file in your code. Inline files are not generated for CIAO servant or executor implementation code.-
-
Variable - Usage - - TAO_IDL_PREPROCESSOR - Used to override the program name of the preprocessor that TAO_IDL - uses. - - +TAO_IDL_PREPROCESSOR_ARGS - Used to override the flags passed to the preprocessor that TAO_IDL +
+Environment Variables
+ ++
++ +Variable +Usage ++ ++ TAO_IDL_PREPROCESSOR
Used to override the program name of the preprocessor that TAO_IDL + uses. ++ + TAO_IDL_PREPROCESSOR_ARGS
Used to override the flags passed to the preprocessor that TAO_IDL uses. This can be used to alter the default options for the preprocessor and specify things like include directories and how - the preprocessor is invoked. Two flags that will always be passed to - the preprocessor are -DIDL
and-I.
. -- TAO_ROOT - Used to determine where orb.idl
is located. -- ACE_ROOT - Used to determine where orb.idl
is located. -- -CIAO_ROOT - Used to determine where + the preprocessor is invoked. -Components.idl
is located.+ ++ TAO_ROOT
Used to determine where +orb.idl
is located.+ ++ ACE_ROOT
Used to determine where +gperf
is located.+ ++ CIAO_ROOT
Used to determine where +Components.idl
is located.Because TAO_IDL doesn't have any code to implement a preprocessor, it has to use an external one. For convenience, it uses a built-in name for an external preprocessor to call. During compilation, this is how that default is set:
--
+- If the macro TAO_IDL_PREPROCESSOR is defined, then it will use that. -
- Else if the macro ACE_CC_PREPROCESSOR is defined, then it will use that. -
- Otherwise, it will use "cc" -
+
-- If the macro
+TAO_IDL_PREPROCESSOR
is defined, then it will use that.- Else if the macro
+ACE_CC_PREPROCESSOR
is defined, then it will use that.- Otherwise, it will use
+cc
And the same behavior occurs for the TAO_IDL_PREPROCESSOR_ARGS and -ACE_CC_PREPROCESSOR_ARGS macros.
+And the same behavior occurs for the
TAO_IDL_PREPROCESSOR_ARGS
and +ACE_CC_PREPROCESSOR_ARGS
macros.Case 1 is used by the Makefile on most machines to specify the preprocessor. Case 2 is used on Windows and platforms that need special arguments passed to the preprocessor (MVS, HPUX, etc.). And case 3 isn't used at all, but is included as a default case.
-Since the default preprocessor may not always work when TAO_IDL is moved to +
Since the default preprocessor may not always work when TAO_IDL is moved to another machine or used in cross-compilation, it can be overridden at runtime -by setting the environment variables TAO_IDL_PREPROCESSOR and -TAO_IDL_PREPROCESSOR_ARGS.
+by setting the environment variablesTAO_IDL_PREPROCESSOR
and +TAO_IDL_PREPROCESSOR_ARGS
.If ACE_ROOT or TAO_ROOT are defined, then TAO_IDL will use them to include the $(ACE_ROOT)/TAO/tao or $(TAO_ROOT)/tao @@ -163,8 +192,8 @@
Generated Files
<orb.idl> when it is included in an IDL file. TAO_IDL will display a warning message when neither is defined. --
Operation Demuxing Strategies
+
+Operation Demuxing Strategies
The server skeleton can use different demuxing strategies to match the incoming operation with the correct operation at the servant. TAO's @@ -181,120 +210,126 @@Operation Demuxing Strategies
the following:-
Note that if you can't use perfect hashing for some reason the next best operation demuxing strategy is binary search, which can be configured using TAO's IDL compiler options.- Enable
ACE_HAS_GPERF
when building ACE and TAO. - This macro has been defined for the platforms wheregperf
+- Enable
-ACE_HAS_GPERF
when building ACE and TAO. + This macro has been defined for the platforms wheregperf
has been tested, which includes most platforms - that ACE runs on.+ that ACE runs on.
- Build the
gperf
in $ACE_ROOT/apps/gperf. This build +- Build the
-gperf
in $ACE_ROOT/apps/gperf. This build also leaves a copy/link of the ace_gperf program at the $ACE_ROOT/bin - directory.+ directory.
- Set the environment variable $ACE_ROOT appropriately or add - $ACE_ROOT/bin to your search path.
+
- Set the environment variable
-$ACE_ROOT
appropriately or add +$ACE_ROOT/bin
to your search path.- Use the
-g
option for the TAO IDL compiler or set - your search path accordingly to installace_gperf
in a - directory other than $ACE_ROOT/bin. +- Use the
‑g
option for the TAO IDL compiler or set + your search path accordingly to installace_gperf
in a + directory other than$ACE_ROOT/bin
.-
-
AMI support
+
+AMI support
The TAO_IDL compiler generates AMI stubs and skeletons as described in the CORBA 3.0.3 specification. --
Collocation Strategies
+
+Collocation Strategies
+TAO_IDL can generate collocated stubs using two different collocation strategies. It also allows you to suppress/enable the generation of the stubs of a particular strategy. To gain great flexibility at run-time, you can generate stubs for both collocation strategies -(using both '
-Gp
' and '-Gd
' flags at the same time) and defer the +(using both '‑Gp
' and '‑Gd
' flags at the same time) and defer the determination of collocation strategy until run-time. On the other hand, if you want to minimize the footprint of your program, you might want to pre-determine the collocation strategy you want and only generate the right collocated stubs (or not generating any at all using -both '-Sp
' and '-Sd
' flags at the same time if +both '‑Sp
' and '‑Sd
' flags at the same time if it's a pure client.) See our collocation paper for a detail discussion on the collocation support in -TAO.+TAO.
--
TAO's IDL Compiler Options
+
+TAO's IDL Compiler Options
-TAO's IDL compiler invokes your C (or C++) ++TAO's IDL compiler invokes your C (or C++) preprocessor to resolve included IDL files. It receives the common -options for preprocessors (such as -D or -I). It -also receives other options that are specific to it.
+options for preprocessors (such as
-‑D
or‑I
). It +also receives other options that are specific to it.TAO's IDL Compiler Options
++ ++ + ‑‑preprocessor‑input KIND
+ + +Set the C preprocessor file input method.
+ +KIND
must be +guess
(default),direct‑with‑e
, +direct‑without‑e
,direct‑gcc
, + orcopy
.+ +
direct-without-e
passes the IDL file path to the + preprocessor directly. Most, if not all, standalone C preprocessors like + GNU and Clangcpp
ormcpp
can use this.+ +
direct-with-e
is the same as +direct-without-e
except‑E
is also + passed.CL
, the Visual Studio C++ compiler can use this.+ +
direct‑gcc
is same as +direct‑with‑e
, but it's forg++
and +clang++
which also require‑x c++
to be + passed.+ +
copy
makes a copy of the IDL file to a temporary location + and passes that to the preprocessor.+
guess
picks one of the previous based on the name of the + preprocessor.+ Although +copy
should work with all compilers, it only + approximates relative includes using‑I.
, which fails under + certain conditions. Therefore the direct kinds are preferred by +guess
. +
diff --git a/TAO/tests/IDL_Relative_Include/.gitignore b/TAO/tests/IDL_Relative_Include/.gitignore new file mode 100644 index 0000000000000..68e911a00a9d6 --- /dev/null +++ b/TAO/tests/IDL_Relative_Include/.gitignore @@ -0,0 +1,5 @@ +/bC.cpp +/bC.inl +/bC.h +/bS.cpp +/bS.h diff --git a/TAO/tests/IDL_Relative_Include/IDL_Relative_Include.mpc b/TAO/tests/IDL_Relative_Include/IDL_Relative_Include.mpc new file mode 100644 index 0000000000000..5eadc7ab2e94d --- /dev/null +++ b/TAO/tests/IDL_Relative_Include/IDL_Relative_Include.mpc @@ -0,0 +1,6 @@ +project(*): taoidldefaults { + custom_only = 1 + IDL_Files { + a/b/b.idl + } +} diff --git a/TAO/tests/IDL_Relative_Include/README.md b/TAO/tests/IDL_Relative_Include/README.md new file mode 100644 index 0000000000000..5f95a37fc4a77 --- /dev/null +++ b/TAO/tests/IDL_Relative_Include/README.md @@ -0,0 +1,10 @@ +# IDL Relative Include Test + +Like with C/C++, `#include ""` should be able to be used with `tao_idl` to +include a path relative to the including file. If the `tao_idl` falls back to +`‑‑preprocessor‑input copy`, then this test will fail. If it does then this +shouldn't affect normal usage of TAO, but `tao_idl` should be updated for the +failing case so that it can pass the IDL file directly to the preprocessor. + +See `‑‑preprocessor‑input` in `TAO/docs/compiler.html` and `DRV_cpp_post_init` +in `TAO/TAO_IDL/driver/drv_preproc.cpp` for more information. diff --git a/TAO/tests/IDL_Relative_Include/a/a.idl b/TAO/tests/IDL_Relative_Include/a/a.idl new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/TAO/tests/IDL_Relative_Include/a/b/b.idl b/TAO/tests/IDL_Relative_Include/a/b/b.idl new file mode 100644 index 0000000000000..432a35e1b702c --- /dev/null +++ b/TAO/tests/IDL_Relative_Include/a/b/b.idl @@ -0,0 +1 @@ +#include "../a.idl" From 75dea65c11d93184f495e7499386f07301a08888 Mon Sep 17 00:00:00 2001 From: Fred HornseyDate: Mon, 28 Dec 2020 22:42:28 -0600 Subject: [PATCH 7/8] Make fuzz.pl Happy --- TAO/tests/IDL_Relative_Include/a/a.idl | 1 + 1 file changed, 1 insertion(+) diff --git a/TAO/tests/IDL_Relative_Include/a/a.idl b/TAO/tests/IDL_Relative_Include/a/a.idl index e69de29bb2d1d..f845fd17624f4 100644 --- a/TAO/tests/IDL_Relative_Include/a/a.idl +++ b/TAO/tests/IDL_Relative_Include/a/a.idl @@ -0,0 +1 @@ +// Empty File From 9ffdaa2f65f252c699188b362b0db44c14835c7c Mon Sep 17 00:00:00 2001 From: Fred Hornsey Date: Mon, 28 Dec 2020 23:02:49 -0600 Subject: [PATCH 8/8] Add Possible Missing Include --- TAO/TAO_IDL/driver/drv_preproc.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/TAO/TAO_IDL/driver/drv_preproc.cpp b/TAO/TAO_IDL/driver/drv_preproc.cpp index 2715ca35982e8..b4f33fa210fd1 100644 --- a/TAO/TAO_IDL/driver/drv_preproc.cpp +++ b/TAO/TAO_IDL/driver/drv_preproc.cpp @@ -86,6 +86,7 @@ trademarks or registered trademarks of Sun Microsystems, Inc. #include "ace/OS_NS_stdio.h" #include "ace/OS_NS_unistd.h" #include "ace/OS_NS_fcntl.h" +#include "ace/OS_NS_ctype.h" #include