diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2011-12-20 18:14:30 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2011-12-20 18:14:30 +0000 |
commit | d48be5dfaf50c025bd4bdbaed375f1806d8c3bfb (patch) | |
tree | 5dfd4daece115bfcf145e5502f4acae0d8b6e4d6 /libgo | |
parent | 4a5e00ca50a3caf1757943aa9df793e4f2865547 (diff) | |
download | gcc-d48be5dfaf50c025bd4bdbaed375f1806d8c3bfb.zip gcc-d48be5dfaf50c025bd4bdbaed375f1806d8c3bfb.tar.gz gcc-d48be5dfaf50c025bd4bdbaed375f1806d8c3bfb.tar.bz2 |
libgo: Fix use of -D_GNU_SOURCE and friends when building libgo.
From-SVN: r182548
Diffstat (limited to 'libgo')
-rw-r--r-- | libgo/Makefile.am | 2 | ||||
-rw-r--r-- | libgo/Makefile.in | 2 | ||||
-rwxr-xr-x | libgo/configure | 7 | ||||
-rw-r--r-- | libgo/configure.ac | 9 | ||||
-rw-r--r-- | libgo/go/syscall/wait.c | 3 | ||||
-rwxr-xr-x | libgo/mksysinfo.sh | 4 |
6 files changed, 11 insertions, 16 deletions
diff --git a/libgo/Makefile.am b/libgo/Makefile.am index 5bbeb89..f146320 100644 --- a/libgo/Makefile.am +++ b/libgo/Makefile.am @@ -37,7 +37,7 @@ AM_CPPFLAGS = -I $(srcdir)/runtime $(LIBFFIINCS) $(PTHREAD_CFLAGS) ACLOCAL_AMFLAGS = -I ./config -I ../config AM_CFLAGS = -fexceptions -fplan9-extensions $(SPLIT_STACK) $(WARN_CFLAGS) \ - $(STRINGOPS_FLAG) \ + $(STRINGOPS_FLAG) $(OSCFLAGS) \ -I $(srcdir)/../libgcc -I $(MULTIBUILDTOP)../../gcc/include if USING_SPLIT_STACK diff --git a/libgo/Makefile.in b/libgo/Makefile.in index 70f3aca..627672e 100644 --- a/libgo/Makefile.in +++ b/libgo/Makefile.in @@ -509,7 +509,7 @@ WARN_CFLAGS = $(WARN_FLAGS) $(WERROR) AM_CPPFLAGS = -I $(srcdir)/runtime $(LIBFFIINCS) $(PTHREAD_CFLAGS) ACLOCAL_AMFLAGS = -I ./config -I ../config AM_CFLAGS = -fexceptions -fplan9-extensions $(SPLIT_STACK) $(WARN_CFLAGS) \ - $(STRINGOPS_FLAG) \ + $(STRINGOPS_FLAG) $(OSCFLAGS) \ -I $(srcdir)/../libgcc -I $(MULTIBUILDTOP)../../gcc/include @USING_SPLIT_STACK_TRUE@AM_LDFLAGS = -XCClinker $(SPLIT_STACK) diff --git a/libgo/configure b/libgo/configure index 314399f..d9915f9 100755 --- a/libgo/configure +++ b/libgo/configure @@ -13804,22 +13804,23 @@ fi +OSCFLAGS="-D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" case "$target" in mips-sgi-irix6.5*) # IRIX 6 needs _XOPEN_SOURCE=500 for the XPG5 version of struct # msghdr in <sys/socket.h>. - OSCFLAGS='-D_XOPEN_SOURCE=500' + OSCFLAGS="$OSCFLAGS -D_XOPEN_SOURCE=500" ;; *-*-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__' + OSCFLAGS="$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__' + OSCFLAGS="$OSCFLAGS -D_XOPEN_SOURCE=600 -D__EXTENSIONS__" ;; esac diff --git a/libgo/configure.ac b/libgo/configure.ac index 6cb5f90..a001d50 100644 --- a/libgo/configure.ac +++ b/libgo/configure.ac @@ -277,23 +277,24 @@ AC_SUBST(GO_LIBCALL_OS_ARCH_FILE) AC_SUBST(GO_SYSCALL_OS_FILE) AC_SUBST(GO_SYSCALL_OS_ARCH_FILE) -dnl Some targets need special flags to build sysinfo.go. +dnl Special flags used to generate sysinfo.go. +OSCFLAGS="-D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" case "$target" in mips-sgi-irix6.5*) # IRIX 6 needs _XOPEN_SOURCE=500 for the XPG5 version of struct # msghdr in <sys/socket.h>. - OSCFLAGS='-D_XOPEN_SOURCE=500' + OSCFLAGS="$OSCFLAGS -D_XOPEN_SOURCE=500" ;; *-*-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__' + OSCFLAGS="$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__' + OSCFLAGS="$OSCFLAGS -D_XOPEN_SOURCE=600 -D__EXTENSIONS__" ;; esac AC_SUBST(OSCFLAGS) diff --git a/libgo/go/syscall/wait.c b/libgo/go/syscall/wait.c index d3c90d7..fd7b65e 100644 --- a/libgo/go/syscall/wait.c +++ b/libgo/go/syscall/wait.c @@ -7,9 +7,6 @@ We use C code to extract the wait status so that we can easily be OS-independent. */ -#define _GNU_SOURCE -#define __EXTENSIONS__ - #include <stdint.h> #include <sys/wait.h> diff --git a/libgo/mksysinfo.sh b/libgo/mksysinfo.sh index a5e8144..ca9e5f6 100755 --- a/libgo/mksysinfo.sh +++ b/libgo/mksysinfo.sh @@ -25,10 +25,6 @@ rm -f sysinfo.c cat > sysinfo.c <<EOF #include "config.h" -#define _GNU_SOURCE -#define _LARGEFILE_SOURCE -#define _FILE_OFFSET_BITS 64 - #include <sys/types.h> #include <dirent.h> #include <errno.h> |