From Rainer Orth.
From-SVN: r171818
libgo_la_SOURCES = $(runtime_files)
+libgo_la_LDFLAGS = $(PTHREAD_CFLAGS)
+
libgo_la_LIBADD = \
$(libgo_go_objs) $(LIBFFI) $(PTHREAD_LIBS) $(MATH_LIBS) $(NET_LIBS)
sysinfo.go: s-sysinfo; @true
s-sysinfo: $(srcdir)/mksysinfo.sh config.h
- CC="$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS)" $(SHELL) $(srcdir)/mksysinfo.sh
+ CC="$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(OSCFLAGS)" $(SHELL) $(srcdir)/mksysinfo.sh
$(SHELL) $(srcdir)/../move-if-change tmp-sysinfo.go sysinfo.go
$(STAMP) $@
string.lo
am_libgo_la_OBJECTS = $(am__objects_3)
libgo_la_OBJECTS = $(am_libgo_la_OBJECTS)
+libgo_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(libgo_la_LDFLAGS) \
+ $(LDFLAGS) -o $@
DEFAULT_INCLUDES = -I.@am__isrc@
depcomp = $(SHELL) $(top_srcdir)/../depcomp
am__depfiles_maybe = depfiles
OBJCOPY = @OBJCOPY@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
+OSCFLAGS = @OSCFLAGS@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
testing/script.lo
libgo_la_SOURCES = $(runtime_files)
+libgo_la_LDFLAGS = $(PTHREAD_CFLAGS)
libgo_la_LIBADD = \
$(libgo_go_objs) $(LIBFFI) $(PTHREAD_LIBS) $(MATH_LIBS) $(NET_LIBS)
rm -f "$${dir}/so_locations"; \
done
libgo.la: $(libgo_la_OBJECTS) $(libgo_la_DEPENDENCIES)
- $(LINK) -rpath $(toolexeclibdir) $(libgo_la_OBJECTS) $(libgo_la_LIBADD) $(LIBS)
+ $(libgo_la_LINK) -rpath $(toolexeclibdir) $(libgo_la_OBJECTS) $(libgo_la_LIBADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
sysinfo.go: s-sysinfo; @true
s-sysinfo: $(srcdir)/mksysinfo.sh config.h
- CC="$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS)" $(SHELL) $(srcdir)/mksysinfo.sh
+ CC="$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(OSCFLAGS)" $(SHELL) $(srcdir)/mksysinfo.sh
$(SHELL) $(srcdir)/../move-if-change tmp-sysinfo.go sysinfo.go
$(STAMP) $@
USING_SPLIT_STACK_FALSE
USING_SPLIT_STACK_TRUE
SPLIT_STACK
+OSCFLAGS
GO_DEBUG_PROC_REGS_OS_ARCH_FILE
GO_SYSCALLS_SYSCALL_OS_ARCH_FILE
GOARCH
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 10913 "configure"
+#line 10914 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11019 "configure"
+#line 11020 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
fi
+case "$target" in
+ *-*-solaris2.[89])
+ # Solaris 8/9 need this so struct msghdr gets the msg_control
+ # etc. fields in <sys/socket.h> (_XPG4_2).
+ OSCFLAGS='-D_XOPEN_SOURCE=500 -D_XOPEN_SOURCE_EXTENDED -D__EXTENSIONS__'
+ ;;
+ *-*-solaris2.1[01])
+ # Solaris 10+ needs this so struct msghdr gets the msg_control
+ # etc. fields in <sys/socket.h> (_XPG4_2). _XOPEN_SOURCE=500 as
+ # above doesn't work with C99.
+ OSCFLAGS='-D_XOPEN_SOURCE=600 -D__EXTENSIONS__'
+ ;;
+esac
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fsplit-stack is supported" >&5
$as_echo_n "checking whether -fsplit-stack is supported... " >&6; }
if test "${libgo_cv_c_split_stack_supported+set}" = set; then :
fi
AC_SUBST(GO_DEBUG_PROC_REGS_OS_ARCH_FILE)
+dnl Some targets need special flags to build sysinfo.go.
+case "$target" in
+ *-*-solaris2.[[89]])
+ # Solaris 8/9 need this so struct msghdr gets the msg_control
+ # etc. fields in <sys/socket.h> (_XPG4_2).
+ OSCFLAGS='-D_XOPEN_SOURCE=500 -D_XOPEN_SOURCE_EXTENDED -D__EXTENSIONS__'
+ ;;
+ *-*-solaris2.1[[01]])
+ # Solaris 10+ needs this so struct msghdr gets the msg_control
+ # etc. fields in <sys/socket.h> (_XPG4_2). _XOPEN_SOURCE=500 as
+ # above doesn't work with C99.
+ OSCFLAGS='-D_XOPEN_SOURCE=600 -D__EXTENSIONS__'
+ ;;
+esac
+AC_SUBST(OSCFLAGS)
+
dnl Use -fsplit-stack when compiling C code if available.
AC_CACHE_CHECK([whether -fsplit-stack is supported],
[libgo_cv_c_split_stack_supported],
#define _LARGEFILE_SOURCE
#define _FILE_OFFSET_BITS 64
-#if defined(__sun__) && defined(__svr4__)
-/* Needed by Solaris header files. */
-#define _XOPEN_SOURCE 600
-#define __EXTENSIONS__
-#endif
-
#ifdef __sgi__
/* IRIX 6 needs _XOPEN_SOURCE=500 for the XPG5 version of struct msghdr in
<sys/socket.h>. */
sed -e 's/^\(const \)_\(E[^= ]*\)\(.*\)$/\1\2 = _\2/' >> ${OUT}
# The O_xxx flags.
-grep '^const _\(O\|F\|FD\)_' gen-sysinfo.go | \
+egrep '^const _(O|F|FD)_' gen-sysinfo.go | \
sed -e 's/^\(const \)_\([^= ]*\)\(.*\)$/\1\2 = _\2/' >> ${OUT}
if ! grep '^const O_ASYNC' ${OUT} >/dev/null 2>&1; then
echo "const O_ASYNC = 0" >> ${OUT}
fi
# Networking constants.
-grep '^const _\(AF\|SOCK\|SOL\|SO\|IPPROTO\|TCP\|IP\|IPV6\)_' gen-sysinfo.go |
+egrep '^const _(AF|SOCK|SOL|SO|IPPROTO|TCP|IP|IPV6)_' gen-sysinfo.go |
sed -e 's/^\(const \)_\([^= ]*\)\(.*\)$/\1\2 = _\2/' >> ${OUT}
grep '^const _SOMAXCONN' gen-sysinfo.go |
sed -e 's/^\(const \)_\(SOMAXCONN[^= ]*\)\(.*\)$/\1\2 = _\2/' \
grep '^type _stat64 ' gen-sysinfo.go
else
grep '^type _stat ' gen-sysinfo.go
-fi | sed -e 's/type _stat\(64\)\?/type Stat_t/' \
+fi | sed -e 's/type _stat64/type Stat_t/' \
+ -e 's/type _stat/type Stat_t/' \
-e 's/st_dev/Dev/' \
-e 's/st_ino/Ino/g' \
-e 's/st_nlink/Nlink/' \
grep '^type _dirent64 ' gen-sysinfo.go
else
grep '^type _dirent ' gen-sysinfo.go
-fi | sed -e 's/type _dirent\(64\)\?/type Dirent/' \
+fi | sed -e 's/type _dirent64/type Dirent/' \
+ -e 's/type _dirent/type Dirent/' \
-e 's/d_name \[0+1\]/d_name [0+256]/' \
-e 's/d_name/Name/' \
-e 's/]int8/]byte/' \
OBJCOPY = @OBJCOPY@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
+OSCFLAGS = @OSCFLAGS@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@