1 # This is the target specific configuration file. This is invoked by the
2 # autoconf generated configure script. Putting it in a separate shell file
3 # lets us skip running autoconf when modifying target specific information.
5 # This file is adapted from the libgomp implementation.
7 # This file switches on the shell variable ${target}, and sets the
8 # following shell variables:
9 # config_path An ordered list of directories to search for
10 # sources and headers. This is relative to the
11 # config subdirectory of the source tree.
12 # XCFLAGS Add extra compile flags to use.
13 # XLDFLAGS Add extra link flags to use.
17 config_path="posix default"
24 # HPUX v11.x requires -lrt to resolve sem_init in libgupc.la
25 XLDFLAGS="${XLDFLAGS} -lrt"
30 # PA 32 HP-UX needs -frandom-seed for bootstrap compare.
31 XCFLAGS="${XCFLAGS} -frandom-seed=fixed-seed"
37 config_path="mingw32 ${config_path}"
41 config_path="darwin bsd ${config_path}"
45 # Need to link with -lpthread so libgupc.so is self-contained.
46 XLDFLAGS="${XLDFLAGS} -lpthread"
53 # The logic above sets configuration directories that may
54 # be currently unsupported. Remove non-existent directories
55 # from the 'config_path' variable. It is assumed that higher
56 # level logic will check for valid libgupc targets.
59 for cfg_dir in ${config_path}; do
60 if test -d ${srcdir}/config/$cfg_dir; then
61 _config_path="${_config_path} $cfg_dir"
64 config_path="${_config_path}"
68 "%{static:upc-crtbeginT%O%s; shared|pie:upc-crtbeginS%O%s; :upc-crtbegin%O%s}"
70 "%{static:upc-crtendT%O%s; shared|pie:upc-crtendS%O%s; :upc-crtend%O%s}"
72 "upc-crtbeginT.o upc-crtbeginS.o upc-crtbegin.o upc-crtendT.o upc-crtendS.o upc-crtend.o"
74 for cfg_dir in ${config_path}; do
75 cfg_mak=config/$cfg_dir/upc-crtstuff.mak
76 if test -e ${srcdir}/${cfg_mak}; then
77 upc_crtstuff_mak=${cfg_mak}
82 # The following empty alternatives are kept as place holders
83 # that will be filled in with target-specific settings as needed.
93 # For UPC, always add the math library
95 if test "${upc_numa}" = "yes"; then
98 if test "$upc_runtime_model" = "portals4"; then
99 LIBS="-lpthread $LIBS"
100 if test x"$portals4libs" != "x"; then
101 LIBS="$portals4libs $LIBS"
104 if test "x${have_rdynamic}" != "x"; then
105 LIBS="-export-dynamic $LIBS"
107 libgupc_spec="%{!fupc-pthreads*:-lgupc;:-lgupc_pt -lpthread}"
108 if test "$enable_upc_link_script" = yes; then
109 libgupc_spec="-T gupc.ld%s ${libgupc_spec}"
111 # Set up the set of libraries that we need to link against for libgupc.
113 link_upc_spec="${libgupc_spec} $LIBS"