]> rtime.felk.cvut.cz Git - fpga/lx-cpu1/gcc-tumbl.git/commitdiff
gcc:
authorro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 27 Jun 2011 16:20:47 +0000 (16:20 +0000)
committerro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 27 Jun 2011 16:20:47 +0000 (16:20 +0000)
PR libmudflap/38738
* config/sol2.h [!USE_GLD] (MFLIB_SPEC): Define.

libmudflap:
PR libmudflap/38738
* configure.ac: Check for sys/mnttab.h.
Check for library containing connect.
* configure: Regenerate.
* config.h.in: Regenerate.
* mf-hooks2.c [HAVE_SYS_MNTTAB_H]: Include <sys/mnttab.h>.
* testsuite/libmudflap.c/pass-stratcliff.c (main) [__sun__ &&
__svr4__]: Disable rawmemchr, stpcpy, mempcpy tests.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@175537 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/sol2.h
libmudflap/ChangeLog
libmudflap/config.h.in
libmudflap/configure
libmudflap/configure.ac
libmudflap/mf-hooks2.c
libmudflap/testsuite/libmudflap.c/pass-stratcliff.c

index 1d9c27c08376db57544716ebe661a14e81a53c41..9d3823a1a46d1e1bddacc616ac2c788d3cc531c5 100644 (file)
@@ -1,3 +1,8 @@
+2011-06-27  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+       PR libmudflap/38738
+       * config/sol2.h [!USE_GLD] (MFLIB_SPEC): Define.
+
 2011-06-27  Nick Clifton  <nickc@redhat.com>
 
        * config/mn10300/mn10300.md (clzsi2): Use XOR after BSCH to
index d898c2ef2ae7b01405276b1bd97677779f3c0168..d9c1fc99a40a14fd2999d7b3ebcbc33d48cdebd9 100644 (file)
@@ -187,6 +187,11 @@ along with GCC; see the file COPYING3.  If not see
 #endif /* HAVE_LD_EH_FRAME && TARGET_DL_ITERATE_PHDR */
 #endif
 
+#ifndef USE_GLD
+/* The default MFLIB_SPEC is GNU ld specific.  */
+#define MFLIB_SPEC ""
+#endif
+
 /* collect2.c can only parse GNU nm -n output.  Solaris nm needs -png to
    produce the same format.  */
 #define NM_FLAGS "-png"
index 920c73ec3618b8cd804e26c022b6e225428ef8c3..f44f0ed18fe0084eeb6d5a26faaaea9f308632e0 100644 (file)
@@ -1,3 +1,14 @@
+2011-06-27  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+       PR libmudflap/38738
+       * configure.ac: Check for sys/mnttab.h.
+       Check for library containing connect.
+       * configure: Regenerate.
+       * config.h.in: Regenerate.
+       * mf-hooks2.c [HAVE_SYS_MNTTAB_H]: Include <sys/mnttab.h>.
+       * testsuite/libmudflap.c/pass-stratcliff.c (main) [__sun__ &&
+       __svr4__]: Disable rawmemchr, stpcpy, mempcpy tests.
+
 2011-02-13  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
        * configure: Regenerate.
index d20c42bbc37624dd9df59512d929f48bab1f154d..16afd05efcdcc008654bc4a6af1c6db446c4a4a3 100644 (file)
 /* Define to 1 if you have the <sys/mman.h> header file. */
 #undef HAVE_SYS_MMAN_H
 
+/* Define to 1 if you have the <sys/mnttab.h> header file. */
+#undef HAVE_SYS_MNTTAB_H
+
 /* Define to 1 if you have the <sys/sem.h> header file. */
 #undef HAVE_SYS_SEM_H
 
index 11bcca18439c3d2bc37d5eb934c7150819f3c09d..ebf8f2d9ce4cc11384e07eb1b3a745704c828339 100755 (executable)
@@ -4297,7 +4297,7 @@ done
 
 for ac_header in stdint.h execinfo.h signal.h dlfcn.h dirent.h pwd.h grp.h \
   netdb.h sys/ipc.h sys/sem.h sys/shm.h sys/wait.h ctype.h mntent.h \
-  sys/socket.h netinet/in.h arpa/inet.h dlfcn.h sys/mman.h
+  sys/mnttab.h sys/socket.h netinet/in.h arpa/inet.h dlfcn.h sys/mman.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -11063,6 +11063,58 @@ _ACEOF
 fi
 
 
+ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect"
+if test "x$ac_cv_func_connect" = x""yes; then :
+
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
+$as_echo_n "checking for connect in -lsocket... " >&6; }
+if test "${ac_cv_lib_socket_connect+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsocket  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char connect ();
+int
+main ()
+{
+return connect ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_socket_connect=yes
+else
+  ac_cv_lib_socket_connect=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
+$as_echo "$ac_cv_lib_socket_connect" >&6; }
+if test "x$ac_cv_lib_socket_connect" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBSOCKET 1
+_ACEOF
+
+  LIBS="-lsocket $LIBS"
+
+fi
+
+fi
+
+
 # Calculate toolexeclibdir
 # Also toolexecdir, though it's only used in toolexeclibdir
 case ${version_specific_libs} in
index 9b9ea20321b9e7a7c7ff9a08199844c560a7ce71..b61b56f2708eb2405ec304c1afd0fba2ee471742 100644 (file)
@@ -62,7 +62,7 @@ enable_shared=no])
 
 AC_CHECK_HEADERS(stdint.h execinfo.h signal.h dlfcn.h dirent.h pwd.h grp.h \
   netdb.h sys/ipc.h sys/sem.h sys/shm.h sys/wait.h ctype.h mntent.h \
-  sys/socket.h netinet/in.h arpa/inet.h dlfcn.h sys/mman.h)
+  sys/mnttab.h sys/socket.h netinet/in.h arpa/inet.h dlfcn.h sys/mman.h)
 
 AC_CHECK_FUNCS(backtrace backtrace_symbols gettimeofday signal)
 AC_CHECK_FUNCS(fopen64 fseeko64 ftello64 stat64 freopen64)
@@ -147,6 +147,8 @@ AC_SUBST(build_libmudflapth)
 
 AC_CHECK_LIB(dl, dlsym)
 
+AC_CHECK_FUNC(connect,, AC_CHECK_LIB(socket, connect))
+
 # Calculate toolexeclibdir
 # Also toolexecdir, though it's only used in toolexeclibdir
 case ${version_specific_libs} in
index 5649e1c58829b9c387e105b2998ce62d68f98742..77d58131bfa841e236abfd9df7e2bf11f21f1655 100644 (file)
@@ -1,5 +1,5 @@
 /* Mudflap: narrow-pointer bounds-checking by tree rewriting.
-   Copyright (C) 2002, 2003, 2004, 2009 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2003, 2004, 2009, 2011 Free Software Foundation, Inc.
    Contributed by Frank Ch. Eigler <fche@redhat.com>
    and Graydon Hoare <graydon@redhat.com>
 
@@ -90,6 +90,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 #ifdef HAVE_MNTENT_H
 #include <mntent.h>
 #endif
+#ifdef HAVE_SYS_MNTTAB_H
+#include <sys/mnttab.h>
+#endif
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
 #endif
@@ -2063,6 +2066,7 @@ WRAPPER2(const char *, gai_strerror, int errcode)
 
 
 #ifdef HAVE_GETMNTENT
+#ifdef HAVE_MNTENT_H
 WRAPPER2(struct mntent *, getmntent, FILE *filep)
 {
   struct mntent *m;
@@ -2097,6 +2101,9 @@ WRAPPER2(struct mntent *, getmntent, FILE *filep)
 
   return m;
 }
+#elif defined HAVE_SYS_MNTTAB_H
+/* FIXME: Implement.  */
+#endif
 #endif
 
 
index baaf8a9f3536138867b0ff2cdd5063ca758af2b4..985c796e13c8ca834c2d6ad5aeae9e768b7aa5b5 100644 (file)
@@ -153,7 +153,7 @@ main (int argc, char *argv[])
            }
         }
 
-#ifndef __FreeBSD__
+#if !defined  __FreeBSD__ && !(defined __sun__ && defined __svr4__)
       /* rawmemchr test */
       for (outer = size - 1; outer >= MAX (0, size - 128); --outer)
         {
@@ -250,7 +250,7 @@ main (int argc, char *argv[])
            }
         }
 
-#ifndef __FreeBSD__
+#ifndef __FreeBSD__ && !(defined __sun__ && defined __svr4__)
       /* stpcpy test */
       for (outer = size - 1; outer >= MAX (0, size - 128); --outer)
         {
@@ -302,7 +302,7 @@ main (int argc, char *argv[])
              result = 1;
            }
 
-#ifndef __FreeBSD__
+#if !defined __FreeBSD__ && !(defined __sun__ && defined __svr4__)
       /* mempcpy test */
       for (outer = size - 1; outer >= MAX (0, size - 128); --outer)
        for (inner = 0; inner < size - outer; ++inner)