This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Target Specific Code Generation in GCC Core


Hi,

    How does one specify target-specific code in core GCC?

For example, consider the following patch fragment:
---------------------------- 8< --------------------------
+  tem = build_function_type (TREE_TYPE (TREE_TYPE (method)), arg_types);
+
+#if defined (__MINGW32__) || defined (__CYGWIN__)
+  /* JNI methods on Win32 are invoked using the stdcall convention */
+  tem = build_type_attribute_variant (tem, get_identifier ("stdcall"));
+#endif
+
+  jni_func_type = build_pointer_type (tem);
---------------------------- 8< --------------------------

The problem is that __MINGW32__ is defined only when the
host compiler itself is the MinGW GCC.

I looked at the defines passed to the compiler in this
stage, the xm-cygming.h, xm-mingw32.h, etc. files in
"gcc/config/i386" as well as the GCC docs but couldn't
find anything useful or definitive.

Thanks in advance for your help.

Sincerely Yours,
Ranjit.

--
Ranjit Mathew          Email: rmathew AT hotmail DOT com

Bangalore, INDIA.      Web: http://ranjitmathew.tripod.com/




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]