===================================================================
@@ -176,16 +176,19 @@ extern GTY(()) int darwin_ms_struct;
%{e*} %{r} \
%{o*}%{!o:-o a.out} \
%{!nostdlib:%{!nostartfiles:%S}} \
+ %{!nostdlib:%{!nostartfiles:%{fupc:%:include(upc-crtbegin.spec)%(upc_crtbegin)}}}\
%{L*} %(link_libgcc) %o %{fprofile-arcs|fprofile-generate*|coverage:-lgcov} \
%{fopenacc|fopenmp|ftree-parallelize-loops=*: \
%{static|static-libgcc|static-libstdc++|static-libgfortran: libgomp.a%s; : -lgomp } } \
%{fgnu-tm: \
%{static|static-libgcc|static-libstdc++|static-libgfortran: libitm.a%s; : -litm } } \
+ %{fupc:%:include(libgupc.spec)%(link_upc)} \
%{!nostdlib:%{!nodefaultlibs:\
%{%:sanitize(address): -lasan } \
%{%:sanitize(undefined): -lubsan } \
%(link_ssp) %(link_gcc_c_sequence)\
}}\
+ %{!nostdlib:%{!nostartfiles:%{fupc:%:include(upc-crtend.spec)%(upc_crtend)}}}\
%{!nostdlib:%{!nostartfiles:%E}} %{T*} %{F*} }}}}}}}"
#define DSYMUTIL "\ndsymutil"
@@ -922,6 +925,11 @@ extern void darwin_driver_init (unsigned
#undef SUPPORTS_INIT_PRIORITY
#define SUPPORTS_INIT_PRIORITY 0
+/* UPC section names */
+#define UPC_SHARED_SECTION_NAME "__DATA,upc_shared"
+#define UPC_PGM_INFO_SECTION_NAME "__DATA,upc_pgm_info"
+#define UPC_INIT_ARRAY_SECTION_NAME "__DATA,upc_init_array"
+
/* When building cross-compilers (and native crosses) we shall default to
providing an osx-version-min of this unless overridden by the User.
10.5 is the only version that fully supports all our archs so that's the