diff options
author | cvs2svn <> | 2006-03-29 22:38:47 +0000 |
---|---|---|
committer | cvs2svn <> | 2006-03-29 22:38:47 +0000 |
commit | d4f78700878b587f344b29040ba6b5b53fd57598 (patch) | |
tree | 8c8b6314cc07cd528e6f6615b9251a21d439c67d | |
parent | f84325d0899e5052fd59892ece265f7c2bd6c6a7 (diff) | |
download | newlib-d4f78700878b587f344b29040ba6b5b53fd57598.zip newlib-d4f78700878b587f344b29040ba6b5b53fd57598.tar.gz newlib-d4f78700878b587f344b29040ba6b5b53fd57598.tar.bz2 |
This commit was manufactured by cvs2svn to create branch 'newlib-autotools-
branch'.
Sprout from newlib-csl-20060320-branch 2006-03-21 00:57:35 UTC cvs2svn 'This commit was manufactured by cvs2svn to create branch 'newlib-'
Cherrypick from master 2006-03-29 22:38:46 UTC Jeff Johnston <jjohnstn@redhat.com> '':
compile
libgloss/ChangeLog
libgloss/mt/startup-16-002.S
libgloss/mt/startup-16-003.S
libgloss/mt/startup-ms2.S
newlib/ChangeLog
newlib/configure
newlib/configure.host
newlib/configure.in
newlib/libc/stdio/freopen.c
newlib/libc/stdio64/freopen64.c
newlib/libc/sys/linux/include/net/if.h
newlib/libc/sys/linux/include/netinet/ip.h
newlib/libc/sys/linux/io.c
newlib/libc/sys/linux/net/name6.c
newlib/libc/sys/linux/sys/ioccom.h
newlib/libtool.m4
-rwxr-xr-x | compile | 142 | ||||
-rw-r--r-- | libgloss/ChangeLog | 6 | ||||
-rw-r--r-- | libgloss/mt/startup-16-002.S | 2 | ||||
-rw-r--r-- | libgloss/mt/startup-16-003.S | 2 | ||||
-rw-r--r-- | libgloss/mt/startup-ms2.S | 2 | ||||
-rw-r--r-- | newlib/ChangeLog | 47 | ||||
-rwxr-xr-x | newlib/configure | 2 | ||||
-rw-r--r-- | newlib/configure.host | 8 | ||||
-rw-r--r-- | newlib/configure.in | 2 | ||||
-rw-r--r-- | newlib/libc/stdio/freopen.c | 2 | ||||
-rw-r--r-- | newlib/libc/stdio64/freopen64.c | 2 | ||||
-rw-r--r-- | newlib/libc/sys/linux/include/net/if.h | 7 | ||||
-rw-r--r-- | newlib/libc/sys/linux/include/netinet/ip.h | 2 | ||||
-rw-r--r-- | newlib/libc/sys/linux/io.c | 4 | ||||
-rw-r--r-- | newlib/libc/sys/linux/net/name6.c | 8 | ||||
-rw-r--r-- | newlib/libc/sys/linux/sys/ioccom.h | 2 | ||||
-rw-r--r-- | newlib/libtool.m4 | 2 |
17 files changed, 225 insertions, 17 deletions
@@ -0,0 +1,142 @@ +#! /bin/sh +# Wrapper for compilers which do not understand `-c -o'. + +scriptversion=2005-05-14.22 + +# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. +# Written by Tom Tromey <tromey@cygnus.com>. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# This file is maintained in Automake, please report +# bugs to <bug-automake@gnu.org> or send patches to +# <automake-patches@gnu.org>. + +case $1 in + '') + echo "$0: No command. Try \`$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: compile [--help] [--version] PROGRAM [ARGS] + +Wrapper for compilers which do not understand `-c -o'. +Remove `-o dest.o' from ARGS, run PROGRAM with the remaining +arguments, and rename the output as expected. + +If you are trying to build a whole package this is not the +right script to run: please start by reading the file `INSTALL'. + +Report bugs to <bug-automake@gnu.org>. +EOF + exit $? + ;; + -v | --v*) + echo "compile $scriptversion" + exit $? + ;; +esac + +ofile= +cfile= +eat= + +for arg +do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as `compile cc -o foo foo.c'. + # So we strip `-o arg' only if arg is an object. + eat=1 + case $2 in + *.o | *.obj) + ofile=$2 + ;; + *) + set x "$@" -o "$2" + shift + ;; + esac + ;; + *.c) + cfile=$1 + set x "$@" "$1" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift +done + +if test -z "$ofile" || test -z "$cfile"; then + # If no `-o' option was seen then we might have been invoked from a + # pattern rule where we don't need one. That is ok -- this is a + # normal compilation that the losing compiler can handle. If no + # `.c' file was seen then we are probably linking. That is also + # ok. + exec "$@" +fi + +# Name of file we expect compiler to create. +cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'` + +# Create the lock directory. +# Note: use `[/.-]' here to ensure that we don't use the same name +# that we are using for the .o file. Also, base the name on the expected +# object file name, since that is what matters with a parallel build. +lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d +while true; do + if mkdir "$lockdir" >/dev/null 2>&1; then + break + fi + sleep 1 +done +# FIXME: race condition here if user kills between mkdir and trap. +trap "rmdir '$lockdir'; exit 1" 1 2 15 + +# Run the compile. +"$@" +ret=$? + +if test -f "$cofile"; then + mv "$cofile" "$ofile" +elif test -f "${cofile}bj"; then + mv "${cofile}bj" "$ofile" +fi + +rmdir "$lockdir" +exit $ret + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff --git a/libgloss/ChangeLog b/libgloss/ChangeLog index 7457e3d..095dec1 100644 --- a/libgloss/ChangeLog +++ b/libgloss/ChangeLog @@ -1,3 +1,9 @@ +2006-03-22 Nathan Sidwell <nathan@codesourcery.com> + + * mt/startup-16-002.S (.internal_io): Make @nobits. + * mt/startup-16-003.S (.internal_io): Make @nobits. + * mt/startup-ms2.S (.internal_io): Make @nobits. + 2006-03-02 DJ Delorie <dj@redhat.com> * m32c/exit.S: Preserve r1. diff --git a/libgloss/mt/startup-16-002.S b/libgloss/mt/startup-16-002.S index 475a120..d1732d6 100644 --- a/libgloss/mt/startup-16-002.S +++ b/libgloss/mt/startup-16-002.S @@ -180,7 +180,7 @@ _IVEC_DEFAULT: or r0, r0, r0 - .section .internal_io, "a", @progbits + .section .internal_io, "a", @nobits .fill 256 ; Fill the first page. ; This is the memory-mapped I/O region. diff --git a/libgloss/mt/startup-16-003.S b/libgloss/mt/startup-16-003.S index 9f65f5d..9fe23b9 100644 --- a/libgloss/mt/startup-16-003.S +++ b/libgloss/mt/startup-16-003.S @@ -185,7 +185,7 @@ _IVEC_DEFAULT: or r0, r0, r0 - .section .internal_io, "a", @progbits + .section .internal_io, "a", @nobits .fill 256 ; Fill the first page. ; This is the memory-mapped I/O region. diff --git a/libgloss/mt/startup-ms2.S b/libgloss/mt/startup-ms2.S index f11e3fa..846c72c 100644 --- a/libgloss/mt/startup-ms2.S +++ b/libgloss/mt/startup-ms2.S @@ -187,7 +187,7 @@ _IVEC_DEFAULT: or r0, r0, r0 - .section .internal_io, "a", @progbits + .section .internal_io, "a", @nobits .fill 256 ; Fill the first page. ; This is the memory-mapped I/O region. diff --git a/newlib/ChangeLog b/newlib/ChangeLog index fec04f0..506d2cc 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,50 @@ +2006-03-29 Shaun Jackman <sjackman@gmail.com> + + * libc/sys/linux/include/netinet/ip.h: Include netinet/in_systm.h + for the declaration of n_long. + +2006-03-29 Shaun Jackman <sjackman@gmail.com> + + * libc/sys/linux/include/net/if.h: Include sys/socket.h for + struct sockaddr. + (IFF_SMART): Replace this define with IFF_NOTRAILERS. + (IFF_CANTCHANGE): Replace IFF_SMART reference with IFF_NOTRAILERS. + (IFF_NOTRAILERS): New define. + (struct ifreq): Add ifru_netmask. + (ifr_netmask): New define. + +2006-03-29 Shaun Jackman <sjackman@gmail.com> + + * libc/sys/linux/sys/ioccom.h (ioctl): Change declaration to + match sys/ioctl.h. + +2006-03-29 Shaun Jackman <sjackman@gmail.com> + + * libtool.m4: Set lt_cv_deplibs_check_method=pass_all for + linux-newlib libc implementations. + +2006-03-29 Eric Blake <ebb9@byu.net> + + * libc/stdio/freopen.c (_freopen_r) [__SCLE]: Fix typo. + * libc/stdio64/freopen64.c (_freopen64_r) [__SCLE]: Likewise. + +2006-03-29 Jeff Johnston <jjohnstn@redhat.com> + + * libc/sys/linux/io.c (__mknod): Fix declaration of + syscall to pass a dev_t as third argument rather than + a pointer to dev_t. + +2006-03-29 Jeff Johnston <jjohnstn@redhat.com> + + * libc/sys/linux/net/name6.c: Fix struct references. + +2006-03-22 Mark Mitchell <mark@codesourcery.com> + + * configure.host: Allow hosts to set the default + newlib_atexit_dynamic_alloc value. + * configure.in: Likewise. + * configure: Regenerated. + 2006-03-20 Mark Mitchell <mark@codesourcery.com> * acconfig.h (_ATEXIT_DYNAMIC_ALLOC): Undef. diff --git a/newlib/configure b/newlib/configure index ce9246a..e3004c3 100755 --- a/newlib/configure +++ b/newlib/configure @@ -705,7 +705,7 @@ if test "${enable_newlib_atexit_dynamic_alloc+set}" = set; then esac fi else - newlib_atexit_dynamic_alloc=yes + newlib_atexit_dynamic_alloc=${newlib_atexit_dynamic_alloc} fi am__api_version="1.4" diff --git a/newlib/configure.host b/newlib/configure.host index d85e8ad..759c38a 100644 --- a/newlib/configure.host +++ b/newlib/configure.host @@ -63,6 +63,7 @@ have_sys_mach_dir=no default_newlib_io_long_long=no default_newlib_io_long_double=no default_newlib_io_pos_args=no +default_newlib_atexit_dynamic_alloc=yes aext=a oext=o @@ -738,6 +739,13 @@ if [ "x${newlib_io_pos_args}" = "x" ]; then fi fi +# Disable atexit dynamic allocation if requested. +if [ "x${newlib_atexit_dynamic_alloc}" = "x" ]; then + if [ ${default_newlib_atexit_dynamic_alloc} = "yes" ]; then + newlib_atexit_dynamic_alloc="yes"; + fi +fi + if test -z "${have_crt0}" && test -n "${sys_dir}"; then have_crt0="yes" fi diff --git a/newlib/configure.in b/newlib/configure.in index c8dc211..3cd213c 100644 --- a/newlib/configure.in +++ b/newlib/configure.in @@ -94,7 +94,7 @@ AC_ARG_ENABLE(newlib-atexit-dynamic-alloc, no) newlib_atexit_dynamic_alloc=no ;; *) AC_MSG_ERROR(bad value ${enableval} for newlib-atexit-dynamic-alloc option) ;; esac - fi], [newlib_atexit_dynamic_alloc=yes])dnl + fi], [newlib_atexit_dynamic_alloc=${newlib_atexit_dynamic_alloc}])dnl NEWLIB_CONFIGURE(.) diff --git a/newlib/libc/stdio/freopen.c b/newlib/libc/stdio/freopen.c index ae3444b..f1fc9da 100644 --- a/newlib/libc/stdio/freopen.c +++ b/newlib/libc/stdio/freopen.c @@ -168,7 +168,7 @@ _DEFUN(_freopen_r, (ptr, file, mode, fp), * F_SETFL doesn't change textmode. Don't mess with modes of ttys. */ if (0 <= f && ! isatty (f) - && setmode (f, flags & (O_BINARY | O_TEXT)) == -1) + && setmode (f, oflags & (O_BINARY | O_TEXT)) == -1) f = -1; #endif diff --git a/newlib/libc/stdio64/freopen64.c b/newlib/libc/stdio64/freopen64.c index 6081e03..cb76605 100644 --- a/newlib/libc/stdio64/freopen64.c +++ b/newlib/libc/stdio64/freopen64.c @@ -168,7 +168,7 @@ _DEFUN (_freopen64_r, (ptr, file, mode, fp), * F_SETFL doesn't change textmode. Don't mess with modes of ttys. */ if (0 <= f && ! isatty (f) - && setmode (f, flags & (O_BINARY | O_TEXT)) == -1) + && setmode (f, oflags & (O_BINARY | O_TEXT)) == -1) f = -1; #endif diff --git a/newlib/libc/sys/linux/include/net/if.h b/newlib/libc/sys/linux/include/net/if.h index bf021e6..5671b11 100644 --- a/newlib/libc/sys/linux/include/net/if.h +++ b/newlib/libc/sys/linux/include/net/if.h @@ -38,6 +38,7 @@ #define _NET_IF_H_ #include <sys/queue.h> +#include <sys/socket.h> /* * <net/if.h> does not depend on <sys/time.h> on most other systems. This @@ -122,7 +123,7 @@ struct if_data { #define IFF_DEBUG 0x4 /* turn on debugging */ #define IFF_LOOPBACK 0x8 /* is a loopback net */ #define IFF_POINTOPOINT 0x10 /* interface is point-to-point link */ -#define IFF_SMART 0x20 /* interface manages own routes */ +#define IFF_NOTRAILERS 0x20 /* avoid use of trailers */ #define IFF_RUNNING 0x40 /* resources allocated */ #define IFF_NOARP 0x80 /* no address resolution protocol */ #define IFF_PROMISC 0x100 /* receive all packets */ @@ -147,7 +148,7 @@ struct if_data { /* flags set internally only: */ #define IFF_CANTCHANGE \ (IFF_BROADCAST|IFF_POINTOPOINT|IFF_RUNNING|IFF_OACTIVE|\ - IFF_SIMPLEX|IFF_MULTICAST|IFF_ALLMULTI|IFF_SMART) + IFF_SIMPLEX|IFF_MULTICAST|IFF_ALLMULTI|IFF_NOTRAILERS) /* Capabilities that interfaces can advertise. */ #define IFCAP_RXCSUM 0x0001 /* can offload checksum on RX */ @@ -227,6 +228,7 @@ struct ifreq { struct sockaddr ifru_addr; struct sockaddr ifru_dstaddr; struct sockaddr ifru_broadaddr; + struct sockaddr ifru_netmask; short ifru_flags[2]; short ifru_index; int ifru_metric; @@ -239,6 +241,7 @@ struct ifreq { #define ifr_addr ifr_ifru.ifru_addr /* address */ #define ifr_dstaddr ifr_ifru.ifru_dstaddr /* other end of p-to-p link */ #define ifr_broadaddr ifr_ifru.ifru_broadaddr /* broadcast address */ +#define ifr_netmask ifr_ifru.ifru_netmask /* interface net mask */ #define ifr_flags ifr_ifru.ifru_flags[0] /* flags */ #define ifr_prevflags ifr_ifru.ifru_flags[1] /* flags */ #define ifr_metric ifr_ifru.ifru_metric /* metric */ diff --git a/newlib/libc/sys/linux/include/netinet/ip.h b/newlib/libc/sys/linux/include/netinet/ip.h index 0e6df1e..2b2bcb8 100644 --- a/newlib/libc/sys/linux/include/netinet/ip.h +++ b/newlib/libc/sys/linux/include/netinet/ip.h @@ -37,6 +37,8 @@ #ifndef _NETINET_IP_H_ #define _NETINET_IP_H_ +#include <netinet/in_systm.h> + /* * Definitions for internet protocol version 4. * Per RFC 791, September 1981. diff --git a/newlib/libc/sys/linux/io.c b/newlib/libc/sys/linux/io.c index d673114..25dccc6 100644 --- a/newlib/libc/sys/linux/io.c +++ b/newlib/libc/sys/linux/io.c @@ -65,12 +65,12 @@ int flock(int fd,int operation) #if !defined(_ELIX_LEVEL) || _ELIX_LEVEL >= 3 -static _syscall3(int,__mknod,const char *,path,mode_t,mode,dev_t *,dev) +static _syscall3(int,__mknod,const char *,path,mode_t,mode,dev_t,dev) int mkfifo(const char *path, mode_t mode) { dev_t dev = 0; - return __mknod(path, mode | S_IFIFO, &dev); + return __mknod(path, mode | S_IFIFO, dev); } #endif diff --git a/newlib/libc/sys/linux/net/name6.c b/newlib/libc/sys/linux/net/name6.c index 80037e8..f220e21 100644 --- a/newlib/libc/sys/linux/net/name6.c +++ b/newlib/libc/sys/linux/net/name6.c @@ -1499,16 +1499,16 @@ _dns_ghbyname(void *rval, void *cb_data, va_list ap) #ifdef INET6 switch (af) { case AF_UNSPEC: - &rtl4->rtl_entry = NULL; rtl4.rtl_type = T_A; - &rtl6->rtl_entry = &rtl4; rtl6.rtl_type = T_AAAA; + rtl4.rtl_entry = NULL; rtl4.rtl_type = T_A; + rtl6.rtl_entry = &rtl4; rtl6.rtl_type = T_AAAA; rtl = &rtl6; break; case AF_INET6: - &rtl6->rtl_entry = NULL; rtl6.rtl_type = T_AAAA; + rtl6.rtl_entry = NULL; rtl6.rtl_type = T_AAAA; rtl = &rtl6; break; case AF_INET: - &rtl4->rtl_entry = NULL; rtl4.rtl_type = T_A; + rtl4.rtl_entry = NULL; rtl4.rtl_type = T_A; rtl = &rtl4; break; } diff --git a/newlib/libc/sys/linux/sys/ioccom.h b/newlib/libc/sys/linux/sys/ioccom.h index 4a063e9..e656d5e 100644 --- a/newlib/libc/sys/linux/sys/ioccom.h +++ b/newlib/libc/sys/linux/sys/ioccom.h @@ -67,7 +67,7 @@ #include <sys/cdefs.h> __BEGIN_DECLS -int ioctl(int, unsigned long, ...); +int ioctl(int __fd, int __request, ...); __END_DECLS #endif diff --git a/newlib/libtool.m4 b/newlib/libtool.m4 index 3f452bc..ff5fb47 100644 --- a/newlib/libtool.m4 +++ b/newlib/libtool.m4 @@ -620,7 +620,7 @@ irix5* | irix6*) ;; # This must be Linux ELF. -linux-gnu*) +linux-gnu*|linux-newlib*) case $host_cpu in alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* ) lt_cv_deplibs_check_method=pass_all ;; |