summaryrefslogtreecommitdiffstats
path: root/gnu
diff options
context:
space:
mode:
Diffstat (limited to 'gnu')
-rw-r--r--gnu/lib/csu/Makefile4
-rw-r--r--gnu/lib/libgcc/Makefile25
-rw-r--r--gnu/lib/libgcov/Makefile5
-rw-r--r--gnu/lib/libstdc++/Makefile10
-rw-r--r--gnu/lib/libsupc++/Version.map29
-rw-r--r--gnu/usr.bin/Makefile2
-rw-r--r--gnu/usr.bin/cc/Makefile.inc4
-rw-r--r--gnu/usr.bin/cc/c++/Makefile9
-rw-r--r--gnu/usr.bin/cc/c++filt/Makefile4
-rw-r--r--gnu/usr.bin/cc/cc1/Makefile3
-rw-r--r--gnu/usr.bin/cc/cc1plus/Makefile3
-rw-r--r--gnu/usr.bin/cc/cc_int/Makefile2
-rw-r--r--gnu/usr.bin/cc/cc_tools/Makefile9
-rw-r--r--gnu/usr.bin/cc/doc/Makefile2
-rw-r--r--gnu/usr.bin/cc/gcov/Makefile2
-rw-r--r--gnu/usr.bin/cc/include/Makefile2
-rw-r--r--gnu/usr.bin/cc/libcpp/Makefile2
-rw-r--r--gnu/usr.bin/cc/libdecnumber/Makefile2
-rw-r--r--gnu/usr.bin/cc/libiberty/Makefile2
-rw-r--r--gnu/usr.bin/gdb/kgdb/main.c15
-rw-r--r--gnu/usr.bin/grep/grep.c8
-rw-r--r--gnu/usr.bin/patch/Makefile13
22 files changed, 136 insertions, 21 deletions
diff --git a/gnu/lib/csu/Makefile b/gnu/lib/csu/Makefile
index a65be66..1efe865 100644
--- a/gnu/lib/csu/Makefile
+++ b/gnu/lib/csu/Makefile
@@ -24,6 +24,10 @@ CFLAGS+= -I${GCCLIB}/include -I${GCCDIR}/config -I${GCCDIR} -I. \
CRTS_CFLAGS= -DCRTSTUFFS_O -DSHARED ${PICFLAG}
MKDEP= -DCRT_BEGIN
+.if ${TARGET_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no"
+CFLAGS+= -DTARGET_ARM_EABI
+.endif
+
.if ${MACHINE_CPUARCH} == "ia64"
BEGINSRC= crtbegin.asm
ENDSRC= crtend.asm
diff --git a/gnu/lib/libgcc/Makefile b/gnu/lib/libgcc/Makefile
index c07ae87..73d9213 100644
--- a/gnu/lib/libgcc/Makefile
+++ b/gnu/lib/libgcc/Makefile
@@ -15,6 +15,10 @@ MK_SSP= no
.include "${.CURDIR}/../../usr.bin/cc/Makefile.tgt"
+.if ${TARGET_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no"
+CFLAGS+= -DTARGET_ARM_EABI
+.endif
+
.if ${TARGET_CPUARCH} == "mips"
LIB= gcc
.endif
@@ -55,10 +59,13 @@ LIB2FUNCS+= _fixuns${mode}si
.endfor
# Likewise double-word routines.
+.if ${TARGET_CPUARCH} != "arm" || ${MK_ARM_EABI} == "no"
+# These are implemented in an ARM specific file but will not be filtered out
.for mode in sf df xf tf
LIB2FUNCS+= _fix${mode}di _fixuns${mode}di
LIB2FUNCS+= _floatdi${mode} _floatundi${mode}
.endfor
+.endif
LIB2ADD = $(LIB2FUNCS_EXTRA)
LIB2ADD_ST = $(LIB2FUNCS_STATIC_EXTRA)
@@ -115,15 +122,14 @@ CFLAGS+= -fheinous-gnu-extensions
LIB1ASMSRC = lib1funcs.asm
LIB1ASMFUNCS = _dvmd_tls _bb_init_func
-LIB2FUNCS_EXTRA = floatunsidf.c floatunsisf.c
+.if ${MK_ARM_EABI} != "no"
+LIB1ASMFUNCS+= _addsubdf3 _addsubsf3 _cmpdf2 _cmpsf2 _fixdfsi _fixsfsi \
+ _fixunsdfsi _fixunsdfsi _muldivdf3 _muldivsf3 _udivsi3
-# Not now
-#LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_tls _bb_init_func
-#LIB1ASMFUNCS+= _call_via_rX _interwork_call_via_rX \
-# _lshrdi3 _ashrdi3 _ashldi3 \
-# _negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \
-# _truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \
-# _fixsfsi _fixunssfsi _floatdidf _floatdisf
+LIB2ADDEH = unwind-arm.c libunwind.S pr-support.c unwind-c.c
+.else
+LIB2FUNCS_EXTRA = floatunsidf.c floatunsisf.c
+.endif
.endif
.if ${TARGET_CPUARCH} == mips
@@ -329,6 +335,9 @@ CLEANFILES += cs-*.h option*
SHLIB_MKMAP = ${GCCDIR}/mkmap-symver.awk
SHLIB_MKMAP_OPTS =
SHLIB_MAPFILES = ${GCCDIR}/libgcc-std.ver
+.if ${TARGET_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no"
+SHLIB_MAPFILES += ${GCCDIR}/config/arm/libgcc-bpabi.ver
+.endif
VERSION_MAP = libgcc.map
libgcc.map: ${SHLIB_MKMAP} ${SHLIB_MAPFILES} ${SOBJS} ${OBJS:R:S/$/.So/}
diff --git a/gnu/lib/libgcov/Makefile b/gnu/lib/libgcov/Makefile
index 680cdbf..dbefca2 100644
--- a/gnu/lib/libgcov/Makefile
+++ b/gnu/lib/libgcov/Makefile
@@ -15,6 +15,11 @@ CFLAGS+= -DIN_GCC -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED
CFLAGS+= -D_PTHREADS -DGTHREAD_USE_WEAK
CFLAGS+= -I${.CURDIR}/../../usr.bin/cc/cc_tools \
-I${GCCLIB}/include -I${GCCDIR}/config -I${GCCDIR} -I.
+
+.if ${TARGET_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no"
+CFLAGS+= -DTARGET_ARM_EABI
+.endif
+
#
# Library members defined in libgcov.c.
# Defined in libgcov.c, included only in gcov library
diff --git a/gnu/lib/libstdc++/Makefile b/gnu/lib/libstdc++/Makefile
index 1005b5d..da88e70 100644
--- a/gnu/lib/libstdc++/Makefile
+++ b/gnu/lib/libstdc++/Makefile
@@ -1,5 +1,7 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
GCCVER= 4.2
GCCDIR= ${.CURDIR}/../../../contrib/gcc
GCCLIB= ${.CURDIR}/../../../contrib/gcclibs
@@ -14,7 +16,7 @@ LIB= stdc++
SHLIB_MAJOR= 6
CFLAGS+= -DIN_GLIBCPP_V3 -DHAVE_CONFIG_H
-.if ${MACHINE_CPUARCH} == "arm"
+.if ${MACHINE_CPUARCH} == "arm" && ${MK_ARM_EABI} == "no"
CFLAGS+= -D_GLIBCXX_SJLJ_EXCEPTIONS=1
.endif
CFLAGS+= -I${.CURDIR} -I${SUPDIR} -I${GCCDIR} -I${SRCDIR}/include
@@ -594,7 +596,13 @@ gthr-default.h: ${GCCDIR}/gthr-posix.h
CLEANFILES+= ${THRHDRS}
+.if ${MACHINE_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no"
+unwind.h: ${GCCDIR}/config/arm/unwind-arm.h
+.else
unwind.h: ${GCCDIR}/unwind-generic.h
+.endif
+
+unwind.h:
ln -sf ${.ALLSRC} ${.TARGET}
SRCS+= unwind.h
diff --git a/gnu/lib/libsupc++/Version.map b/gnu/lib/libsupc++/Version.map
index ec6303e..dbcf495 100644
--- a/gnu/lib/libsupc++/Version.map
+++ b/gnu/lib/libsupc++/Version.map
@@ -142,8 +142,37 @@ GLIBCXX_3.4 {
_ZdaPvRKSt9nothrow_t;
_ZdlPv;
_ZdlPvRKSt9nothrow_t;
+ extern "C++" {
+ std::set_new_handler*;
+ std::set_terminate*;
+ std::set_unexpected*;
+
+ std::bad_alloc;
+ std::bad_cast;
+ std::exception*;
+
+ "typeinfo for std::bad_alloc";
+ "typeinfo for std::bad_cast";
+ "typeinfo for std::exception";
+
+ "typeinfo name for std::bad_alloc";
+ "typeinfo name for std::bad_cast";
+ "typeinfo name for std::exception";
+
+ "vtable for std::bad_alloc";
+ "vtable for std::bad_cast";
+ "vtable for std::exception";
+ };
};
+GLIBCXX_3.4.9 {
+ extern "C++" {
+ "std::bad_alloc::what() const";
+ "std::bad_cast::what() const";
+ "std::bad_typeid::what() const";
+ };
+} GLIBCXX_3.4;
+
CXXABI_1.3.1 {
__cxa_get_exception_ptr;
diff --git a/gnu/usr.bin/Makefile b/gnu/usr.bin/Makefile
index 3a61327..386c957 100644
--- a/gnu/usr.bin/Makefile
+++ b/gnu/usr.bin/Makefile
@@ -30,7 +30,7 @@ _groff= groff
_cvs= cvs
.endif
-.if ${MK_FDT} != "no"
+.if ${MK_GPL_DTC} != "no"
_dtc= dtc
.endif
diff --git a/gnu/usr.bin/cc/Makefile.inc b/gnu/usr.bin/cc/Makefile.inc
index 7a5991e..0302617 100644
--- a/gnu/usr.bin/cc/Makefile.inc
+++ b/gnu/usr.bin/cc/Makefile.inc
@@ -26,6 +26,10 @@ CSTD?= gnu89
CFLAGS+= -DCROSS_COMPILE
.endif
+.if ${TARGET_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no"
+CFLAGS+= -DTARGET_ARM_EABI
+.endif
+
.if ${TARGET_ARCH} == "armeb" || ${TARGET_ARCH} == "armv6eb"
CFLAGS += -DTARGET_ENDIAN_DEFAULT=MASK_BIG_END
.endif
diff --git a/gnu/usr.bin/cc/c++/Makefile b/gnu/usr.bin/cc/c++/Makefile
index f434b34..98e1ea3 100644
--- a/gnu/usr.bin/cc/c++/Makefile
+++ b/gnu/usr.bin/cc/c++/Makefile
@@ -1,5 +1,6 @@
# $FreeBSD$
+NO_MAN=
.include <bsd.own.mk>
.include "../Makefile.inc"
@@ -9,13 +10,13 @@
PROG= g++
SRCS+= g++spec.c
+
+DPADD= ${LIBCPP} ${LIBIBERTY}
+LDADD= ${LIBCPP} ${LIBIBERTY}
+
.if ${MK_CLANG_IS_CC} == "no"
LINKS= ${BINDIR}/g++ ${BINDIR}/c++
LINKS+= ${BINDIR}/g++ ${BINDIR}/CC
.endif
-NO_MAN=
-
-DPADD= ${LIBCPP} ${LIBIBERTY}
-LDADD= ${LIBCPP} ${LIBIBERTY}
.include <bsd.prog.mk>
diff --git a/gnu/usr.bin/cc/c++filt/Makefile b/gnu/usr.bin/cc/c++filt/Makefile
index 03ad7c2..5379795 100644
--- a/gnu/usr.bin/cc/c++filt/Makefile
+++ b/gnu/usr.bin/cc/c++filt/Makefile
@@ -1,5 +1,8 @@
# $FreeBSD$
+NO_MAN=
+.include <bsd.own.mk>
+
.include "../Makefile.inc"
.include "../Makefile.fe"
@@ -7,7 +10,6 @@
PROG= c++filt
SRCS= cp-demangle.c
-NO_MAN=
CFLAGS+= -DSTANDALONE_DEMANGLER -DVERSION=\"$(GCC_VERSION)\"
diff --git a/gnu/usr.bin/cc/cc1/Makefile b/gnu/usr.bin/cc/cc1/Makefile
index 7b1e343..3c0d8fa 100644
--- a/gnu/usr.bin/cc/cc1/Makefile
+++ b/gnu/usr.bin/cc/cc1/Makefile
@@ -1,9 +1,10 @@
# $FreeBSD$
-.include "../Makefile.inc"
NO_MAN=
.include <bsd.own.mk>
+.include "../Makefile.inc"
+
.PATH: ${GCCDIR}
PROG= cc1
diff --git a/gnu/usr.bin/cc/cc1plus/Makefile b/gnu/usr.bin/cc/cc1plus/Makefile
index dd3d524..83b0abb 100644
--- a/gnu/usr.bin/cc/cc1plus/Makefile
+++ b/gnu/usr.bin/cc/cc1plus/Makefile
@@ -1,9 +1,10 @@
# $FreeBSD$
-.include "../Makefile.inc"
NO_MAN=
.include <bsd.own.mk>
+.include "../Makefile.inc"
+
.PATH: ${GCCDIR}/cp ${GCCDIR}
PROG= cc1plus
diff --git a/gnu/usr.bin/cc/cc_int/Makefile b/gnu/usr.bin/cc/cc_int/Makefile
index e6051e1..86c1791 100644
--- a/gnu/usr.bin/cc/cc_int/Makefile
+++ b/gnu/usr.bin/cc/cc_int/Makefile
@@ -1,5 +1,7 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
.include "../Makefile.inc"
.include "../Makefile.ver"
diff --git a/gnu/usr.bin/cc/cc_tools/Makefile b/gnu/usr.bin/cc/cc_tools/Makefile
index c697dd3..8f75f43 100644
--- a/gnu/usr.bin/cc/cc_tools/Makefile
+++ b/gnu/usr.bin/cc/cc_tools/Makefile
@@ -51,6 +51,9 @@ TARGET_INC+= ${GCC_CPU}/elf.h
.endif
.if ${TARGET_CPUARCH} == "arm"
TARGET_INC+= ${GCC_CPU}/aout.h
+.if ${MK_ARM_EABI} != "no"
+TARGET_INC+= ${GCC_CPU}/bpabi.h
+.endif
.endif
.if ${TARGET_ARCH} == "powerpc64"
TARGET_INC+= ${GCC_CPU}/biarch64.h
@@ -349,7 +352,13 @@ gthr-default.h: ${GCCDIR}/gthr-posix.h
GENSRCS+= gthr-default.h
+.if ${TARGET_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no"
+unwind.h: ${GCCDIR}/config/arm/unwind-arm.h
+.else
unwind.h: ${GCCDIR}/unwind-generic.h
+.endif
+
+unwind.h:
ln -sf ${.ALLSRC} ${.TARGET}
GENSRCS+= unwind.h
diff --git a/gnu/usr.bin/cc/doc/Makefile b/gnu/usr.bin/cc/doc/Makefile
index 840b694..a56231b 100644
--- a/gnu/usr.bin/cc/doc/Makefile
+++ b/gnu/usr.bin/cc/doc/Makefile
@@ -1,5 +1,7 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
.include "../Makefile.inc"
.include "../Makefile.ver"
diff --git a/gnu/usr.bin/cc/gcov/Makefile b/gnu/usr.bin/cc/gcov/Makefile
index f48d177..9a87c02 100644
--- a/gnu/usr.bin/cc/gcov/Makefile
+++ b/gnu/usr.bin/cc/gcov/Makefile
@@ -1,5 +1,7 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
.include "../Makefile.inc"
.include "../Makefile.ver"
diff --git a/gnu/usr.bin/cc/include/Makefile b/gnu/usr.bin/cc/include/Makefile
index 1698262..357bac0 100644
--- a/gnu/usr.bin/cc/include/Makefile
+++ b/gnu/usr.bin/cc/include/Makefile
@@ -1,5 +1,7 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
.include "../Makefile.inc"
INCSDIR=${INCLUDEDIR}/gcc/${GCCVER}
diff --git a/gnu/usr.bin/cc/libcpp/Makefile b/gnu/usr.bin/cc/libcpp/Makefile
index 23bc26e..bfaea7d 100644
--- a/gnu/usr.bin/cc/libcpp/Makefile
+++ b/gnu/usr.bin/cc/libcpp/Makefile
@@ -1,5 +1,7 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
# Use our headers in preference to ones from ../cc_tools.
CFLAGS+= -I${.CURDIR} -I.
diff --git a/gnu/usr.bin/cc/libdecnumber/Makefile b/gnu/usr.bin/cc/libdecnumber/Makefile
index 82df5a9..2987c1c 100644
--- a/gnu/usr.bin/cc/libdecnumber/Makefile
+++ b/gnu/usr.bin/cc/libdecnumber/Makefile
@@ -1,5 +1,7 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
# Use our headers in preference to ones from ../cc_tools.
CFLAGS+= -I${.CURDIR} -I.
diff --git a/gnu/usr.bin/cc/libiberty/Makefile b/gnu/usr.bin/cc/libiberty/Makefile
index 7446793..adaa128 100644
--- a/gnu/usr.bin/cc/libiberty/Makefile
+++ b/gnu/usr.bin/cc/libiberty/Makefile
@@ -1,5 +1,7 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
#
# Make sure we will pick up our config.h file first, not the one from
# cc_tools.
diff --git a/gnu/usr.bin/gdb/kgdb/main.c b/gnu/usr.bin/gdb/kgdb/main.c
index 9293f36..45a3dc0 100644
--- a/gnu/usr.bin/gdb/kgdb/main.c
+++ b/gnu/usr.bin/gdb/kgdb/main.c
@@ -333,11 +333,24 @@ main(int argc, char *argv[])
args.argv = malloc(sizeof(char *));
args.argv[0] = argv[0];
- while ((ch = getopt(argc, argv, "ac:d:fn:qr:vw")) != -1) {
+ while ((ch = getopt(argc, argv, "ab:c:d:fn:qr:vw")) != -1) {
switch (ch) {
case 'a':
annotation_level++;
break;
+ case 'b':
+ {
+ int i;
+ char *p;
+
+ i = strtol (optarg, &p, 0);
+ if (i == 0 && p == optarg)
+ warnx("warning: could not set baud rate to `%s'.\n",
+ optarg);
+ else
+ baud_rate = i;
+ }
+ break;
case 'c': /* use given core file. */
if (vmcore != NULL) {
warnx("option %c: can only be specified once",
diff --git a/gnu/usr.bin/grep/grep.c b/gnu/usr.bin/grep/grep.c
index 1684a82..0cab4a1 100644
--- a/gnu/usr.bin/grep/grep.c
+++ b/gnu/usr.bin/grep/grep.c
@@ -304,7 +304,7 @@ reset (int fd, char const *file, struct stats *stats)
if (directories == SKIP_DIRECTORIES && S_ISDIR (stats->stat.st_mode))
return 0;
#ifndef DJGPP
- if (devices == SKIP_DEVICES && (S_ISCHR(stats->stat.st_mode) || S_ISBLK(stats->stat.st_mode) || S_ISSOCK(stats->stat.st_mode)))
+ if (devices == SKIP_DEVICES && (S_ISCHR(stats->stat.st_mode) || S_ISBLK(stats->stat.st_mode) || S_ISSOCK(stats->stat.st_mode) || S_ISFIFO(stats->stat.st_mode)))
#else
if (devices == SKIP_DEVICES && (S_ISCHR(stats->stat.st_mode) || S_ISBLK(stats->stat.st_mode)))
#endif
@@ -942,6 +942,7 @@ grepfile (char const *file, struct stats *stats)
int desc;
int count;
int status;
+ int flags;
if (! file)
{
@@ -950,7 +951,7 @@ grepfile (char const *file, struct stats *stats)
}
else
{
- while ((desc = open (file, O_RDONLY)) < 0 && errno == EINTR)
+ while ((desc = open (file, O_RDONLY | O_NONBLOCK)) < 0 && errno == EINTR)
continue;
if (desc < 0)
@@ -990,6 +991,9 @@ grepfile (char const *file, struct stats *stats)
return 1;
}
+ flags = fcntl(desc, F_GETFL);
+ flags &= ~O_NONBLOCK;
+ fcntl(desc, F_SETFL, flags);
filename = file;
}
diff --git a/gnu/usr.bin/patch/Makefile b/gnu/usr.bin/patch/Makefile
index 373efbb..76d28e8 100644
--- a/gnu/usr.bin/patch/Makefile
+++ b/gnu/usr.bin/patch/Makefile
@@ -1,6 +1,17 @@
# $FreeBSD$
-PROG= patch
+.include <bsd.own.mk>
+
+.if ${MK_BSD_PATCH} == "yes"
+PROG= gnupatch
+CLEANFILES+= gnupatch.1
+
+gnupatch.1: patch.1
+ cp ${.ALLSRC} ${.TARGET}
+.else
+PROG= patch
+.endif
+
SRCS= backupfile.c inp.c patch.c pch.c util.c version.c
CFLAGS+=-DHAVE_CONFIG_H
OpenPOWER on IntegriCloud